Documentation about the “Publication” API

All publication are accessible in our public API. So we don’t change it without changing the API version.

Base Schema

Key Type Example
_id String
"4e43f42909e50d0e9f00005d"
_type String
"Publication"
client_id String
"4e43f42909e50d0e9f000062"
project_id String
"4e43f42909e50d0e9f000061"
pub_account_id String
"4e43f42909e50d0e9f00005e"
resource_id String
"4e43f42909e50d0e9f00005f"
message String
"this is a great one !"
keywords String
"foo,bar"
url String
"http://example.com/my/awesome/publication"
nb_comments Fixnum
0
scheduled Boolean
true
status String
"unpublished"
title String
"testing"
parent_ids Array
[
  "4e43f42909e50d0e9f00005c"
]
child_ids Array
[
  "4e43f42909e50d0e9f00006a",
  "4e43f42909e50d0e9f00006b",
  "4e43f42909e50d0e9f00006c"
]
scheduled_at String
"2011-06-24T12:00:00Z"
created_at String
"2011-06-14T14:09:11Z"
updated_at String
"2011-06-15T15:19:32Z"

Publication Types

Available Publications types :

Examples

Publications::DailyMotion

{
  "_id": "4e43f42a09e50d0e9f000063",
  "_type": "Publications::DailyMotion",
  "resource_id": "4e43f42a09e50d0e9f000069",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f42a09e50d0e9f000064",
  "title": "DailyMotion Publication",
  "message": "How to swear like a French",
  "nb_comments": 123,
  "scheduled": false,
  "status": "published",
  "url": "http://www.dailymotion.com/video/how-to-swear-like-a-french",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}

Publications::FacebookTab

{
  "_id": "4e43f42b09e50d0e9f000069",
  "_type": "Publications::FacebookTab",
  "resource_id": "4e43f42b09e50d0e9f00006a",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f42b09e50d0e9f00006a",
  "message": "I am on a Facebook Tab !",
  "nb_comments": 421,
  "scheduled": false,
  "status": "published",
  "title": "A chat",
  "url": "http://facebook.com/profile.php?id=110326788982420",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}

Publications::FacebookWall

Additional fields

nb_likes
Fixnum - Nb of likes on Facebook
post_id
Fixnum - Post identifier on Facebook
{
  "_id": "4e43f42c09e50d0e9f00006f",
  "_type": "Publications::FacebookWall",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f42c09e50d0e9f000070",
  "resource_id": "4e43f42c09e50d0e9f000075",
  "message": "I'm on a Facebook Wall !",
  "nb_comments": 0,
  "nb_likes": 0,
  "post_id": "4407212776_1512510239",
  "scheduled": true,
  "status": "unpublished",
  "title": "A chat",
  "url": "http://www.facebook.com/110326788982420/posts/110326788982420_107896399246371",
  "scheduled_at": "2011-07-11T17:24:28+02:00",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}

Publications::Twitter

Additional fields

status_id
Fixnum - Status id on Twitter
nb_replies
Fixnum - Count replies on Twitter
nb_retweets
Fixnum - Count retweets on Twitter
{
  "_id": "4e43f42e09e50d0e9f000085",
  "_type": "Publications::Twitter",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f42e09e50d0e9f000086",
  "resource_id": "4e43f42b09e50d0e9f00006a",
  "message": "testing again",
  "nb_comments": 0,
  "nb_replies": 0,
  "nb_retweets": 12,
  "scheduled": false,
  "status_id": "5646215277",
  "status": "published",
  "title": "twitter Publication",
  "url": "http://twitter.com/Safarilefilm/status/5646215277",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}

Publications::Web

{
  "_id": "4e43f42f09e50d0e9f00008b",
  "_type": "Publications::Web",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f42f09e50d0e9f00008c",
  "resource_id": "4e43f42f09e50d0e9f00008d",
  "message": "A super web publication of my awesome resource",
  "nb_comments": 0,
  "scheduled": false,
  "status": "unpublished",
  "title": "web Publication",
  "url": "http://example.com/my/super/publication",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}

Publications::Youtube

{
  "_id": "4e43f43009e50d0e9f000091",
  "_type": "Publications::Youtube",
  "resource_id": "4e43f43009e50d0e9f000090",
  "client_id": "4e43f42909e50d0e9f000062",
  "project_id": "4e43f42909e50d0e9f000061",
  "pub_account_id": "4e43f43009e50d0e9f000092",
  "message": "A great video !",
  "nb_comments": 12342,
  "scheduled": true,
  "scheduled_at": "2011-08-11T17:24:32+02:00",
  "status": "unpublished",
  "title": "Youtube Publication",
  "url": "http://www.youtube.com/watch?v=nt4rUpM19YU",
  "created_at": "2011-06-14T14:09:11Z",
  "updated_at": "2011-06-15T15:19:32Z"
}