API v1 GET followinfo [self userid] followings - SpaceFlow/Backend GitHub Wiki
GET /v1/followinfo/:userid/followings
Returns an array of the users :userid is following
Required scope: [None]
Authorisation needed: yup
Parameters:
Type | name | description | required |
---|---|---|---|
URL Parameter | limit | Amount of the returned users. Max: 100 | No (25) |
URL Parameter | offset | Offset of the returned users. | Nope, but you should implement this |
URL Parameter | orderby | "newest" or "oldest" | Nope (newest) |
Potential Errors:
Error Code | HTTP Status Code | Description |
---|---|---|
APP_ID_NOT_FOUND | 400 | The API Server couldn't find the to the token associated application id |
REQUIRED_SCOPE_NOT_SET | 400 | The token wasn't created with the scope required for this endpoint |
TOKEN_NOT_FOUND | 400 | An invalid token was supplied in the authorisation header |
AUTHORISATION_HEADER_NOT_PRESENT | 400 | should be self-explanatory |
Example:
GET https://api.spaceflow.io/v1/followinfo/133742069/followings?limit=10&offset=10&orderby=newest
Returns:
{
"type": "follows",
"results": numeric count of the supplied results,
"offset": numeric count of the offset,
"order": "ASC" or "DESC",
"user": user object of yourself
"follows": [{userobject1}, {userobject2}, {userobject3}],
"error": null
}
If the user isn't following anyone, the follows Array will just be empty
Note: instead of supplying a numeric user id, you can also supply the word "self" in order to query the information of the user the oauth token is associated with:
GET /v1/followinfo/self/followings