Releases: jaebradley/draftkings_client
Add method to get rule information for a game type
Update urllib3 library to 1.25.9 to avoid security vulnerability
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
, [email protected]
was allowed.
v3.0.0
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. dict
s.
This is done for two reasons
- 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)
marshmallow
+ explicit classes makes it easy to take a class instance and serialize it into some other format (like plain olddict
s orJSON
)
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
2.0.1
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.