A User is the central object of the App.net APIs. User objects have usernames, follow other users, and post content for their followers.
{
"avatar_image": {
"height": 200,
"is_default": false,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
"width": 200
},
"canonical_url": "https://alpha.app.net/adnapi",
"counts": {
"followers": 1549,
"following": 12,
"posts": 115,
"stars": 4
},
"cover_image": {
"height": 260,
"is_default": true,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/kZ-JRmTbmd3WVPswTJ8Nwxzkf917InMiOiJzMyIsImIiOiJ0YXBwLWFzc2V0cyIsImsiOiJpL1UvaS9ZL1VpWW5xRFNvTUtyTEhLNXA0OHN2NkxmTmRVMC5qcGciLCJvIjoiIn0",
"width": 960
},
"created_at": "2012-08-10T22:40:12Z",
"description": {
"entities": {
"hashtags": [
],
"links": [
{
"len": 7,
"pos": 31,
"text": "App.net",
"url": "http://App.net"
}
],
"mentions": [
]
},
"html": "<span itemscope=\"https://app.net/schemas/Post\">Updating you on changes to the <a href=\"http://App.net\">App.net</a> API</span>",
"text": "Updating you on changes to the App.net API"
},
"id": "1558",
"locale": "en_US",
"name": "ADN API",
"timezone": "America/Los_Angeles",
"type": "human",
"username": "adnapi",
"verified_domain": "developers.app.net",
"follows_you": false,
"you_blocked": false,
"you_follow": false,
"you_muted": false,
"you_can_subscribe": true,
"you_can_follow": true,
"annotations": [
{
"type": "net.app.core.directory.blog",
"value": {
"url": "http://daltoncaldwell.com/"
}
}
]
}
Field | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
id |
string | Primary identifier for a user. This will be an integer, but it is always expressed as a string to avoid limitations with the way JavaScript integers are expressed. This idspace is unique to User objects. There can be a Post and User with the same ID; no relation is implied. | |||||||||||||||
username |
string | Case insensitive. 20 characters, may only contain a-z, 0-9 and underscore. | |||||||||||||||
name |
string | User supplied descriptive name. May be a pseudonym. All Unicode characters allowed. Maximum length 50 characters. | |||||||||||||||
description |
object |
|
|||||||||||||||
timezone |
string | User timezone in tzinfo format. | |||||||||||||||
locale |
string | User locale in ISO format. | |||||||||||||||
avatar_image |
image object | Object representing the URL and original size of the user's avatar. | |||||||||||||||
cover_image |
image object | Object representing the URL and original size of the user's over image. | |||||||||||||||
type |
string | An account can be one of the following types: human , feed , or bot . See the account types documentation for more information. |
|||||||||||||||
created_at |
string | The time at which the User was created in ISO 8601 format. | |||||||||||||||
counts |
object |
|
|||||||||||||||
follows_you |
boolean | Does this user follow the user making the request? May be omitted if this is not an authenticated request. | |||||||||||||||
you_blocked |
boolean | Has the user making the request blocked this user? May be omitted if this is not an authenticated request. | |||||||||||||||
you_follow |
boolean | Does the user making the request follow this user? May be omitted if this is not an authenticated request. | |||||||||||||||
you_muted |
boolean | Has the user making the request muted this user? May be omitted if this is not an authenticated request. | |||||||||||||||
you_can_subscribe |
boolean | Does the user making the request have the ability to subscribe this user to channels? May be omitted if this is not an authenticated request. | |||||||||||||||
you_can_follow |
boolean | Does the user making the request have the ability to follow this user? This may be affected by privacy settings or the requesting user's type. May be omitted if this is not an authenticated request. | |||||||||||||||
verified_domain |
string | A string representing a domain that is controlled by this App.net user and has been verified by App.net. | |||||||||||||||
annotations |
list | Metadata about the user. See the Annotations documentation. | |||||||||||||||
canonical_url |
string | The URL of the user's detail page on Alpha. |
is_following
, is_follower
, and is_muted
have all been deprecated and replaced with follows_you
, you_follow
, and you_muted
. These keys should not be used and will be removed from the User object soon.Images are objects so that app developers can more easily pick the appropriated sized image for different contexts.
{
"height": 200,
"is_default": false,
"url": "https://d2rfichhc2fb9n.cloudfront.net/image/5/aoveeP73f33UcFhyhqzn7VhwgS17InMiOiJzMyIsImIiOiJhZG4tdXNlci1hc3NldHMiLCJrIjoiYXNzZXRzL3VzZXIvOTkvYTYvNDAvOTlhNjQwMDAwMDAwMDAwMC5wbmciLCJvIjoiIn0",
"width": 200
}
Images may be dynamically resized on the server by adding w
and/or h
parameters to the query string of the URL as desired. If
one of the parameters is omitted, the omitted dimension will be scaled according to the aspect ratio of the original image. Images
will be returned with HTTPS URLs, but can be fetched over HTTP if desired.
Currently, gif images can not be resized with the w
and h
parameters.
A user’s avatar and cover images can be directly requested without requesting the entire user object.
A user account can be either a human
, feed
, or bot
account type. As App.net develops, we may add other Account Types for specialized purposes.
human
means that a human controls how the account interacts with App.net. By default, all accounts are human accounts.feed
is currently treated just like a human account but is meant to indicate that the account primarily posts from an external feed. If a feed account interacts with other users, a human should be involved.bot
means that this account interacts with other App.net users without a human’s involvement. If your account mentions or sends messages to other App.net users without a human’s interaction, it must be classified as a Bot to comply with Appp.net’s Terms of Service. A bot account has the following restrictions:
Where noted, User endpoints respond to the following query string parameters:
Name | Required? | Type | Description |
---|---|---|---|
include_annotations |
Optional | integer (0 or 1) | Should annotations be included in the response objects? Defaults to false. |
include_user_annotations |
Optional | integer (0 or 1) | Should User annotations be included in the response objects? Defaults to false. |
include_html |
Optional | integer (0 or 1) | Should the user description html field be included alongside the text field in the response objects? Defaults to true. |
Where noted, endpoints that return a stream of Users additionally respond to pagination parameters.
Description | Method | Path | Token |
---|---|---|---|
Retrieve a User | GET | /stream/0/users/{user_id} |
None |
Update a User | PUT | /stream/0/users/me |
User |
Partially Update a User | PATCH | /stream/0/users/me |
User |
Retrieve a User's avatar image | GET | /stream/0/users/{user_id}/avatar |
None |
Update a User's avatar image | POST | /stream/0/users/me/avatar |
User |
Retrieve a User's cover image | GET | /stream/0/users/{user_id}/cover |
None |
Update a User's cover image | POST | /stream/0/users/me/cover |
User |
Follow a User | POST | /stream/0/users/{user_id}/follow |
User |
Unfollow a User | DELETE | /stream/0/users/{user_id}/follow |
User |
Mute a User | POST | /stream/0/users/{user_id}/mute |
User |
Unmute a User | DELETE | /stream/0/users/{user_id}/mute |
User |
Block a User | POST | /stream/0/users/{user_id}/block |
User |
Unblock a User | DELETE | /stream/0/users/{user_id}/block |
User |
Retrieve multiple Users | GET | /stream/0/users |
Any |
Search for Users | GET | /stream/0/users/search |
Any |
Retrieve Users a User is following | GET | /stream/0/users/{user_id}/following |
Any |
Retrieve Users following a User | GET | /stream/0/users/{user_id}/followers |
Any |
Retrieve IDs of Users a User is following | GET | /stream/0/users/{user_id}/following/ids |
Any |
Retrieve IDs of Users following a User | GET | /stream/0/users/{user_id}/followers/ids |
Any |
Retrieve muted Users | GET | /stream/0/users/{user_id}/muted |
Any |
Retrieve muted User IDs for multiple Users | GET | /stream/0/users/muted/ids |
App |
Retrieve blocked Users | GET | /stream/0/users/{user_id}/blocked |
Any |
Retrieve blocked User IDs for multiple Users | GET | /stream/0/users/blocked/ids |
App |
Retrieve Users who reposted a Post | GET | /stream/0/posts/{post_id}/reposters |
Any |
Retrieve Users who starred a Post | GET | /stream/0/posts/{post_id}/stars |
Any |