Back to explore

social

Stream

Credits: 0.000001

Create Channel

POST /v1/stream/CreateChannel

Create a channel with a given name and description. Channels are created automatically but this allows you to specify a description that's persisted for the lifetime of the channel.

Request

descriptionstring

description for the channel

namestring

name of the channel

Response

{}

Request

Response

{}

Credits: 0.000001

List Channels

POST /v1/stream/ListChannels

List all the active channels

Request

{}

Response

channelsarray

Request

Response

{
    "channels": [
        {
            "name": "general",
            "description": "The channel for all things",
            "last_active": "2021-11-03T14:35:07.594972213Z"
        }
    ]
}

Credits: 0.000001

List Messages

POST /v1/stream/ListMessages

List messages for a given channel

Request

channelstring

The channel to subscribe to

limitnumber

number of message to return

Response

channelstring

The channel subscribed to

messagesarray

Messages are chronological order

Request

Response

{
    "messages": [
        {
            "id": "e6099dca-22af-440e-bdbf-e14525af9824",
            "text": "Hey checkout this tweet https://twitter.com/m3oservices/status/1455291054295498752",
            "timestamp": "2021-11-03T14:34:40.333401738Z",
            "channel": "general",
            "metadata": {}
        }
    ]
}

Credits: 0.000001

Send Message

POST /v1/stream/SendMessage

Send a message to the stream.

Request

channelstring

The channel to send to

textstring

The message text to send

Response

{}

Request

Response

{}