I tried to create a blog site where I can write short articles basically on Python, Linux, C programming languages and Computer Engineering. Website : http://demo.emrecetin.net/
POST /api/user
HOST: domain.com
{
"email": "EMAIL",
"password": "PASSWORD",
"fullname": "NAME SURNAME"
}
DELETE /api/user
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
PUT /api/user
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
{
"new_password": "NEW_PASSWORD",
"old_password": "OLD_PASSWORD"
}
POST /api/auth
HOST: domain.com
{
"email": "EMAIL",
"password": "PASSWORD"
}
GET /api/post?post_id=POST_ID
HOST: domain.com
GET /api/posts
HOST: domain.com
POST /api/post
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
{
"title": "ARTICLE TITLE",
"text": "ARTICLE TEXT",
"date": "2018-01-12 20:01:09.123132",
"image": "IMAGE_PATH" //Optional
}
DELETE /api/post?post_id=POST_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
POST /api/tag
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
{
"tags": "LABEL",
"post_id": "POST_ID",
}
DELETE /api/tag?tag_id=LABEL_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
{
"tags": "LABEL",
"post_id": "POST_ID",
}
GET /api/comment?post_id=POST_ID
HOST: domain.com
GET /api/comments?user_id=USER_ID
HOST: domain.com
POST /api/comment?post_id=POST_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
{
"text": "TEXT",
"date": "2018-01-12 20:01:09.123132",
}
DELETE /api/comment?comment_id=COMMENT_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
PUT /api/comment?comment_id=COMMENT_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw
Python Script that test all api