Skip to content

API Documentation

Ykk2 edited this page Dec 7, 2022 · 37 revisions

USER

Get current User

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Log in a User

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Sign in a User

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Update user

  • Require Authentication:

  • Request

    • Method: PUT

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Delete user

  • Require Authentication:

  • Request

    • Method: DELETE

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

STORY

Get all stories

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Get all stories by authors the user is following

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Get all stories by tag

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Get story by id

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Get top 6 stories by number of claps

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Create a new story

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Update story by story id

  • Require Authentication:

  • Request

    • Method: PUT

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Delete story

  • Require Authentication:

  • Request

    • Method: DELETE

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

RESPONSES

Get all responses by story id

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Get all responses by user id

  • Require Authentication:

  • Request

    • Method: GET

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Create a response by story id

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Update a response by response id

  • Require Authentication:

  • Request

    • Method: PUT

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Delete response

  • Require Authentication:

  • Request

    • Method: DELETE

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Follows

Add new follows by user id

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Headers:

      • Content-Type: application/json
    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Update follows by user id

  • Require Authentication:

  • Request

    • Method: PUT

    • URL:

    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Claps

Add claps by story id and user id

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Add claps by response id and user id

  • Require Authentication:

  • Request

    • Method: POST

    • URL:

    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Delete claps by story id and user id

  • Require Authentication:

  • Request

    • Method: PUT

    • URL:

    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Delete claps by response id and user id

  • Require Authentication:

  • Request

    • Method: PUT

    • URL:

    • Body:

  • Successful Response

    • Status Code:

    • Headers:

      • Content-Type: application/json
    • Body:

Clone this wiki locally