Get All Discussions
This endpoint retrieves all discussions.
info
This operation requires authentication only if content_availability
community option is false
HTTP Request
GET /api/v2/discussion/
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
limit | query | integer | false | Number of results to return per page. |
offset | query | integer | false | The initial index from which to return the results. |
ordering | query | string | false | Which field to use when ordering the results. For sorting desc use - in front of the field name. Default to -added_at. Available values are added_at, last_activity_at |
Example Request
- JavaScript
- Bash
const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};
fetch('/api/v2/discussion/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
# You can also use wget
curl -X GET /api/v2/discussion/ \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access_token}'
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | none | Inline |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» count | integer | true | none | Total results count |
» next | string¦null | false | none | Next page url |
» previous | string¦null | false | none | Previous page url |
» results | list(Discussion) | true | none | List of results |
Example responses
- 200
{
"count": 123,
"next": "string",
"previous": "string",
"results": [
{
"id": 0,
"categories": [
{
"id": 0,
"tags": [],
"followed": false,
"order": 123,
"name": "string",
"name_synonyms": "string",
"slug": "string",
"slogan": "string",
"html_info": "string",
"seo_title": "string",
"seo_description": "string",
"auto_follow": "none",
"active": true,
"image_original": "string",
"image_bigger": "string",
"image_big": "string",
"image_medium": "string",
"image_small": "string",
"emotional_image_original": "string",
"emotional_image_position": 0,
"lastmod_datetime": "2019-08-24T14:15:22Z",
"stream_order_by": "recent",
"followers_counter": 13
}
],
"medias": [
{
"id": 0,
"added_at": "2019-08-24T14:15:22Z",
"type": "url",
"title": "string",
"description": "string",
"url": "https://example.com",
"image": "string",
"image_width": 0,
"image_height": 0,
"order": 0,
"embed": {
"id": 0,
"embed_type": "string",
"embed_id": "string",
"url": "string",
"metadata": {}
}
}
],
"location": {
"location": "string",
"lat": 0,
"lng": 0
},
"poll": {
"id": 0,
"title": "string",
"multiple_choices": true,
"added_at": "2019-08-24T14:15:22Z",
"modified_at": "2019-08-24T14:15:22Z",
"closed": true,
"expiration_at": "2019-08-24T14:15:22Z",
"hidden": false,
"choices": [
{
"id": 0,
"choice": "string",
"order": 0,
"added_at": "2019-08-24T14:15:22Z",
"deleted": "string",
"vote_count": 0,
"voted": true
}
]
},
"last_activity_at": "2019-08-24T14:15:22Z",
"last_edited_at": null,
"author": {
"id": 0,
"username": "string",
"real_name": "string",
"date_joined": "2019-08-24T14:15:22Z",
"bio": "string",
"location": "string",
"location_lat_lng": "string",
"position_lat_lng": "string",
"date_of_birth": "string",
"description": "string",
"gender": "Male",
"website": "https://example.com",
"avatar": "string",
"cover": "string",
"ext_id": "string",
"tags": [],
"reputation": 111,
"followings_counter": 1,
"followers_counter": 1,
"posts_counter": 2,
"discussions_counter": 4,
"statuses_counter": 1,
"polls_counter": 6
},
"added_at": "2019-08-24T14:15:22Z",
"html": "string",
"summary": "string",
"deleted": true,
"collapsed": false,
"comment_count": 0,
"vote_count": "string",
"voted": false,
"followed": false,
"suspended": true,
"flag_count": 0,
"share_count": 0,
"addressing": [],
"title": "string",
"slug": "string",
"view_count": 1,
"follower_count": "string"
}
]
}