Skip to main content

Get Main Feed

This endpoint retrieves the main (home) feed

info

This operation requires authentication

HTTP Request

GET /api/v2/feed/

Parameters

NameInTypeRequiredDescription
limitqueryintegerfalseNumber of results to return per page.
offsetqueryintegerfalseThe initial index from which to return the results.
orderingquerystringfalseThe ordering of the feed. Default to home_stream_order_by community option

Enumerated Values

ParameterValueDescription
» orderingrecentOrder by recent creation datetime
» orderinglast_activityOrder by last activity in the Feed object

Example Request


const headers = {
'Accept':'application/json',
'Authorization': 'Bearer {access_token}'
};

fetch('/api/v2/feed/',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});

Responses

StatusMeaningDescriptionSchema
200OKnoneInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» countintegerfalsenonenone
» nextstring(uri)¦nullfalsenonenone
» previousstring(uri)¦nullfalsenonenone
» resultslist(Feed)falsenonenone

Example responses

{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"type": "discussion",
"discussion": {
"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": "string",
"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": [
{
"id": 0,
"active": true,
"type": "user",
"name": "string",
"description": "string",
"color": "string",
"visible": true,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z"
}
],
"reputation": 111,
"followings_counter": 1,
"followers_counter": 1,
"posts_counter": 2,
"discussions_counter": 5,
"statuses_counter": 1,
"polls_counter": 7
},
"added_at": "2019-08-24T14:15:22Z",
"html": "string",
"summary": "string",
"deleted": true,
"collapsed": false,
"comment_count": 0,
"vote_count": 0,
"voted": false,
"flag_count": 0,
"share_count": 0,
"addressing": [],
"title": "string",
"slug": "string",
"view_count": 0,
"follower_count": "string"
},
"seen_by_id": [
0
],
"has_boost": false,
"activities": [
{
"type": "string",
"object": {},
"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": [
{
"id": 0,
"active": true,
"type": "user",
"name": "string",
"description": "string",
"color": "string",
"visible": true,
"deleted": true,
"created_at": "2019-08-24T14:15:22Z"
}
],
"reputation": 111,
"followings_counter": 1,
"followers_counter": 1,
"posts_counter": 2,
"discussions_counter": 5,
"statuses_counter": 1,
"polls_counter": 7
},
"active_at": "2019-08-24T14:15:22Z",
"seen_by_id": [
null
]
}
]
}
]
}