Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

GET /feed

Browse activity feeds

Example URI

http://example.com/restful_api/feed?page=1&limit=10

Parameters

ParameterTypeRequire ?Description
pagenumbernoPaging the result items
limitnumbernoLimit the result items
modulestringnoSupport get feeds on module items
item_idnumbernoSupport get feeds on module items
user_idnumbernoSupport get feeds on users profile

Response

{
  "status": "success",
  "data": [
    {
      "feed_id": "53",
      "app_id": "0",
      "privacy": "0",
      "privacy_comment": "0",
      "type_id": "custom",
      "user_id": "1",
      "parent_user_id": "0",
      "item_id": "1",
      "time_stamp": "1480906860",
      "feed_reference": "0",
      "parent_feed_id": "0",
      "parent_module_id": null,
      "time_update": "1480906860",
      "content": null,
      "total_view": "0",
      "can_post_comment": true,
      "feed_link": "http://example.com/admin/",
      "feed_title": "",
      "feed_info": "updated his/her profile information.",
      "feed_icon": "<img src=\"http://example.com/PF.Base/theme/frontend/default/style/default/image/misc/page_edit.png\">",
      "enable_like": false,
      "likes": [],
      "total_likes": 0,
      "feed_is_liked": false,
      "feed_like_phrase": ""
    },
    {
      "feed_id": "49",
      "app_id": "0",
      "privacy": "0",
      "privacy_comment": "0",
      "type_id": "user_status",
      "user_id": "1",
      "parent_user_id": "0",
      "item_id": "15",
      "time_stamp": "1480678171",
      "feed_reference": "0",
      "parent_feed_id": "0",
      "parent_module_id": null,
      "time_update": "1480678171",
      "content": null,
      "total_view": "0",
      "can_post_comment": true,
      "feed_status": "Good morning everyone",
      "feed_title": "",
      "feed_link": "http://example.com/admin/?status-id=15",
      "feed_is_liked": false,
      "feed_icon": "<img src=\"http://example.com/PF.Base/theme/frontend/default/style/default/image/misc/application_add.png\">",
      "enable_like": true,
      "likes": [],
      "feed_like_phrase": ""
    },
  ],
  "messages": []
}

POST /feed

Create a new activity feed

Example URI

http://example.com/restful_api/feed

Parameters

ParameterTypeRequire ?Description
idnumberyesUser Id
val[user_status]stringyesFeed content
val[privacy]numbernoFeed privacy id
val[privacy_list]arraynoList of custom groups id
user_idnumbernoSupport post feed on user profile
modulestringnoSupport post feed to module item
item_idnumbernoSupport post feed to module item
custom_pages_post_as_pagenumbernoSupport post feed as page

Response

 {
   "status": "success",
   "data": {
     "feed_id": "4",
     "privacy": "1",
     "privacy_comment": "0",
     "type_id": "pages_comment",
     "user_id": "8",
     "parent_user_id": "2",
     "item_id": "2",
     "time_stamp": "1480908963",
     "parent_feed_id": "0",
     "parent_module_id": null,
     "time_update": "1480908963",
     "content": null,
     "total_view": "0",
     "can_post_comment": true,
     "feed_status": "Hi all, we will have a party tonight!!!",
     "feed_link": "http://example.com/pages/2/wall/comment-id_2/",
     "feed_is_liked": false,
     "feed_icon": "<img src=\"http://example.com/PF.Base/theme/frontend/default/style/default/image/misc/comment.png\">",
     "enable_like": true,
     "likes": [],
     "feed_like_phrase": ""
   },
   "messages": [
     "Feed comment successfully added."
   ]
 }

GET /feed/:id

Get information of a specific feed

Example URI

http://example.com/restful_api/feed/1

Parameters

ParameterTypeRequire ?Description
idnumberyesFeed id

