Protocols/WebAPI/Reference/Methods/BuddyFeed

From NINA Wiki
Jump to navigation Jump to search
WebAPI Protocol
Basic
Introduction
Clients
Whimsicals
Host Interaction
Flow
Authentication
Client
WebApp
Other Services
Foodgroups

This page is about WebAPI Buddy Feed methods, in a series for the WebAPI reference manual.

getUserFeed

Get the buddyfeed for a user. An extra format type of rss is supported.

Trusted and Token validation methods are currently not enforced.

URL: GET http://api.oscar.nina.bz/buddyfeed/getUser

Input Parameters

Type Field Description
Format f [Required] The format of the data returned
String c JSONP callback
String r Request id
String a Use an NINA Authentication Token for authentication, from the getToken call
Integer ts Epoch timestamp - clientLogin required parameter
String sig_sha256 Signature - clientLogin required parameter.
String t Target aimId
String feedCategory Filter feeds by this feed category. Can be multiple instances up to filters
Boolean fullContent Return the full html content for published items
Integer maxItems Max total number of items
Boolean bfUI if provided and set to 1, Profile, away and status msgs are NOT retrieved
String loc the required language and locale of the error/status messages. This is always in "<lang>-<locale>" format. The lang is the 2 letter language code for I18N (default: en) and the locale is the 2 letter Locale code for I18N (default: us). If not passed in, the language will be extracted from HTTP header (Accept-Language) and if that is not available will default to "en-us".

Output Fields

Type Field Description
Array of BuddyFeedItem items Target aimId, multiple t parameters are allowed

Common Status Codes

Status Code Description
200 Success
401 Authorization required
460 Missing required parameter
462 Parameter error

Common Status Detail Codes

Status Detail Code Description
1004 Referer used to create token doesn't match referer of call
1014 Signature is bad, see the signature notes of startSession

Sample JSON Output

{"response":{
    "statusCode":200,
    "statusText":"Ok",
    "requestId":"123",
    "data":{
      "items":[
      {
        "aimId":"chattingchuck",
        "title":"Blog update",
        "link":"http://journals.aol.com/chattingchuck/entry",
        "domain":"journals.aol.com",
        "description":"What I ate today",
        "category":"Journal",
        "pubDate":"Mon, 02 Apr 2007 14:02:12 GMT",
        "author":"chattingchuck@aol.com",
        "guid":"Blah"
      }
      ]
    }
  }
}

Sample XML Output

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <statusCode>200</statusCode>
  <statusText>Ok</statusText>
  <requestId>123</requestId>
  <data>
    <items>
    <item>
      <aimId>chattingchuck</aimId>
      <title>Blog update</title>
      <link>http://journals.aol.com/chattingchuck/entry</link>
      <domain>journals.aol.com</domain>
      <description>What I ate today</description>
      <category>Journal</category>
      <pubDate>Mon, 02 Apr 2007 14:02:12 GMT</pubDate>
      <author>chattingchuck@aol.com</author>
      <guid>Blah</guid>
    </item>
    </items>
  </data>
</response>

getBuddylistFeed

Get the buddyfeed for a user's entire buddylist. An extra format type of f=native for RSS is supported.

URL: GET http://api.oscar.nina.bz/buddyfeed/getBuddylist

Input Parameters

Type Field Description
Format f [Required] The format of the data returned
String c JSONP callback
String r Request id
String k [Required] the AIM Web Key from http://dev.nina.bz/aim - use the same key for all calls
String s Use trusted authentication, the source user
String a Use an NINA Authentication Token for authentication, from the getToken call
Integer ts Epoch timestamp - clientLogin required parameter
String sig_sha256 Signature - clientLogin required parameter.
String groupBy (T or F) F = Sort results in revchron order (default), T = Sort results by buddy/subsort in revchron order
Integer maxItems Max total number of items
Integer maxItemsPerMember Max items per member
Integer maxMembers Max number of unique buddies to report on
String feedCategory Filter feeds by this feed category. Can be multiple instances up to filters
Boolean bfUI if provided and set to 1, Profile, away and status msgs are NOT retrieved
String loc the required language and locale of the error/status messages. This is always in "<lang>-<locale>" format. The lang is the 2 letter language code for I18N (default: en) and the locale is the 2 letter Locale code for I18N (default: us). If not passed in, the language will be extracted from HTTP header (Accept-Language) and if that is not available will default to "en-us".

Output Fields

Type Field Description
Array of BuddyFeedItem items Items for all the users in the buddylist

Common Status Codes

Status Code Description
200 Success
401 Authorization required
460 Missing required parameter
462 Parameter error

Common Status Detail Codes

Status Detail Code Description
1004 Referer used to create token doesn't match referer of call
1014 Signature is bad, see the signature notes of startSession

Sample JSON Output

{"response":{
    "statusCode":200,
    "statusText":"Ok",
    "requestId":"123",
    "data":{
      "items":[
      {
        "aimId":"chattingchuck",
        "title":"Blog update",
        "link":"http://journals.aol.com/chattingchuck/entry",
        "domain":"journals.aol.com",
        "description":"What I ate today",
        "category":"Journal",
        "pubDate":"Mon, 02 Apr 2007 14:02:12 GMT",
        "author":"chattingchuck@aol.com",
        "guid":"Blah"
      }
      ]
    }
  }
}

Sample XML Output

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <statusCode>200</statusCode>
  <statusText>Ok</statusText>
  <requestId>123</requestId>
  <data>
    <items>
    <item>
      <aimId>chattingchuck</aimId>
      <title>Blog update</title>
      <link>http://journals.aol.com/chattingchuck/entry</link>
      <domain>journals.aol.com</domain>
      <description>What I ate today</description>
      <category>Journal</category>
      <pubDate>Mon, 02 Apr 2007 14:02:12 GMT</pubDate>
      <author>chattingchuck@aol.com</author>
      <guid>Blah</guid>
    </item>
    </items>
  </data>
</response>

pushFeed

Push a simple Buddy Feed Item

URL: GET http://api.oscar.nina.bz/buddyfeed/pushFeed

Input Parameters

Type Field Description
Format f [Required] The format of the data returned
String c JSONP callback
String r Request id
String k [Required] the AIM Web Key from http://dev.nina.bz/aim - use the same key for all calls
String s Use trusted authentication, the source user
String a Use an NINA Authentication Token for authentication, from the getToken call
Integer ts Epoch timestamp - clientLogin required parameter
String sig_sha256 Signature - clientLogin required parameter.
String feedTitle [Required] Channel/Feed title
String feedLink [Required] URL to main feed page
String feedDesc [Required] Channel/Feed description
String feedPublisher Name of application publishing data
String itemTitle [Required] Title of item
String itemLink [Required] URL to item location
String itemPubDate Item published date in UNIX time in secs since EPOCH. If not provided, server will use system time
String itemGuid [Required] Unique per item ID
String itemDesc Item description
String itemCategory Item Category

Common Status Codes

Status Code Description
200 Success
401 Authorization required
460 Missing required parameter
462 Parameter error

Common Status Detail Codes

Status Detail Code Description
1004 Referer used to create token doesn't match referer of call
1014 Signature is bad, see the signature notes of startSession

Sample JSON Output

{"response":{
    "statusCode":200,
    "statusText":"Ok",
    "requestId":"123",
    "data":{
    }
  }
}

Sample XML Output

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <statusCode>200</statusCode>
  <statusText>Ok</statusText>
  <requestId>123</requestId>
  <data>
  </data>
</response>