new ChannelRepository()
Methods
channelForId(channelId) → {LiveObject}
Get channel for id.
Parameters:
Name | Type | Description |
---|---|---|
channelId |
string | The channel ID of the requested channel. |
Throws:
-
Will throw an error if a channel ID is not valid.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveObject instance of channel
models
.
- Type
- LiveObject
allChannels() → {LiveCollection}
Get all channels.
Returns:
The LiveCollection instance of channel
models
.
- Type
- LiveCollection
channelsWithTags(tags) → {LiveCollection}
Get channels with tags.
Parameters:
Name | Type | Description |
---|---|---|
tags |
Array.<string> | The list of tags to filter channels with. |
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveCollection instance of channel
models
.
- Type
- LiveCollection
channelsWithFilters(parameters) → {LiveCollection}
Get channels filtered by defined parameters.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveCollection instance of channel
models
.
- Type
- LiveCollection
createChannel(parameters) → {LiveObject}
Create a new channel. NOTE: If channel already exists, an error will be thrown.
Parameters:
Name | Type | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveObject instance of
ChannelModel
.
- Type
- LiveObject
joinChannel(parameters) → {LiveObject}
Join a channel. If channel does not yet exist, it will be automatically created and joined.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
The LiveObject instance of
ChannelModel
.
- Type
- LiveObject
setDisplayName(parameters) → {Promise.<undefined, EkoSDKError>}
Set the display name of current user in the channel.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
Returns a promise.
- Type
- Promise.<undefined, EkoSDKError>
setMetadata(parameters) → {Promise.<undefined, EkoSDKError>}
Set meta data for channel.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
Returns a promise.
- Type
- Promise.<undefined, EkoSDKError>
setTags(parameters) → {Promise.<undefined, EkoSDKError>}
Set tags for channel.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
parameters |
Object |
Properties
|
Throws:
-
Will throw an error if parameters are wrong.
- Type
- EkoSDKInvalidParameterError
Returns:
Returns a promise.
- Type
- Promise.<undefined, EkoSDKError>