APIs that power common integration requirements with your content management system, data warehouse, or other software.
gethttps://{networkName}.bootstrap.fyre.co/api/v3.1/activity/
Get recent updates about changes within a Network or Site. Updates include: new Content, edited Content.
Use the Activity Stream API to consume user generated data flowing through the Livefyre system on your network or site. For example: use data from this API to update your search indices based on ratings, or to manage users’ badges in a 3rd party system based on their activity.
name | required | type | description |
---|---|---|---|
resource | true | string | A URN of the Network or Site for which you are requesting activity data. Examples: 'urn:livefyre:example.fyre.co', 'urn:livefyre:example.fyre.co:site=54321' |
since | false | integer | A 64-bit integer representing the the ID of the last event you received. Specify ‘0’ if you have no prior data. Otherwise, use the value from a previous response's 'data.meta.cursor.next'. |
Activity Stream Updates
property | type | description |
---|---|---|
meta | object | |
meta.cursor | object | Information on what results you just received, and how to fetch more |
meta.cursor.self | number | |
meta.cursor.limit | number | |
meta.cursor.next | number | The next value you should use with the 'since' parameter to fetch more updates. If it is null, there is no more data to consume right now. You should re-request later with the same 'since' value to see if new data has arrived. |
data | object | |
data.maxEventId | number | The highest Event ID of the updates in this response. Use this value when building the URL of your next Stream API request to get updates occurring after all the updates in this response. |
data.states | object | Updates to any Content items in the Collection. Keys are Message IDs. |
data.states.[] | object | |
data.states.[].source | number | |
data.states.[].collectionId | string | |
data.states.[].collection | string | |
data.states.[].vis | number | The visibility of this Message. |
data.states.[].lastVis | number | The last visibility value before the current one |
data.states.[].type | number | |
data.states.[].event | number | |
data.states.[].erefs | array | |
data.states.[].erefs.[] | string | |
data.states.[].content | object | |
data.states.[].content.attachments | array | |
data.states.[].content.attachments.[] | object | |
data.states.[].content.attachments.[].provider_url | string | |
data.states.[].content.attachments.[].title | string | |
data.states.[].content.attachments.[].url | string | |
data.states.[].content.attachments.[].type | string | |
data.states.[].content.attachments.[].thumbnail_width | number | |
data.states.[].content.attachments.[].height | number | |
data.states.[].content.attachments.[].width | number | |
data.states.[].content.attachments.[].version | string | |
data.states.[].content.attachments.[].link | string | |
data.states.[].content.attachments.[].author_name | string | |
data.states.[].content.attachments.[].provider_name | string | |
data.states.[].content.attachments.[].thumbnail_url | string | |
data.states.[].content.attachments.[].thumbnail_height | number | |
data.states.[].content.attachments.[].author_url | string | |
data.states.[].content.generator | object | |
data.states.[].content.generator.id | string | |
data.states.[].content.bodyHtml | string | |
data.states.[].content.annotations | object | |
data.states.[].content.annotations.likedBy | array | |
data.states.[].content.annotations.likedBy.[] | string | Author IDs that have Liked the Message |
data.states.[].content.annotations.featuredmessage | object | |
data.states.[].content.annotations.featuredmessage.authorId | string | |
data.states.[].content.annotations.featuredmessage.value | string | |
data.states.[].content.annotations.featuredmessage.collectionId | string | |
data.states.[].content.annotations.geocode | object | |
data.states.[].content.annotations.geocode.latitude | number | |
data.states.[].content.annotations.geocode.longitude | number | |
data.states.[].content.authorId | string | |
data.states.[].content.parentId | string | |
data.states.[].content.updatedAt | number | The epoch time at which the content was updated. |
data.states.[].content.id | string | |
data.states.[].content.createdAt | number | The epoch time at which the content was created. |
data.collections | object | Any Collections that have updates in this response. Keys are Collection IDs. |
data.collections.[] | object | |
data.collections.[].url | string | |
data.collections.[].articleIdentifier | string | External, custom identifier for the Collection. |
data.collections.[].title | string | |
data.collections.[].id | string | |
data.collections.[].site | string | Site ID of the Site the Collection belongs to |
data.authors | object | Authors mentioned by other parts of this response. Keys are Author IDs. |
data.authors.[] | object | |
data.authors.[].displayName | string | |
data.authors.[].tags | array | |
data.authors.[].tags.[] | string | |
data.authors.[].profileUrl | string | |
data.authors.[].avatar | string | |
data.authors.[].type | number | |
data.authors.[].id | string | |
data.annotations | object |
{
"status": "ok",
"meta": {
"cursor": {
"self": 0,
"limit": 50,
"next": 1459904731530238
}
},
"data": {
"maxEventId": 1459904731530238,
"colAnnotations": {},
"states": {
"488682752": {
"vis": 1,
"collectionId": "161764560",
"content": {
"generator": {
"id": "livefyre.com"
},
"bodyHtml": "<p>Nice!</p>",
"id": "488682752",
"authorId": "system@labs.fyre.co",
"parentId": "",
"updatedAt": 1459904731,
"annotations": {
"moderator": true
},
"createdAt": 1459904731
},
"source": 5,
"lastVis": 0,
"type": 0,
"event": 1459904731530238
}
},
"collections": {
"161764560": {
"url": "http://designer-app.livefyre.com/app/1459903771306",
"articleIdentifier": "designer-app-1459903771306",
"title": "Ben Activity Stream API Test",
"id": "161764560",
"site": "315833"
}
},
"authors": {
"system@labs.fyre.co": {
"displayName": "system",
"tags": [],
"profileUrl": "",
"avatar": "https://secure.gravatar.com/avatar/e23293c6dfc25b86762b045336233add/?s=50&d=https://dpstvy7p9whsy.cloudfront.net/a/anon/50.jpg",
"handle": "system",
"type": 1,
"id": "system@labs.fyre.co"
}
},
"annotations": {}
},
"code": 200
}
gethttps://{networkName}.bootstrap.fyre.co/api/v1.1/public/comments/ncomments/{hash}.json
This API returns content count information for a given Collection. Use this API to generate a list of counts that map to a list of articles or blog posts.
Note: There is a 2 minute caching delay between count updates, so the number of comments on the article page and those returned by API may be out of sync for a maximum of 2 minutes.
name | required | type | description |
---|---|---|---|
hash | true | string | The Base64 encoded hash of all the site-article ID pairs for which counter information should be fetched. For example: (pre-encoded) {siteId}:{articleId},{articleId}|{siteId}:{articleId}. |
Ncomments
property | type | description |
---|---|---|
status | string | |
code | number | |
data | object | |
data.site-id | object | |
data.site-id.some-article-id | object | |
data.site-id.some-article-id.feed | number | |
data.site-id.some-article-id.livefyre | number | |
data.site-id.some-article-id.total | number | |
data.site-id.some-article-id.facebook | number | |
data.site-id.some-article-id.twitter | number | |
data.site-id.some-article-id.archive | number | |
data.site-id.some-article-id.instagram | number |
{
"status": "ok",
"code": 200,
"data": {
"site-id": {
"some-article-id": {
"feed": 0,
"livefyre": 2,
"total": 2,
"facebook": 0,
"twitter": 0,
"archive": 0,
"instagram": 0
}
}
}
}