Fetch thread data
Please use this (http://quotableqatar.com/mobile_api/thread_data) API for accessing endpoint of post thread data
Description of the data structure
1. The `post` variable contains the post data of the thread (The main post on the thread page)
2. The variable `next` contains the responses to the thread (Each post data in this array can also contain `replys` variable with first few replys to it)
3. A variable named `prev` contains the parent chain of the current thread (Only if there are parent posts)
4. If the variable `can_reply` has a value (false), it means that the current user cannot reply to this post
GET parameters
Field | Value | Remarks |
---|---|---|
session_id | Access token ID | E.g. de25cc16eb00960f076... |
thread_id | Thread int ID | E.g. 123456 (ID of any post to view replies and all details) |
Success response
{
"code": 200,
"data": {
"can_reply": true,
"post":{
"id": 41,
"user_id": 7,
"text": "werwe",
"type": "text",
"replys_count": "1",
"reposts_count": "0",
"likes_count": "0",
"status": "active",
"thread_id": 40,
"target": "pub_reply",
"og_data": "",
"time": "24 seconds ago",
"advertising": false,
"time_raw": "1605613164",
"og_text": "werwe",
"og_image": "statics/img/logo.png",
"url": "http://colibri.loc/thread/41",
"can_delete": true,
"media":[],
"is_owner": true,
"has_liked": false,
"has_saved": false,
"has_reposted": false,
"reply_to":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"owner":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"offset_id": 41
},
"next":[
{
"id": 42,
"user_id": 7,
"text": "werwe",
"type": "text",
"replys_count": "0",
"reposts_count": "0",
"likes_count": "0",
"status": "active",
"thread_id": 41,
"target": "pub_reply",
"og_data": "",
"time": "18 seconds ago",
"replys":[],
"advertising": false,
"time_raw": "1605613170",
"og_text": "werwe",
"og_image": "statics/img/logo.png",
"url": "http://colibri.loc/thread/42",
"can_delete": true,
"media":[],
"is_owner": true,
"has_liked": false,
"has_saved": false,
"has_reposted": false,
"reply_to":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"owner":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"offset_id": 42
}
],
"prev":[
{
"id": 40,
"user_id": 7,
"text": "erter",
"type": "text",
"replys_count": "1",
"reposts_count": "0",
"likes_count": "0",
"status": "active",
"thread_id": 0,
"target": "publication",
"og_data": "",
"time": "28 minutes ago",
"advertising": false,
"time_raw": "1605611503",
"og_text": "erter",
"og_image": "statics/img/logo.png",
"url": "http://colibri.loc/thread/40",
"can_delete": true,
"media":[],
"is_owner": true,
"has_liked": false,
"has_saved": false,
"has_reposted": false,
"reply_to":[],
"owner":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"offset_id": 40
}
]
}
}
Error responses
{
"code": 401,
"data": [],
"message": "Unauthorized Access"
}
{
"code": 400,
"message": "Thread ID is missing or invalid. Please check your details",
"data": []
}
Load thread replys
Please use this (http://quotableqatar.com/mobile_api/thread_replys) API for accessing endpoint of post thread replys
Description of the data structure
Please note that each post item in `data` array can also contain `replys` variable with first few replys to it (see above)
GET parameters
Field | Value | Remarks |
---|---|---|
session_id | Access token ID | E.g. de25cc16eb00960f076... |
thread_id | Thread int ID | E.g. 123456 (ID of any post to view replies and all details) |
page_size | Total post limit for each request (Optional) | Recommended: 20 |
offset | Last post offset ID | This variable must be the id of the last post (Reply) object in the `next` array (see above) |
Success response
{
"message": "Replies fetched successfully",
"code": 200,
"data":[
{
"id": 44,
"user_id": 7,
"text": "sdfrw",
"type": "text",
"replys_count": "0",
"reposts_count": "0",
"likes_count": "0",
"status": "active",
"thread_id": 41,
"target": "pub_reply",
"og_data": "",
"time": "50 minutes ago",
"replys":[],
"advertising": false,
"time_raw": "1605617624",
"og_text": "sdfrw",
"og_image": "statics/img/logo.png",
"url": "http://colibri.loc/thread/44",
"can_delete": true,
"media":[],
"is_owner": true,
"has_liked": false,
"has_saved": false,
"has_reposted": false,
"reply_to":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"owner":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"offset_id": 44
},
{
"id": 43,
"user_id": 7,
"text": "sdf",
"type": "text",
"replys_count": "0",
"reposts_count": "0",
"likes_count": "0",
"status": "active",
"thread_id": 41,
"target": "pub_reply",
"og_data": "",
"time": "50 minutes ago",
"replys":[],
"advertising": false,
"time_raw": "1605617612",
"og_text": "sdf",
"og_image": "statics/img/logo.png",
"url": "http://colibri.loc/thread/43",
"can_delete": true,
"media":[],
"is_owner": true,
"has_liked": false,
"has_saved": false,
"has_reposted": false,
"reply_to":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"owner":{"id": 7, "url": "http://colibri.loc/@dan_kassing", "avatar": "http://colibri.loc/upload/default/avatar.png",…},
"offset_id": 43
}
]
}
Error responses
{
"code": 401,
"data": [],
"message": "Unauthorized Access"
}
{
"message": "No data found",
"code": 404,
"data": []
}
{
"code": 400,
"message": "Thread ID is missing or invalid. Please check your details",
"data": []
}
{
"code": 400,
"message": "The paging offset ID is missing or invalid. Please check your details",
"data": []
}