Interactions are objects that represent users taking certain actions on App.net. Interactions are structured to form a sentence like: User X took action Y on object Z. If multiple users take the same action (e.g. multiple users reply to one post) within a set time window those events will be combined into a single Interaction.
The
objects
list of an Interaction will vary based on theaction
(Example) @dalton and @berg reposted post 1:
"repost_interaction"
(Example) @berg started following @dalton:
{
"action": "follow",
"event_date": "2012-07-16T17:23:34Z",
"objects": [
"...@dalton's user object"
],
"users": [
"...@berg's user object"
]
}
Field | Type | Description |
---|---|---|
action |
string | What users did. Currently one of follow , reply , repost , star , welcome , broadcast_create , broadcast_subscribe , or broadcast_unsubscribe . |
event_date |
string | The time of the most recent interaction occurred at in ISO 8601 format. |
objects |
list |
users took action on. These objects will be Users if action=follow . For star, repost, reply these objects will be Posts. For broadcast_create, broadcast_subscribe, broadcast_subscribe these will be channels. For welcome this will be empty. |
users |
list | A list of User objects that took action on objects . |
List all the Interactions other users have had with me.
Responses from this endpoint are paginated.
You can only request this list for the current user.
Although this endpoint supports paging, a user’s Interactions stream is continuously rebuilt as new actions in the system occur, so developers should generally plan to refetch the stream whenever switching to display it as Interactions may have shifted their position, with users being added or removed. If you need to keep track of activity in a more precise manner, you should using the Streaming API to monitor the global feed for relevant activity.
This endpoint accepts the interaction_actions
as a query string parameter whose value is a comma separated list of actions you’re interested in. For instance, if you’re only interested in repost and follow interactions you could request stream/0/users/me/interactions?interaction_actions=repost,follow
.
Method | URL | Token |
---|---|---|
GET | https://alpha-api.app.net/stream/0/users/me/interactions | User |
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/users/me/interactions"
{
"data": [
{
"action": "repost",
"event_date": "2012-07-16T17:23:34Z",
"objects": [
"...post 1..."
],
"users": [
"...@berg's user object",
"...@dalton's user object"
],
"pagination_id": "10"
}
],
"meta": {
"code": 200,
"more": false,
"min_id": "10",
"max_id": "10"
}
}