API v1

API v2 documentation.

/api/v2/getPostList/<source>/<sort>[/page]

Returns a post list. source can be home, all or a sub. sort must be one of hot, top or new.

Fields returned for each post found:

  • comments: the total count of comments for that post
  • content: the content of the post if it is a text post
  • flair: the flair of the post or null if there is no flair
  • link: the post's link or null if it is a text post
  • nsfw: true if the post was marked as NSFW
  • pid: the post's unique ID
  • posted: date/time the post was posted
  • score: the sum of upvotes-downvoted
  • sub: the name of the sub the post belongs to
  • thumbnail: filename of the post's thumbnail
  • title: title of the post
  • user: name of the user that created the post
  • uid: unique identifier for user

Example response:
  {
    "posts": [
      {
        "comments": 1,
        "content": "dasdasd",
        "flair": null,
        "link": null,
        "nsfw": false,
        "pid": 13667,
        "posted": "Mon, 20 Nov 2017 04:40:00 GMT",
        "score": 1,
        "sub": "test",
        "thumbnail": "",
        "title": "Test post",
        "uid": "9dd8ec5e-4852-492a-a1ab-35eab6625280",
        "user": "Polsaker"
      },
      ....
    ],
      "status": "ok"
    }