Skip to content
epicmonkey edited this page Sep 28, 2013 · 7 revisions

For API examples you can follow this page.

Timeline

  • GET /v1/timeline/:username - returns all posts from user
  • GET /v1/timeline/everyone - returns all posts from everyone
  • GET /v1/timeline - returns river of news for auth user
  • POST /v1/timeline/:timelineId/subscribe
  • POST /v1/timeline/:timelineId/unsubscribe
  • GET /v1/timeline/:timelineId/subcribers

Posts

  • GET /v1/posts/:postId
  • DELETE /v1/posts/:postId
  • PATCH /v1/posts/:postId
  • GET /v1/posts/:postId/comments # not implemented yet
  • GET /v1/posts/:postId/likes # not implemented yet
  • POST /v1/posts
  • POST /v1/posts/:postId/like
  • POST /v1/posts/:postId/unlike

Comments

  • POST /v1/comments
  • DELETE /v1/comments/:commentId
  • PATCH /v1/comments/:commentId

Users and groups

  • GET /v1/users/:userId
  • GET /v1/users/:username/subscriptions
  • GET /v1/users/:username/subscribers - returns Posts timeline subscribers
  • DELETE /v1/users/:username/subscribers/:userId - unsubscribe :userId from :username
  • POST /v1/users/:username/subscribers/:userId/admin - add admin rights for :userId to administrate :username
  • POST /v1/users/:username/subscribers/:userId/unadmin - remove admin rights from :userId to administrate :username
  • POST /v1/users # it's a dup of sign up
  • DELETE /v1/users/:userId
  • GET /v1/users/:userId/feedinfo # dup of first method
  • PATCH /v1/users/:userId

Statistics

  • GET /v1/top/:category - returns an array of users with the highest statistics in a category. Category could be one of { "posts", "likes", "discussions", "subscriptions", "subscribers" }

Tags

  • GET /v1/tags - returns list of tags sorted by frequency

Others

  • GET /v1/whoami - returns current user info

SEARCH API

  • GET /v1/search/:query - returns all posts which equals query.

Search query is a string of keywords. Keywords:

  • intitle:query (search query in post's body)
  • incomment:query (search query in comment's body)
  • from:username (search by username)
  • AND
  • OR
  • ' ' (whitespace)

If you enter a search phrase that does not match keywords above, search engine will search it in post's and comment's bodies.

Example: this AND intitle:that OR incomment:comment from:user. Search engine will return posts that contain 'that' in post's body and 'this' in post's or comment's body, also it will return posts that contain 'comment' in comment's body and written by user 'user'.

Clone this wiki locally