currently under construction

1. Getting started

This will respond with the newest posts on the platform

2. General use

API Path

/API/feed/newest.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

Lists of the newest posts from the database. 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, it will respond with the following error:

{
    "error" : (1)
}
1 Error message