GET /api/tags
No authentication required, return all a List of Tags
GET /api/articles
No authentication required, return all a List of Articles
GET /api/articles/:slug
No authentication required, return a single Article
Update:
- need to return
isFollowing
andisFavorited
for the current user - check
favoritesCount
, currently its not properly => need to update - return
avatar
for the author
POST /api/articles
Authentication required, returns the created Article
BODY
{
"title" : "If we quantify the alarm, we can get to the FTP pixel through the online SSL interface!",
"description": "Omnis perspiciatis qui quia commodi sequi modi. Nostrum quam aut cupiditate est facere omnis possimus. Tenetur similique nemo illo soluta molestias facere quo. Ipsam totam facilis delectus nihil quidem",
"body": "Body Quia quo iste et aperiam voluptas consectetur a omnis et.\\nDolores et earum consequuntur sunt et.\\nEa nulla ab voluptatem dicta vel",
"tagList": [
"reactjs",
"angularjs",
"dragons"
], // optional
}
PATCH /api/articles/:slug
Authentication required, returns the updated Article
BODY
{
"title" : "If we quantify the alarm, we can get to the FTP pixel through the online SSL interface!",
"description": "Omnis perspiciatis qui quia commodi sequi modi. Nostrum quam aut cupiditate est facere omnis possimus. Tenetur similique nemo illo soluta molestias facere quo. Ipsam totam facilis delectus nihil quidem",
"body": "Body Quia quo iste et aperiam voluptas consectetur a omnis et.\\nDolores et earum consequuntur sunt et.\\nEa nulla ab voluptatem dicta vel",
"tagList": [
"reactjs",
"angularjs",
"dragons"
], // optional
}
DELETE /api/articles/:slug
Authentication required, returns empty response
POST /api/articles/:slug/favorite
Authentication required, returns the Article
DELETE /api/articles/:slug/favorite
POST /api/users/login
Authentication required, returns a User
BODY
{
"email": "email@gmail.com",
"password": "1234abcd"
}
POST /api/users
Authentication required, returns a User
BODY
{
"email" : "test10@gmail.com",
"username": "test10",
"password": "123123"
}
GET /api/users/me
Authentication required, returns the current User
PATCH /api/users/me
GET /api/profiles/:username
Authentication optional, returns a Profile
POST /api/profiles/:username/follow
Authentication required, returns a Profile
DELETE /api/profiles/:username/follow
Authentication required, returns a Profile