johnzimmerman / foosbot

Foosbot initiates, notifies and logs intra-office foosball games
3 stars 3 forks source link

Feature Request: Add/Display ASCII graphs based on statistics #6

Open johnzimmerman opened 12 years ago

johnzimmerman commented 12 years ago

Command example:

-graph

-graph JZ wins

amoffat commented 12 years ago

I'll grab this one

amoffat commented 12 years ago

so I'll need some kind of internal api method eventually to get the stats. I'm thinking:

get_stats(player_name, stat_type="wins", timeframe=None)

where player_name is required, stat_type is either "wins" or "losses" (and maybe more), and timeframe is None (meaning all time), or a tuple of datetimes describing the start time and end time for the stat window

it should return a list of values like [(value, timestamp), (value, timestamp), ...]