Skip to content

Retrieve Follow by ID

Fraser Redford edited this page Apr 15, 2021 · 1 revision

GET /author/<str:author_id>/followers/<str:foreign_id>

Retrieves the follow object if the author foreign_id follows the author author_id, regardless of whether or not they are friends.

Request Header

Basic authorization (base64 encoded username:password):
--header "Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ=="

or token authorization is required:
--header "Authorization: Token 9d9ed917fe1ead2d1e27ac7dc233348ed2e3d4c0"

Request Body

No Body Required

Sample Response

{
    "type": "Follow",
    "summary": "Jeff wants to follow Jim",
    "actor": {
        "type": "author",
        "id": "https://team6-project-socialdistrib.herokuapp.com/author/21d2d52bf3c34b84a45951d53b472a08",
        "host": "https://team6-project-socialdistrib.herokuapp.com/",
        "displayName": "Jeff",
        "url": "https://team6-project-socialdistrib.herokuapp.com/author/21d2d52bf3c34b84a45951d53b472a08",
        "github": "https://github.com/Jeff"
    },
    "object": {
        "type": "author",
        "id": "https://team6-project-socialdistrib.herokuapp.com/author/6978b496f79d59fa9aa9648bf88dbaaf",
        "host": "https://team6-project-socialdistrib.herokuapp.com/",
        "displayName": "Jim",
        "url": "https://team6-project-socialdistrib.herokuapp.com/author/6978b496f79d59fa9aa9648bf88dbaaf",
        "github": "https://github.com/Jim"
    }
}

Response Codes

  • 200 OK for a successful return of a list
  • 400 BAD REQUEST if information is missing in the request
  • 403 FORBIDDEN if the requesting user is not authenticated

Clone this wiki locally