Channel
A Channel is the name of a multicast group that a user or a group of users can be subscribed in order to get specific notifications of that group.
Routes
/channel
Creates a new channel or retrives the channel if it was created before.
| Params | Type | Required? | Description |
|---|---|---|---|
| name | string | true | Name of the channel. |
Response
{
"result": {
"name": "new_releases",
"id": 1
}
}
/channel/:id
Gets the given channel information.
No params expected.
Response
{
"result": {
"id": 1,
"name": "new_releases"
}
}
/channel/:id
Updates the channel :id information with the given one.
| Params | Type | Required? | Description |
|---|---|---|---|
| name | string | true | Name of the channel. |
Response
Updating name from new_releases to releases
{
"result": {
"id": 1,
"name": "releases"
}
}
/channel/:id
Deletes the given channel
Response
{
"result": true
}
/channels
Retrives all the channels registered.
No params expected.
Response
{
"result": [
{
"id": 1,
"name": "new_releases"
},
{
"id": 2,
"name": "system_updates"
}
]
}
/channel_name
Gets the given channel information by name.
| Params | Type | Required? | Description |
|---|---|---|---|
| name | string | true | Name of the channel. |
Response
{
"result": {
"id": 1,
"name": "new_releases"
}
}
Updated less than a minute ago
