Skip to content

Inbox API

Fraser Redford edited this page Mar 29, 2021 · 9 revisions

Inbox

List

GET author/<str:author_id>/inbox This will return all items sent to the author's inbox.

Sample Request

No body is required

Sample Response

{ "type": "inbox", "author": "http://localhost:8000/author/42d2d52bf6c34b84a44951d53b472a08", "items": [ { "type": "Follow", "summary": "ArthurShelby wants to follow TommyShelby", "actor": { "type": "author", "id": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d", "host": "team6-project-socialdistrib.herokuapp.com", "displayName": "ArthurShelby", "url": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d", "github": "http://github.com/ArthurShelby" }, "object": { "type": "author", "id": "https://team6-project-socialdistrib.herokuapp.com/author/42d2d52bf6c34b84a44951d53b472a08", "host": "localhost:8000", "displayName": "TommyShelby", "url": "https://team6-project-socialdistrib.herokuapp.com/42d2d52bf6c34b84a44951d53b472a08", "github": "https://github.com/TommyShelby" } }, { "@context": "https://www.w3.org/ns/activitystreams", "summary": "ArthurShelby Likes your post", "type": "like", "author": { "type": "author", "id": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d", "host": "team6-project-socialdistrib.herokuapp.com", "displayName": "ArthurShelby", "url": "https://team6-project-socialdistrib.herokuapp.com/author/aaa41dc8b93f4330880b0fb30380c88d", "github": "http://www.github.com/ArthurShelby" }, "object": "https://team6-project-socialdistrib.herokuapp.com/author/42d2d52bf6c34b84a44951d53b472a08/posts/619900d6c2544c9899ab7f56452929db" } ] }

Delete

DELETE author/<str:author_id>/inbox

Sample Request

No body is required

Sample Response

No body is sent.

403 - The requesting user is not allowed to delete the inbox of this author. 200 - The requesting user deleted all items in the inbox of the provided author.

Clone this wiki locally