Skip to content

Files

Latest commit

7bd9027 · Nov 19, 2022

History

History
57 lines (45 loc) · 1.31 KB

filter-post.md

File metadata and controls

57 lines (45 loc) · 1.31 KB
title method slug
GET posts
GET
/api/v1/posts/filter-post
https://yourdomain.com/api/v1/posts

Headers

Key Value Description
Content-Type application/json

Query

Fields Type Description Required
status Array Status of the post (planned / in progress / completed) false
sort String Sort type (latest / oldest / top / trending) false

Example

https://yourdomain.com/api/v1/posts?status=planned&sort=oldest

Response

Fields Type Description
status.code Integer Response code from server
status.type String Response status type (success/fail)
posts Array Array of object with filtered posts

You can see post data object in createPost.

Example

{
  "status": {
    "code": 200,
    "type": "success"
  },
  "posts": [
    {
      // post data oboject
    },
    {
      // post data oboject
    }
  ]
}