Response

 {
  "status": "success",
  "data": {
    "feed_id": "55",
    "app_id": "0",
    "privacy": "0",
    "privacy_comment": "0",
    "type_id": "blog",
    "user_id": "1",
    "parent_user_id": "0",
    "item_id": "3",
    "time_stamp": "1480909502",
    "parent_feed_id": "0",
    "parent_module_id": null,
    "time_update": "1480909502",
    "content": null,
    "total_view": "0",
    "can_post_comment": true,
    "feed_title": "Santa Claus is Coming to Town [lyrics]",
    "feed_info": "posted a blog.",
    "feed_link": "http://example.com/blog/3/santa-claus-is-coming-to-town-lyrics/",
    "feed_is_liked": false,
    "feed_icon": "<img src=\"http://example.com/PF.Base/theme/frontend/default/style/default/image/module/blog.png\">",
    "enable_like": true,
    "likes": [],
    "feed_like_phrase": ""
  },
  "messages": []
}

PUT /feed/:id

Update a user status feed

Example URI

http://example.com/restful_api/feed/1

Parameters

ParameterTypeRequire ?Description
idnumberyesFeed Id
val[user_status]stringnoUpdated status
val[privacy]numbernoPrivacy id
val[privacy_list]arraynoList of custom groups id

Response

 {
  "status": "success",
  "data": {
    "feed_id": "61",
    "app_id": "0",
    "privacy": "4",
    "privacy_comment": "0",
    "type_id": "user_status",
    "user_id": "1",
    "parent_user_id": "0",
    "item_id": "17",
    "time_stamp": "1480995719",
    "feed_reference": "0",
    "parent_feed_id": "0",
    "parent_module_id": null,
    "time_update": "1480995719",
    "content": null,
    "total_view": "0",
    "can_post_comment": true,
    "feed_status": "Hello December",
    "feed_title": "",
    "feed_link": "http://example.com/admin/?status-id=17",
    "feed_is_liked": false,
    "feed_icon": "<img src=\"http://example.com/PF.Base/theme/frontend/default/style/default/image/misc/application_add.png\">",
    "enable_like": true,
    "likes": [],
    "feed_like_phrase": ""
  },
  "messages": [
    "Feed successfully updated."
  ]
}

DELETE /feed/:id

Delete a specific feed

Example URI

http://example.com/restful_api/feed/1

Parameters

ParameterTypeRequire ?Description
idnumberyesFeed id

Response

{
  "status": "success",
  "data": [],
  "messages": [
    "Feed successfully deleted."
  ]
} 

POST /feed/share

Share a feed item to your wall or your friends walls

Example URI

http://example.com/restful_api/feed/share

Parameters

ParameterTypeRequire ?Description
val[item_id]numberyesItem id of the feed
val[module_id]stringyesModule id of the feed
val[content]stringyesMessage for sharing
val[type]numberyesOptions: 1 - share on your wall. 2 - share on your friends walls
val[friends]arrayyesList of friends id incase share feed on friends walls

Response

 {
  "status": "success",
  "data": [
    {
      "feed_id": "65",
      "app_id": "0",
      "privacy": "0",
      "privacy_comment": "0",
      "type_id": "feed_comment",
      "user_id": "1",
      "parent_user_id": "7",
      "item_id": "5",
      "time_stamp": "1480997941",
      "feed_reference": "0",
      "parent_feed_id": "62",
      "parent_module_id": "PHPfox_Videos",
      "time_update": "1480997941",
      "content": null,
      "total_view": "0",
      "can_post_comment": true,
      "feed_status": "great Song for Christmas",
      "feed_link": "http://example.com/profile-7/?comment-id=5",
      "feed_is_liked": false,
      "feed_icon": "<img src=\"http://example.com/PF.Base/theme/frontend/default/style/default/image/misc/comment.png\">",
      "enable_like": true,
      "likes": [],
      "feed_like_phrase": ""
    }
  ],
  "messages": [
    "Successfully shared this item on your friends wall."
  ]
}
  • No labels