Joind.in API
The Joind.in API is XML based and allows for the fetching and updating of information in the service's database. Here's an example structure each request should follow:
Sample Request
<request>
<auth>
<user>$username</user>
<pass>$password</pass>
</auth>
<action type="getdetail">
<event_id>1</event_id>
</action>
</request>
or, if you reprefer JSON:
{"request":{
"auth":{
"user":"your_username","pass":"your_password"
},
"action":{
"type":"status",
"data":{"test_string":"my test"}
}
}}
In our above examples, you can see the "auth" section where you would replace $username and $password with your login information - the auth section only needs to be included where authentication is required for that action. The password in the auth section should be md5. Below that there's the "action" section which indicates which operation the system should perform. In this example we're making a "getdetail" call to grab the information for the given event ID.
Types
There are four different URLs you can make requests to:
- api/site - to get the current status of the web service
- api/event - to get information on events
- api/talk - to get information on talks
- api/user - to get information on users
- api/comment - to get information about individual comments
Our sample XML above would need to be sent to "http://joind.in/api/event" to work correctly. If you send it to an incorrect URL you probably won't get quite what you're expecting.
Responses
By default, responses will be made in an JSON format. There is an optional attribute you can add to the "action" tag in your request called "output". This is set to "json" initially but it can also be set to "xml" if you prefer your response in that format. Here's an example of the XML output:
<response> <item> <talk_title>My Test Talk</talk_title> <talk_desc>This is a sample talk description</talk_desc> <ID>42</ID> </item> </response>
If there are any errors in the request or problems processing it, an "errors" array will be returned containing the message(s) about where the issue lies.
Request Types
Below are the request types that you can make to the API including input and output variables.
Request Types:- Events
- Talks
- Comment
- User
- Site
Events (/api/event)
Get Event DetailDescription: Get the details for a given event number
Authentication: not required
Input:
- event_id: integer
Output: An array containing a single object. The object has the following properties:
- event_name: string, Name of the event
- event_start: Unix timestamp
- event_end: Unix timestamp
- event_lat: number, Latitude of the venue location
- event_long: number, Longitude of the venue location
- ID: integer, ID for the event
- event_loc: string, Event location
- event_desc: string, Event description
- active: integer, Whether the event is active or not
- event_stub: string, Stub/shortcut value for event
- event_icon: string, path to image icon
- pending: integer, whether the event is awaiting approval
- event_hashtag: string, twitter/blogging hashtag for this event
- event_href: string, event homepage
- event_cfp_start: unix timestamp, date the call for papers opens for this event
- event_cfp_end: unix timestamp, date the call for papers closes for this event
- event_voting: integer, whether users can vote on the sessions (currently not in use)
- private: integer, whether this event is only visible to its members
- event_tz_cont: string, Continent part of timezone name (e.g. 'Europe')
- event_tz_place: string, Detial part of timezone name (e.g. 'London')
- allow_comments: integer, Whether comments are accepted on this talk (1 for yes, 0 for no)
- num_attend: integer, number of people marked as attending
- num_comments: integer, the number of comments on this event
- user_attending: integer, whether the current user is attending this event
- now: string, either "now" if the event is now on or "" if it isn't (not present in event/getlist)
- tracks: array, List of track objects associated with this session. Track properties are track_name, ID, track_color used (1 or 0, whether there are sessions in it or not), event_id and track_desc (description) (not present in event/getlist)
Description: Adds an active event
Authentication: required
Input:
- event_name: string, Full name of event
- event_start: integer, Unix timestamp of event start time
- event_end: integer, Unix timestamp of event end time
- event_loc: string, Location of event
- event_tz: integer, Offset of event timezone from GMT
- event_desc: string, Description of event
- msg: string, Response mesage concerning addition of event
Description: Gets the talks assoiated with an event
Authentication: not required
Input:
- event_id: string, event ID
- talk_title: string, Title of the talk
- speaker: string, Speaker of the talk
- slides_link: For future use
- date_given: integer, Unix timestamp for the date talk presented
- event_id: integer, The event ID the talk belongs to
- ID: integer, The talk ID number
- talk_desc: string, Description of the talk
- event_tz_cont: string, Continent part of timezone name (e.g. 'Europe')
- event_tz_place: string, Detial part of timezone name (e.g. 'London')
- lang: string, Language the talk given in (2-digit short code)
- rank: integer, Average rating of comments on selected talk
- tcid: string, Type of entry (e.g."Talk")
- comment_count: integer, Number of comments on this session
- now_next: string, either "now" if the talk is now on, "next" if it is on next, or "" otherwise. NOTE the logic behind this is *very* crude
- tracks: array, List of track objects associated with this session. Track properties are track_name, ID, track_color and track_desc (description)
Description: Gets the event listing for various types
Authentication: not required
Input:
- event_type: string, event type [hot,upcoming,past]
- Multiple, see Get Event Detail results
Description: Add a comment to the event
Authentication: not required (but user name used with comment if supplied)
Input:
- event_id: integer, id of the event to add the comment to
- comment: string, comments to submit
- msg: string, either "comment added!" or error string
Description: Marks this user as attending the event
Authentication: required
Input:
- eid: integer, id of the talk to add the comment to
- msg: Either success or one of a few failure messages
Description: Get all comments associated with an event
Authentication: not required
Input:
- event_id: integer, ID number of event to get comments for
- event_id: integer, ID number of the event comment is on
- comment: string, Comments from the user
- date_made: integer, Unix timestamp of when comment was posted
- user_id: integer, If a registered user made the comment, a non-zero value is here
- active: integer, If the comment is marked as active or not
- ID: integer, ID number of the comment
- cname: string, If a registered user made the comment, their username is here
- private: integer, If the comment is marked as private or not
Description: Get all comments associated with sessions at an event. Private comments are not shown, results are returned in date order with newest first.
Authentication: not required
Input:
- event_id: integer, ID number of event to get comments for
- talk_title: string, Title of the talk
- speaker: string, Speaker of the talk
- date_given: integer, Unix timestamp for the date talk presented
- date_made: integer, Unix timestamp of when comment was posted
- rating: integer, The rating the user gave to this talk
- comment: string, Comments from the user
- full_name: string, If a registered user made the comment, their username is here
Description: Add a track to an existing event
Authentication: valid login, admin for event
Input:
- event_id: integer, ID number of event to get comments for
- track_name: string, name for the track
- track_desc: string, description for the track
- msg: Either success or one of a few failure messages indicating the problem
Talks (/api/talk)
Get Talk DetailNote: if the event the session belongs to is marked as private, user credentials must be included with the detail request to check for invite status to the event.
Action Type: getdetailDescription: Get the details for given talk number
Authentication: not required
Input:
- talk_id: integer, ID number of the talk to fetch
- talk_title: string, Title of the talk
- speaker: string, Speaker of the talk
- tid: integer, The talk ID number
- eid: integer, The event ID the talk belongs to
- slides_link: For future use
- date_given: integer, Unix timestamp for the date talk presented
- talk_desc: string, Description of the talk
- lang_name: string, Language the talk given in
- lang: integer, Language reference ID (internal use)
- event_name: string, Name of event talk belongs to
- event_tz: Deprecated
- event_tz_cont: string, Continent part of timezone name (e.g. 'Europe')
- event_tz_place: string, Detail part of timezone name (e.g. 'London')
- tavg: integer, Average rating of comments on selected talk
- tcid: string, Type of entry ("Talk")
- event_id: integer, The event ID (same as eid)
- ID: integer, The talk ID number (same as tid)
- active: integer, Whether this talk is in use
- owner_id: integer, The speaker ID number
- event_voting: integer, Whether voting is active for thi event (currently not in use)
- private: integer, If this session is only visible to members
- lang_abbr: string, Short code for the session language
- ccount: integer, Number of comments on this session
- last_comment_date: unix timestamp, Date of the last comment added to this session
- allow_comments: integer, Whether comments are accepted on this talk
- now_next: string, either "now" if the talk is now on, "next" if it is on next, or "" otherwise. NOTE the logic behind this is *very* crude
- tracks: array, List of track objects associated with this session. Track properties are track_name, ID, track_color and track_desc (description)
Description: Get all comments associated with a talk
Authentication: not required
Input:
- talk_id: integer, ID number of talk to get comments for
- talk_id: integer, ID number of the talk comment is on
- rating: integer, The rating the user gave to this talk
- comment: string, Comments from the user
- date_made: integer, Unix timestamp of when comment was posted
- ID: integer, ID number of the comment
- private: integer, If the comment is marked private or not
- active: integer, If the comment is marked as active or not
- user_id: integer, If a registered user made the comment, a non-zero value is here
- uname: string, If a registered user made the comment, their username is here
Description: Add a comment to a given talk
Authentication: required
Input:
- talk_id: integer, id of the talk to add the comment to
- rating: integer, rating to give the talk (range of 1-5)
- comment: string, comments to submit
- private: integer, whether to make the comment private or not
- msg: string or array, either "comment added!" or error string (or array of strings)
Description: Send claim request for talk ID
Authentication: required
Input:
- talk_id: integer, ID number of talk to submit claim for
- msg: Either success or one of a few failure messages
Comments (/api/comments)
Get Comment DetailDescription: Get detail of an event comment with a given ID
Authentication: not required
Input:
- cid: integer, Comment ID
- rtype: string, Either 'event' or 'talk'
- title: string, Title of the comment
Description: Suggest a comment to be spam
Authentication: not required
Input:
- cid: integer, comment ID number
- rtype: string, either "talk" or "event"
- msg: string, will always display "Success"
User (/api/user)
Get User DetailDescription: Get detail of a user, given either user ID or username
Authentication: required
Input:
- uid: string, Username/user ID
- username: string, Joind.in username
- last_login: string, User's last login time (unix timestamp)
- ID: integer, user's ID'
- full_name: string, User's full name'
Description: Get the user's talk and event comments
Authentication: not required
Input:
- username: string, Username
- type: [optional] string, type of comments to get (event or talk)
- Multiple records of:
- talk_id/event_id: integer, ID number of the talk or event
- comment: string, User's comment
- date_made: integer, Time comment was made (unix timestamp)
- user_id: integer, User ID number of user that made the post
- active: integer, Current status of comment (1 = active, 0 = inactive)
- ID: integer, ID number of the comment
- type: string, Type of comment (event or talk)
- rating: integer, [In talk data only] Rating
- comment_type: string, [In talk data only] (null for normal comments, "vote" for a pre-event vote)
- cname: string, [In event data only] Commentor's full name
Description: Check login/password to check login
Authentication: not required
Input:
- uid: string, Username/user ID
- pass: string, MD5 hased value of password
- success: string, Status of login verification (string of 'success' if info is good)
Description: Request the information for a certain speaker profile
Authentication: not required
Input:
- spid: Speaker access key
- speaker_data: contaning one or more of the following:
- full_name: Full name of the speaker
- website: Website address
- blog: Blog website address
- phone: Phone number
- zip: Zip code of speaker's location
- job_title: Title of the job currently held by speaker
- picture: Name of the image speaker uploaded
- contact_email: Email to contact the speaker directly
- city: City of location of speaker
- street_address: Street address
- bio: Biography information
Site (/api/site)
StatusDescription: Get site's current status
Authentication: not required
Input:
- test_string: [optional] send in a string, get the same string back
- test_string: [optional] send in a string, get the same string back
- dt: RFC 2822 formatted date
