Skip to content

Releases: jaebradley/draftkings_client

Add method to get rule information for a game type

18 Dec 04:14
32878bd
Compare
Choose a tag to compare

Summary

Implemented in PR #104.

Adds a Client().game_type_rules(game_type_id=1) method.

Update urllib3 library to 1.25.9 to avoid security vulnerability

06 Dec 19:28
960d516
Compare
Choose a tag to compare

Summary

#42 updates the version of the urllib3 library to 1.25.9 to avoid vulnerabilities associated with version 1.24.3.

This also meant upgrading the associated requests library version because the previous version of 2.20.0 explicitly only allowed urllib3 < 1.25.

By upgrading requests to 2.22.0, urllib3@1.25.9 was allowed.

v3.0.0

05 Dec 22:02
4d29de0
Compare
Choose a tag to compare

This v3.0.0 release of the DraftKings client improves on the internals of the client while also (hopefully) providing a nicer output API for developers.

The use of the marshmallow library

The marshmallow library is used to deserialize the response from draftkings.com endpoints into data class objects.

These classes use the dataclasses module introduced in Python 3.7.

These data objects are then processed / transformed into data class objects exposed by the client's public API.

Outputting objects

A breaking change from v2.x is that the client now returns explicit classes vs. dicts.

This is done for two reasons

  1. Using explicit classes makes it easier to use type hinting when reading data from the client (as well as making the developer experience better when working on changes inside the project, IMHO)
  2. marshmallow + explicit classes makes it easy to take a class instance and serialize it into some other format (like plain old dicts or JSON)

Client class vs. exported functions

Another breaking change from v2.x is that in v2.x, the API was a series of functions that could be imported from a module.

In v3.0.0, the proper way of using the API is to import the Client from the draft_kings module, instantiate it, and then call the relevant methods on the instantiated Client instance.

Handle null starting time for player draft

17 Sep 00:20
f687ffb
Compare
Choose a tag to compare

Summary

Includes #40 (which closed #37) which is supposed to fix TypeErrors associated with null start times for a player's draft metadata.

2.0.1

15 May 06:02
e115724
Compare
Choose a tag to compare

Contains #35 which fixes a bug around the contest response translator.

This is a backwards-incompatible change but it was done to fix a bug with contest response being a list instead of a list of lists, hence the patch upgrade instead of a major version upgrade.

#35 also updated documentation and examples.

This also adds a sport field to the contest draft group response translation.

2.0.0

14 May 07:14
9c4f5b2
Compare
Choose a tag to compare

V2 of the DraftKings Client (#27)

A cleaner (hopefully) implementation that also provides a cleaner interface.