Beebotte channel management provides the following operations:
Channel Management operations require authentication
using the account API and Secret Keys
.
You can create a new channel as follows:
bclient.addChannel({ name: 'channel1', label: 'Channel 1', description: 'channel 1 description', ispublic: true, //public or private channel resources: [ {name: 'res1', description: 'res1 description', vtype: 'number'}, {name: 'res2', vtype: 'string'} //description is optional ] }, function(err, res) { if(err) console.log(err); // On success res is set to true console.log(res); });
## This operation is not available yet!
// This operation is not available yet!
Channel channel = new Channel(); channel.Name = "channel1"; channel.Label = "label1"; channel.Description = "description1"; channel.IsPublic = false; var resources = new List{ new Resource("res1", "res1 label", "res1 description", "number"), new Resource("res2", "res2 label", "res2 description", "string") }; channel.Resources = resources; bclient.CreateChannel(channel);
You can get the description of a created channel as follows:
bclient.getChannel('channel1', function(err, res) { if(err) console.log(err); // On success, res is the JSON description of the channel console.log(res); });
channel = bclient.getChannel('channel1')
// This operation is not available yet!
var channel = bclient.GetChannel("channel1");
You can get the list of all created channels in one call as follows:
bclient.getChannel('*', function(err, channels) { if(err) console.log(err); // On success, res is an Array of JSON description of the channels console.log(res); });
channel = bclient.getChannel()
// This operation is not available yet!
var channels = bclient.GetAllChannels();
You can delete an existing channel as follows:
bclient.deleteChannel('channel1', function(err, res) { if(err) console.log(err); // On success, res is set to true });
bclient.deleteChannel('channel1')
// This operation is not available yet!
bclient.DeleteChannel("channel1");