Skip to content

Social Stream's API

atd edited this page Feb 4, 2013 · 4 revisions

1. Description

Social Stream API are methods available to get information from any social network built with Social Stream.

2. Authentication

Currently t-API is being authenticated through Devise's authentication_token.

If you want to try the API, visit

http://myssnode.com/api/keygen

You can also find your api key in your settings page.

3. Signing api requests

Once you know your api key use:

http://myssnode.com/api/method/options?auth_token=yourtokengoeshere

For example:

http://example.com/api/users/options?auth_token=88YeDq13BVzUX4caGt6R

4. Current api methods

Home

Method Path Purpose
GET /home.json JSON with useful information for the logged user (name, timeline, etc.)

User

Method Path Purpose
GET /user.json JSON with basic information about the logged user (name, email, etc.)

Images

Method Path Params Purpose
GET /search.json q=lince&type=picture Search the word "lince" in the image pool. Returns the json object of the matching images
POST /documents.json document[file]=& document[title]=lince& document[description]=description& document[tag_list]=one,two Create a new image from file. Returns the json of the new object

Global search

Method Path Purpose
GET /search?q=lince&type=slide Search in resources. The `query` parameter includes the search string. The `type` parameter filters by content type

Old stuff (needs review)

4.1 Feeds

api/me/home Return ostatus compliant atom feed for the current user home wall
api/user-slug/home Return ostatus compliant atom feed for the user-slug home wall

4.2 Users

api/me Return the xml for the current user
api/user/user-slug Return the xml for the current user identified by user-slug

4.3 Contacts

Contact's json follow the Activity Stream's schema

api/me/contacts Return the json for the contacts of current user
api/subjects/subject-slug/contacts Return the json for the contacts of subject identified by subject-slug, if the authenticated user has permissions to access them.
api/subjects/subject-slug/contacts?relation=n Return the json for the contacts of subject identified by subject-slug in relation n (a number), if the authenticated user has permissions to access them.
Clone this wiki locally