Check-ins
GET /checkins
Get the 10 most recent check-ins for the currently authenticated User, like this:
$ curl http://fanvibe.com/api/checkins.xml <?xml version="1.0" encoding="UTF-8"?> <checkins> <count>10</count> <away_team_pick_count>2</away_team_pick_count> <home_team_pick_count>38</home_team_pick_count> <checkin> <id>8354</id> <game_id>175622</game_id> <away_team_name>Cowboys</away_team_name> <home_team_name>Redskins</home_team_name> <team_pick>1</team_pick> <lat>26.1190294025</lat> <lng>-80.2548064083333</lng> <user> <id>2</id> <first_name>Joe</first_name> <last_name>Pestro</last_name> <profile_link>http://fanvibe.com/users/2</profile_link> <status>I'm watching Cowboys vs Redskins</status> <points>190</points> <rank></rank> <avatar_url>http://s3.amazonaws.com/user_avatars_production/avatars/2/large.png?1265265854</avatar_url> <facebook_user>true</facebook_user> <twitter_user>true</twitter_user> </user> </checkin> </checkins>
You can also specify a user_id parameter to get the above response, like this:
$ curl http://fanvibe.com/api/checkins.xml?user_id=2 <?xml version="1.0" encoding="UTF-8"?> <checkins> <count>10</count> <away_team_pick_count>2</away_team_pick_count> <home_team_pick_count>38</home_team_pick_count> <checkin> <id>8354</id> <game_id>175622</game_id> <away_team_name>Cowboys</away_team_name> <home_team_name>Redskins</home_team_name> <away_team_points>14</away_team_points> <home_team_points>21</home_team_points> <team_pick>1</team_pick> <lat>26.1190294025</lat> <lng>-80.2548064083333</lng> <user> <id>2</id> <first_name>Joe</first_name> <last_name>Pestro</last_name> <profile_link>http://fanvibe.com/users/2</profile_link> <status>I'm watching Cowboys vs Redskins</status> <points>190</points> <rank></rank> <avatar_url>http://s3.amazonaws.com/user_avatars_production/avatars/2/large.png?1265265854</avatar_url> <facebook_user>true</facebook_user> <twitter_user>true</twitter_user> </user> </checkin> </checkins>
Or, get all check-ins for a Game by specifying a team name and date, like this:
Parameters
- team_short_name – (required) Team nickname
- start_date – (required) Game date
- page – (optional) Number specifying results page
- per_page – (optional) Number specifying results per page
Example
$ curl http://fanvibe.com/api/checkins.xml?team_short_name=Bulls&start_date=2010-12-13T17:00:00-08:00
Or, get all check-ins for a Game by specifying the Fanvibe game_id, like this:
$ curl http://fanvibe.com/api/checkins?game_id=175627 <?xml version="1.0" encoding="UTF-8"?> <checkins> <game_id>175627</game_id> <count>44</count> <away_team_pick_count>2</away_team_pick_count> <home_team_pick_count>38</home_team_pick_count> <checkin> <id>84060</id> <game_id>175627</game_id> <away_team_name>Bears</away_team_name> <home_team_name>Cowboys</home_team_name> <team_pick>2</team_pick> <lat>26.1190294025</lat> <lng>-80.2548064083333</lng> <user> <id>2</id> <first_name>Joe</first_name> <last_name>Pestro</last_name> <profile_link>http://fanvibe.com/users/2</profile_link> <status>I'm watching Cowboys vs Redskins</status> <points>190</points> <rank></rank> <avatar_url>http://s3.amazonaws.com/user_avatars_production/avatars/2/large.png?1265265854</avatar_url> <facebook_user>true</facebook_user> <twitter_user>true</twitter_user> </user> </checkin> <checkin> <id>77491</id> <game_id>175627</game_id> <away_team_name>Bears</away_team_name> <home_team_name>Cowboys</home_team_name> <team_pick>2</team_pick> <lat>26.1190294025</lat> <lng>-80.2548064083333</lng> <user> <id>2</id> <first_name>Joe</first_name> <last_name>Pestro</last_name> <profile_link>http://fanvibe.com/users/2</profile_link> <status>I'm watching Cowboys vs Redskins</status> <points>190</points> <rank></rank> <avatar_url>http://s3.amazonaws.com/user_avatars_production/avatars/2/large.png?1265265854</avatar_url> <facebook_user>true</facebook_user> <twitter_user>true</twitter_user> </user> </checkin> <checkin> <id>77487</id> <game_id>175627</game_id> <away_team_name>Bears</away_team_name> <home_team_name>Cowboys</home_team_name> <team_pick>2</team_pick> <lat>26.1190294025</lat> <lng>-80.2548064083333</lng> <user> <id>2</id> <first_name>Joe</first_name> <last_name>Pestro</last_name> <profile_link>http://fanvibe.com/users/2</profile_link> <status>I'm watching Cowboys vs Redskins</status> <points>190</points> <rank></rank> <avatar_url>http://s3.amazonaws.com/user_avatars_production/avatars/2/large.png?1265265854</avatar_url> <facebook_user>true</facebook_user> <twitter_user>true</twitter_user> </user> </checkin> </checkins>
Or, get all check-ins for a Game by specifying the NBA id, like this:
$ curl http://fanvibe.com/api/checkins.xml?game_id=0021000001&id_type=NBA
Next: Messages →