Returns a specific Channel.
This endpoint responds to general Channel parameters.
Method | URL | Token | Scope |
---|---|---|---|
GET | https://alpha-api.app.net/stream/0/channels/{channel_id} | Any |
public_messages or messages
|
Name | Description |
---|---|
channel_id |
The id of the Channel to retrieve. |
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/channels/1"
{
"data": {
"counts": {
"messages": 42,
"subscribers": 43
},
"has_unread": false,
"id": "1",
"owner": "...user object...",
"is_inactive": false,
"readers": {
"any_user": false,
"immutable": false,
"public": true,
"user_ids": [
],
"you": true
},
"editors": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"recent_message_id": "231",
"recent_message": "...message object...",
"type": "com.example.channel",
"writers": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"you_can_edit": true,
"you_subscribed": true,
"you_muted": false
},
"meta": {
"code": 200
}
}
Returns multiple Channels requested by id. At most 200 channels can be requested. Channels which do not exist or which the requesting user does not have authorization to view will not be returned.
This endpoint responds to general Channel parameters.
Method | URL | Token |
---|---|---|
GET | https://alpha-api.app.net/stream/0/channels | Any |
Name | Description |
---|---|
ids |
A comma separated list of ids of Channels to retrieve. |
In the following example, Channel 6502 is omitted because it doesn’t exist or we don’t have permission to view it.
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/channels?ids=1,2,6502"
{
"data": [
{
"counts": {
"messages": 42,
"subscribers": 43
},
"has_unread": false,
"id": "2",
"owner": "...user object...",
"is_inactive": false,
"readers": {
"any_user": false,
"immutable": false,
"public": true,
"user_ids": [
],
"you": true
},
"editors": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"recent_message_id": "231",
"recent_message": "...message object...",
"type": "com.example.channel",
"writers": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"you_can_edit": true,
"you_subscribed": true,
"you_muted": false
},
{
"counts": {
"messages": 42,
"subscribers": 43
},
"has_unread": false,
"id": "1",
"owner": "...user object...",
"is_inactive": false,
"readers": {
"any_user": false,
"immutable": false,
"public": true,
"user_ids": [
],
"you": true
},
"editors": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"recent_message_id": "231",
"recent_message": "...message object...",
"type": "com.example.channel",
"writers": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"you_can_edit": true,
"you_subscribed": true,
"you_muted": false
}
],
"meta": {
"code": 200
}
}
Returns a stream of all Channels the current user has created.
This endpoint responds to general Channel parameters.
Responses from this endpoint are paginated.
Method | URL | Token | Scope |
---|---|---|---|
GET | https://alpha-api.app.net/stream/0/users/me/channels | User |
public_messages or messages
|
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/users/me/channels"
{
"data": [
{
"counts": {
"messages": 42,
"subscribers": 43
},
"has_unread": false,
"id": "1",
"owner": "...user object...",
"is_inactive": false,
"readers": {
"any_user": false,
"immutable": false,
"public": true,
"user_ids": [
],
"you": true
},
"editors": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"recent_message_id": "231",
"recent_message": "...message object...",
"type": "com.example.channel",
"writers": {
"any_user": false,
"immutable": false,
"public": false,
"user_ids": [
],
"you": true
},
"you_can_edit": true,
"you_subscribed": true,
"you_muted": false,
"pagination_id": "1"
}
],
"meta": {
"code": 200,
"more": false,
"min_id": "1",
"max_id": "1"
}
}
Returns the current number of net.app.core.pm
Channels where has_unread: true
for the current user.
Method | URL | Token | Scope |
---|---|---|---|
GET | https://alpha-api.app.net/stream/0/users/me/channels/pm/num_unread | User | messages |
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/users/me/channels/pm/num_unread"
{
"data": 5,
"meta": {
"code": 200
}
}
Returns the current number of net.app.core.broadcast
Channels where has_unread: true
for the current user.
Method | URL | Token | Scope |
---|---|---|---|
GET | https://alpha-api.app.net/stream/0/users/me/channels/broadcast/num_unread | User | messages |
curl -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/users/me/channels/broadcast/num_unread"
{
"data": 3,
"meta": {
"code": 200
}
}
Mark all net.app.core.broadcast
Channels as read for the current user.
Method | URL | Token | Scope |
---|---|---|---|
DELETE | https://alpha-api.app.net/stream/0/users/me/channels/broadcast/num_unread | User | messages |
curl -X DELETE -H "Authorization: Bearer <YOUR ACCESS TOKEN>" -H "X-ADN-Pretty-JSON: 1" \
"https://alpha-api.app.net/stream/0/users/me/channels/broadcast/num_unread"
{
"data": 0,
"meta": {
"code": 200
}
}