Demo Blog.Emrecetin.net

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/

API References

User Create

POST /api/user
HOST: domain.com
{
    "email": "EMAIL",
    "password": "PASSWORD",
    "fullname": "NAME SURNAME"
}

User Delete

DELETE /api/user
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

User Change Password

PUT /api/user
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

{
    "new_password": "NEW_PASSWORD",
    "old_password": "OLD_PASSWORD"
}

Auth

POST /api/auth
HOST: domain.com

{
    "email": "EMAIL",
    "password": "PASSWORD"
}

Post Get

GET /api/post?post_id=POST_ID
HOST: domain.com

Post Get All

GET /api/posts
HOST: domain.com

Post Create

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
}

Post Delete

DELETE /api/post?post_id=POST_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

Tag Create

POST /api/tag
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

{
    "tags": "LABEL",
    "post_id": "POST_ID",
}

Tag Delete

DELETE /api/tag?tag_id=LABEL_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

{
    "tags": "LABEL",
    "post_id": "POST_ID",
}

Comment Get (all comments a post)

GET /api/comment?post_id=POST_ID
HOST: domain.com

Comment Get (all comments a user)

GET /api/comments?user_id=USER_ID
HOST: domain.com

Comment Create

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",
}

Comment Delete

DELETE /api/comment?comment_id=COMMENT_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

Comment Publish

PUT /api/comment?comment_id=COMMENT_ID
HOST: domain.com
X-Token: as8as9-asdas65-zxx4c8-qweqw

Test Script

Python Script that test all api

test_script