Joind.in API

There is a new API under development. click here to find out more about the replacement RESTful API. Both APIs are currently supported

The Joind.in API allows for the fetching and updating of information in the service's database. You can use both XML and JSON messaging to communicate with it. Here's an XML-based 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.

 
Please note: be sure to send a "Content-Type" header along with your request to ensure the service parses the message correctly. By default, it will assume the message is XML formatted.



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 "https://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 (/api/event)

Get Event Detail
Action Type: getdetail
Description: 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)
[top]

Add Event
Action Type: addevent
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
Output:
  • msg: string, Response mesage concerning addition of event
[top]

Get Event Talks
Action Type: gettalks
Description: Gets the talks assoiated with an event
Authentication: not required
Input:
  • event_id: string, event ID
Output: An array of Objects. Each object has the following properties:
  • 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)
[top]

Get Event Listing
Action Type: getlist
Description: Gets the event listing for various types
Authentication: not required
Input:
  • event_type: string, event type [hot, upcoming, past]
Output: [top]

Add Comment
Action Type: addcomment
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
  • source: string, optional source application of comment (defaults to: api)
Output:
  • msg: string, either "comment added!" or error string
[top]

Attend Event
Action Type: attend
Description: Marks this user as attending the event
Authentication: required
Input:
  • eid: integer, id of the talk to add the comment to
Output:
  • msg: Either success or one of a few failure messages
[top]

Get Event Comments
Action Type: getcomments
Description: Get all comments associated with an event
Authentication: not required
Input:
  • event_id: integer, ID number of event to get comments for
Output: An array of values containing the following for each comment
  • 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
[top]

Get Event Talk Comments
Action Type: gettalkcomments
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
Output: An array of values containing the following for each comment
  • 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
[top]

Add Event Track
Action Type: addtrack
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
Output: An array of values containing the following for each comment
  • msg: Either success or one of a few failure messages indicating the problem
[top]

Talks (/api/talk)

Get Talk Detail

Note: 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: getdetail
Description: Get the details for given talk number
Authentication: not required
Input:
  • talk_id: integer, ID number of the talk to fetch
Output: An array containing a single object. Object properties are:
  • 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: empty, not used
  • 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)
[top]

Get Talk Comments
Action Type: getcomments
Description: Get all comments associated with a talk
Authentication: not required
Input:
  • talk_id: integer, ID number of talk to get comments for
Output: An array of values containing the following for each comment
  • 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
[top]

Add Comment
Action Type: addcomment
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
  • source: string, optional source application of comment (defaults to: api)
Output:
  • msg: string or array, either "comment added!" or error string (or array of strings)
[top]

Claim Talk
Action Type: claim
Description: Send claim request for talk ID
Authentication: required
Input:
  • talk_id: integer, ID number of talk to submit claim for
Output: Failure/Success message
  • msg: Either success or one of a few failure messages
[top]

Comments (/api/comments)

Get Comment Detail
Action Type: getdetail
Description: Get detail of an event comment with a given ID
Authentication: not required
Input:
  • cid: integer, Comment ID
  • rtype: string, Either 'event' or 'talk'
Output:
  • title: string, Title of the comment
[top]

Mark as Spam (comment)
Action Type: isspam
Description: Suggest a comment to be spam
Authentication: not required
Input:
  • cid: integer, comment ID number
  • rtype: string, either "talk" or "event"
Output:
  • msg: string, will always display "Success"
[top]

User (/api/user)

Get User Detail
Action Type: getdetail
Description: Get detail of a user, given either user ID or username
Authentication: required
Input:
  • uid: string, Username/user ID
Output:
  • 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'
[top]

Get User Comments
Action Type: getcomments
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)
Output:
  • 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
[top]

Validate User
Action Type: validate
Description: Check login/password to check login
Authentication: not required
Input:
  • uid: string, Username/user ID
  • pass: string, MD5 hased value of password
Output:
  • success: string, Status of login verification (string of 'success' if info is good)
[top]

Site (/api/site)

Status
Action Type: status
Description: Get site's current status
Authentication: not required
Input:
  • test_string: [optional] send in a string, get the same string back
Output:
  • test_string: [optional] send in a string, get the same string back
  • dt: RFC 2822 formatted date
[top]

Cloud server hosting by Combell Combell      © Joind.in 2012