User Following

Endpoints:

GET /users/{user_id}/following

Scope: any

Retrieve a list of user objects that the specified user is following.

URL Parameters

Name Description
user_id ID of the user whose following to retrieve
Example
curl "https://api.pnut.io/v0/users/3/following?count=2" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of users

"call for example 1"

GET /users/{user_id}/followers

Scope: any

Retrieve a list of user objects that are following the specified user.

URL Parameters

Name Description
user_id ID of the user whose followers to retrieve
Example
curl "https://api.pnut.io/v0/users/@shawn/followers?count=2" \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns a list of users

"call for example 2"

PUT /users/{user_id}/follow

Token: user

Scope: follow

Follow a user.

URL Parameters

Name Description
user_id ID of the user to follow
Example
curl "https://api.pnut.io/v0/users/246/follow" \
    -X PUT \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns the followed user

"call for example 3"

DELETE /users/{user_id}/follow

Token: user

Scope: follow

Unfollow a user.

URL Parameters

Name Description
user_id ID of the user to unfollow
Example
curl "https://api.pnut.io/v0/users/246/follow" \
    -X DELETE \
    -H "Authorization: Bearer ${ACCESS_TOKEN}" \
    -H "X-Pretty-Json: 1"

Returns the unfollowed user

"call for example 4"