outside-edge / python-espncricinfo

Python wrapper for the ESPNCricInfo JSON API
MIT License
145 stars 64 forks source link

Add country object #3

Open dwillis opened 8 years ago

dwillis commented 8 years ago

Create a Country class that has methods for grabbing players by first letter of last name, grounds, fixtures (possibly use iCal format), international results, maybe domestic results?.

ghost commented 8 years ago

Baby steps, but I'm focusing on grabbing players by first letter of last name.

It seems kinda counterintuitive to me to be grabbing players by last name instead of grabbing all players and then filtering.

Also, it would be useful if the players could be represented as data frames instead of manually having to access each stat.

Let me know what you think.

dwillis commented 8 years ago

The grabbing by last name is just to get their IDs for parsing - the Player class will allow you to specific a specific ID. I agree that it would be useful to be able to grab multiple players at once. What do you think the API for that looks like?

ghost commented 8 years ago

I was thinking of having some kind of a player combiner kind of object that combined multiple players and spat out a dataframe or similar.

dwillis commented 8 years ago

That makes sense to me. Could it return a dataframe or serialized JSON?

ghost commented 8 years ago

Either would work. I've been spending a lot of time in R lately so everything's looking like a dataframe ;)

dwillis commented 8 years ago

Heh, cool. This library tries to return Python objects where possible and JSON as a fallback.