Skip to content

Backend Endpoints

marzookh edited this page Oct 27, 2022 · 23 revisions

Overview of the APIs Endpoints

Modules URLs Methods Available
Authors /authors/ GET
Single Author /authors/{AUTHOR_ID}/ GET, POST
Followers /authors/{AUTHOR_ID}/followers GET
Follower /authors/{AUTHOR_ID}/followers/{FOREIGN_AUTHOR_ID} GET, PUT, DELETE
Post /authors/{AUTHOR_ID}/posts/{POST_ID} GET, POST, DELETE
Single Post /authors/{AUTHOR_ID}/posts/ GET, POST
Image Posts /authors/{AUTHOR_ID}/posts/{POST_ID}/image GET
Comments /authors/{AUTHOR_ID}/posts/{POST_ID}/comments GET, POST
Like (Posts) /authors/{AUTHOR_ID}/posts/{POST_ID}/likes GET
Like (Comments) /authors/{AUTHOR_ID}/posts/{POST_ID}/comments/{COMMENT_ID}/likes GET
Liked /authors/{AUTHOR_ID}/liked/ GET
Inbox /authors/{AUTHOR_ID}/inbox/ GET, POST, DELETE

Detailed Endpoint Information

Authors:

  • URL: /authors/
  • GET [local]: retrieve all profiles on the server (paginated)
    "type": "authors",
    "page": 1
    "size": 2
    "items":[
        {
            "type":"author",
            "id":"http://127.0.0.1:5454/authors/1d698d25ff008f7538453c120f581471",
            "url":"http://127.0.0.1:5454/authors/1d698d25ff008f7538453c120f581471",
            "host":"http://127.0.0.1:5454/",
            "displayName":"Greg Johnson",
            "github": "http://github.com/gjohnson",
            "profileImage": "https://i.imgur.com/k7XVwpB.jpeg"
        },
        {
            "type":"author",
            "id":"http://127.0.0.1:5454/authors/9de17f29c12e8f97bcbbd34cc908f1baba40658e",
            "host":"http://127.0.0.1:5454/",
            "displayName":"Lara Croft",
            "url":"http://127.0.0.1:5454/authors/9de17f29c12e8f97bcbbd34cc908f1baba40658e",
            "github": "http://github.com/laracroft",
            "profileImage": "https://i.imgur.com/k7XVwpB.jpeg"
        }
    ]
}

Clone this wiki locally