This is the list of public available API endpoints.
We don't feel that you need this (most of you are already scraping the website anyway) but there's been some demand so here's a list of structured calls that you can use to extract information from this website.
Also, there's no documentation (or official support, or guarantees). We think that if you've applied to Codebits you should be smart enough to understand these calls just by looking at them. All you need to know is:
- They return JSON structures (default) or a well known form of structured data (ie: XML).
- Some of the methods require authentication. To use them, get a token first with /api/gettoken. The credentials are the same as the website's.
- We support both GET and POST.
- If you prefer XML instead of JSON, just add &format=xml to any API call
- We also support JSONP, just add &callback=funcName to any API call (JSON output only).
- Using HTTPS is advised.
- New methods will be added over time. If you need one, ask us.
Now go on, code those apps and let us know about them.
RSS and other feeds
Proposed talks' comments
96 is the example talk ID. Change it, get another feed.
iCalendar file of the Codebits schedule
Authentication and users
Get the auth token. Will be used as a &token= argument with all the methods that require authentication. Please be aware that tokens may expire (due to timeout, IP change or others). The correct procedure for an app is to ask for a new token if the one it has fails in any of the methods that require authentication.
Returns basic user information. 1 is the user ID, you can change it.
User's info by nick
Same as above, uses nick instead of ID.
Returns the list of the user's friends. 1 is the user ID, you can change it. A word about the status: accepted is accepted by both friends, requested is awaiting acceptance on your side, pending is pending acceptance on your friend's side.
Add another user as a friend
Adds or confirms a user as your friend. 1 is the user ID you wish to add, you can change it. Requires confirmation at the other end.
Reject another user as a friend
Rejects a user as your friend. 1 is the user ID you wish to reject, you can change it. Deletes the pending request at the other end, if it exists.
List accepted users
List of favorite sessions for a user
Returns the list of favorite calendar sessions for a user. 1 is the user ID, you can change it.
Returns the body parts you can play with to build your bot.
Returns the bot structure for a certain user. 1 is the user ID, you can change it.
Returns the bot image. Format as follows body,bgcolor,grad,eyes,mouth,legs,head,arms,balloon. Each field has the exact ID (with leading zeros) from /botparts. If don't want a certain body part to be rendered, use 0 for the ID. The balloon is optional but if you use it, you must urlencode the text first.
Set bot for user
Sets the bot of the authenticated user. Format as follows body,bgcolor,grad,eyes,mouth,legs,head,arms,balloon. Each field has the exact ID (with leading zeros) from /botparts. If don't want a certain body part to be rendered, use 0 for the ID. The balloon is optional but if you use it, you must urlencode the text first.
Search by name
Search this year's edition registered users database for name celso.
Posts a new comment on a certain thread identified by the comment_token. 75f0e78c6abdbe9222d41950bee59155ccc19292 is the user comment_token, you can change it. Some calls (ie: /calltalks) will provide you with a comments_token field you can use here. You need to POST the comment's data using the comment and the (optional) subject variables in your request.
Sessions and calendar
Return the information about a session/talk, including the list of speakers. 110 is the session ID, you can change it.
Returns this year's codebits calendar with detailed information.
Call for talks
Returns the list of the call for talks submissions for this year.
authentication is optional. returns the user thumb option under 'rated', if provided.
Vote talk up
Vote up a proposed talk. 100 is the talk ID, you can change it.
Vote talk down
Vote down a proposed talk. 100 is the talk ID, you can change it.
Returns the list of available badges and their user count.
Returns the list of users for a given badge. 1 is the badge ID, you can change it.
Redeems a badge code.
Returns the list of submitted projects for this year's competition.
Returns information about a specfic project. 114 is the ID, you can change it.
Returns information about the number of votes for the project being voted at the project's presentation session
Votes for the current project being presented. 1 for yes (liked it), 0 for no.
This is a list of shell based dirty examples. We're using POST with curl but you can use any framework you wishgetting the token
curl -F "email@example.com" \ -F "password=grumph" \ "https://services.sapo.pt/Codebits/gettoken"Getting info on user 666
curl -F "token=MSNj...OGIyZmY=" \ "https://services.sapo.pt/Codebits/user/666"Getting the calendar in XML
24 of August, 2012
- Added /comment method
- Added user info by nick under /nick
- Added badges list to /user /nick and /foaf information
- Added a /search method
2 of September, 2012
- Added comments_token to /userbot/
6 of November, 2012
- JSON mimetype changed to application/json