Skip to content

Instantly share code, notes, and snippets.

@mykhailo-riabokon
Last active January 9, 2019 20:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mykhailo-riabokon/d44d9349537b5a5dfcec953f2bcbb5ab to your computer and use it in GitHub Desktop.
Save mykhailo-riabokon/d44d9349537b5a5dfcec953f2bcbb5ab to your computer and use it in GitHub Desktop.
WellDone API V2

Posts

GET /posts - get all posts

Response body

  [
    {
      "id": "1",
      "title": "My awesome post"
    },
    {
      "id": "2",
      "title": "Not as good as first one"
    }
  ]

POST /posts - create a new post

Request body

  {
    "title": "My awesome post",
    "content": "All words I know",
    "previewImg": "https://gph.is/V4zGWG",
    "author": "John Smith"
  }

Response body - success

  {
    "id": "1"
  }

Response body - failure

  {
    "message": "Something went wrong",
    "success": false
  }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment