| currently under construction |
1. Getting started
The home section will show the users, which of the user that he is following has posted new stuff.
2. General use
API Path |
/API/feed/home.php |
Request |
GET |
requires login |
true |
needs database |
true |
needs config |
true |
output |
JSON |
3. Input
Takes 1 URL encoded parameter:
offset |
(optional) scroll offset for the input |
3.1. offset
The offset will offset all the results by a given value. If no offset is specified, it will be 0
3.2. Example urls:
https://localhost/API/feed/home.php https://localhost/API/feed/home.php?offset=50
4. Output
4.1. Default
List of posts, that are posted from the user that the user is following. The amount will be either limited by the dataset or with the config (respLength)
4.1.1. Example
{
"posts" : [(1)
{
"title": "Test",
"description": "",
"postId": "zu0dPMs479S17Qw6ZO9pAM33WGpR8YSMJlEGfMXUyChmNj3mWMm7rGVE2uRf",
"path": "zu0dPMs479S17Qw6ZO9pAM33WGpR8YSMJlEGfMXUyChmNj3mWMm7rGVE2uRf.jpg",
"hasLiked": false,
"likes": "1",
"postedFrom": "mctomspdo",
"postedFromImage": "QD3oEE2UZlJW6IIdhUQw.jpg",
"postedFromID": "UzoyQ28qr23O2Af-TlXot56i40SJxL",
"comments": "0"
}
]
}
| 1 | Array of posts |
4.2. Default (no posts)
If there are no posts available for the user, the server will respond with the following:
{
"posts" : "no posts yet"
}
4.3. Error
If the request fails, the page will respond with the following:
{
"error" : (1)
}
| 1 | Error message |