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.

ParamsTypeRequired?Description
namestringtrueName of the channel.

Response

{
    "result": {
        "name": "new_releases",
        "id": 1
    }
}

Back to Index

/channel/:id

πŸ“˜

Gets the given channel information.

No params expected.

Response

{
    "result": {
        "id": 1,
        "name": "new_releases"
    }
}

Back to Index

/channel/:id

πŸ“˜

Updates the channel :id information with the given one.

ParamsTypeRequired?Description
namestringtrueName of the channel.

Response

πŸ‘

Updating name from new_releases to releases

{
    "result": {
        "id": 1,
        "name": "releases"
    }
}

Back to Index

/channel/:id

πŸ“˜

Deletes the given channel

Response

{
    "result": true
}

Back to Index

/channels

πŸ“˜

Retrives all the channels registered.

No params expected.

Response

{
    "result": [
        {
            "id": 1,
            "name": "new_releases"
        },
        {
            "id": 2,
            "name": "system_updates"
        }
    ]
}

Back to Index

/channel_name

πŸ“˜

Gets the given channel information by name.

ParamsTypeRequired?Description
namestringtrueName of the channel.

Response

{
    "result": {
        "id": 1,
        "name": "new_releases"
    }
}

Back to Index