Recommend
4 
 Thumb up
 Hide
7 Posts

BoardGameGeek» Forums » BoardGameGeek Related » BGG Help and How-To

Subject: URL for posting game plays rss

Your Tags: Add tags
Popular Tags: [View All]
Chris B
United States
Oxford
Mississippi
flag msg tools
Hotty Toddy Rebels!
badge
Lets go Blues!
Avatar
mbmbmbmbmb
Is there still a URL I can call to post plays into the BGG Database. If there is, what are the parameters that it will take?

I was wanting to script a button for posting plays from my own Database, I know it used to work before, but BGG's changed a lot since then.
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
    Conserve energy:     Play Board Games!
United States
California
flag msg tools
designer
Some say the world will end in fire, Some say in ice. From what I’ve tasted of desire I hold with those who favor fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice.
badge
Shake your business up and pour it. I don't have all day.
Avatar
mb
Chris,

You can probably reverse-engineer it. The base URL appears to be "/geekplay.php". Here are the parameters I can quickly discover:

quickplay_version: 2
quickplay_objecttype: thing
quickplay_objectid: 56046 (this is the "game id")
quickplay_playid:
quickplay_action: save
playdate: yyyy-mm-dd

You would need to examine the form more closely to pull out the other field names for items like "location," "playing time," etc. Which details are you looking to pass via your script?
3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Chris B
United States
Oxford
Mississippi
flag msg tools
Hotty Toddy Rebels!
badge
Lets go Blues!
Avatar
mbmbmbmbmb
Beowulf wrote:
Which details are you looking to pass via your script?


Honestly, All I ever cared to pass was the objectid and the playdate. I'm assuming I have to pass the quickplay_action as well.

I tried looking at the source, but it seemed to be wrapped in a java class.

So in order to post a play for say Die Macher today I would just need to hit

http://www.boardgamegeek.com/geekplay.php?quickplay_objectid...

Hmm. so far it's invalid.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Dave Peters
United States
Belmont
California
flag msg tools
Powers:Coleridge:Milton: Faith...must be, if anything, a clear-eyed recognition of the patterns and tendencies, to be found in every piece of the world's fabric, which are the lineaments of God.
badge
That's Tim Powers' fictional Samuel Coleridge "quoting" John Milton in _The Anubis Gates_.
Avatar
mbmbmbmbmb
I've a script that sends to http://www.boardgamegeek.com/geekplay.php with POST body that begins:

ajax=1&action=save&version=2&objecttype=thing&objectid=game_id&playid=&action=save&playdate=date_of_play&dateinput=todays_date&YUIButton=&location=location&quantity=num_plays&length=&incomplete=0&nowinstats=0&twitter=0&twitter_username=&twitter_password=

I normally pass a player block at the end of that - but if all you need is game & date that'll do.

I haven't experimented exhaustively with the headers, but I think you'll have best results if you try to mimic the headers sent with a manual AJAX logging request. They're easy enough to eavesdrop using Firefox' LiveHTTPHeaders extension.

3 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
    Conserve energy:     Play Board Games!
United States
California
flag msg tools
designer
Some say the world will end in fire, Some say in ice. From what I’ve tasted of desire I hold with those who favor fire. But if it had to perish twice, I think I know enough of hate To say that for destruction ice Is also great And would suffice.
badge
Shake your business up and pour it. I don't have all day.
Avatar
mb
rynelf wrote:
I've a script that sends to http://www.boardgamegeek.com/geekplay.php with POST body that begins:

Hmm...those params don't work for me when passed as a GET request. I'll have to gen a form to pass all of them via POST.

I'm also wondering about the user information: I assume the username and encrypted password are being passed from the cookie when you log a new session from the game's entry here on the 'Geek. A script would need to provide that information on its own, wouldn't it?

Nice tip about LiveHTTPHeaders; I was not previously familiar with that extension. Now I have a new toy to play with.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Chris B
United States
Oxford
Mississippi
flag msg tools
Hotty Toddy Rebels!
badge
Lets go Blues!
Avatar
mbmbmbmbmb
I tried passing the params with a post using curl and had no trouble with them, but you are correct in that it sent me back "You must be logged in to post plays" error.

I didn't mess around with it to much, but I'll either need to be able to pass username and pass as well, or I'll have to post the data another way.
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Dave Peters
United States
Belmont
California
flag msg tools
Powers:Coleridge:Milton: Faith...must be, if anything, a clear-eyed recognition of the patterns and tendencies, to be found in every piece of the world's fabric, which are the lineaments of God.
badge
That's Tim Powers' fictional Samuel Coleridge "quoting" John Milton in _The Anubis Gates_.
Avatar
mbmbmbmbmb
The "you must be logged in" is just a reminder that the POST must be sent with your BGG cookie.

Again, LiveHTTPHeaders is your friend; it's easy to scrape from the logs.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.