kevinskyba / kickbase-api-python

MIT License
24 stars 8 forks source link

add basic PlayerStats model and request #1

Open JonasNicoletti opened 4 years ago

kevinskyba commented 4 years ago

I've fixed the formatting a little and added the BaseModel's logic for parsing the JSON. The advantage of this is that this basically adds all attributes to the model by just changing the objects __dict__object, but we also add custom mappings for our defined names and possible transformings (for dates or child objects).

I'm not sure if PlayerStats is the right naming here. PlayerStats should be a child object of an object called LeaguePlayerI think?!

JonasNicoletti commented 4 years ago

About the name I took it from here https://github.com/kevinskyba/kickbase-api-doc/blob/25ba93dd21ff5219161ef6fdf8a386cefc0b0608/Kickbase.postman_collection.json#L351 but if you have one that fits better I can rename it, no problem with that.