boardgamegeek icon indicating copy to clipboard operation
boardgamegeek copied to clipboard

Improve 'plays' support

Open lcosmin opened this issue 11 years ago • 10 comments

  • Retrieve the other items (expansions, etc.) when listing plays, not only boardgames
  • Add support for getting the players of a play session

lcosmin avatar Sep 15 '14 11:09 lcosmin

I mentioned this on BGG but thought I'd add it here, too. It would be cool to get player scores and location for the play sessions.

mad4hatter avatar Jan 08 '15 13:01 mad4hatter

@mad4hatter : could you try the latest release (0.7.0) please?

lcosmin avatar Jan 09 '15 12:01 lcosmin

That mostly works! I think there may be a limit to the scores, though? I logged a eurorails game where the scores were in the millions and it lists all of the scores as 0.0. Just an FYI.

mad4hatter avatar Jan 10 '15 01:01 mad4hatter

Hmm.. truth is that I only tested with retrieving the plays of an user, not a game. I'll take a look. Thanks!

lcosmin avatar Jan 10 '15 07:01 lcosmin

@mad4hatter : I've listed the plays for a few games and the most of them don't have any score (it's empty), while others have things like "49-46ish", "36, 42", as score. I guess this is what happens when you use the field as string and let people put whatever they want in there. :smile: I'll have to adjust my code not to try to interpret that value as a number and just return whatever junk the API returns.

lcosmin avatar Jan 10 '15 07:01 lcosmin

Please could you add documentation for the Plays module when you have time?

mcgriffiths avatar Apr 13 '16 10:04 mcgriffiths

I don't have much energy to work on this project lately... I will get back to it, eventually (especially since the refactoring is not finished), but I can't really say when. I don't think it will be very soon though, sorry. :disappointed:

lcosmin avatar Apr 13 '16 10:04 lcosmin

OK thanks! Hopefully I can figure out how to use it for myself :)

mcgriffiths avatar Apr 13 '16 10:04 mcgriffiths

It shouldn't be very hard:

https://github.com/lcosmin/boardgamegeek/blob/master/boardgamegeek/main.py#L127 https://github.com/lcosmin/boardgamegeek/blob/master/test/test_bgg.py#L444

lcosmin avatar Apr 13 '16 11:04 lcosmin

@qwertymartin I wrote a quick script using this to pull my plays into Google Sheets. I posted about it on BGG -- maybe it'll help you? If you have any specific questions, I can try to help. Just message me here or on BGG!

https://boardgamegeek.com/thread/1514172/python-script-pull-play-data-google-sheets

allisontharp avatar Apr 14 '16 13:04 allisontharp