Skip to content

Latest commit

 

History

History
96 lines (67 loc) · 1.04 KB

API.md

File metadata and controls

96 lines (67 loc) · 1.04 KB

API Endpoints

Tokens

Create new token

POST http://localhost:5000/api/tokens

Parameters:

Basic-auth login & password

Revoke token

DELETE http://localhost:5000/api/tokens

Parameters:

Basic-auth login & password

Users

Get all users

GET http://localhost:5000/api/users

Token required

Get one user

GET http://localhost:5000/api/users/1

Token required

Get followers for user

GET http://localhost:5000/api/users/1/followers

Token required

Get followed for user

GET http://localhost:5000/api/users/1/followed

Token required

Create new user

POST http://localhost:5000/api/users

Token not required

Parameters:

{
    "username": "blah",
    "password": "blah",
    "email": "[email protected]",
    "about_me": "cool guy"
}

Update user

PUT http://localhost:5000/api/users/1

Token required

Parameters:

{
    "username": "blah",
    "password": "blah",
    "email": "[email protected]",
    "about_me": "cool guy"
}