Used to connect your application to a GameWisp channel's event stream.
This event is used to request channels for which your application wants data. This event is the primary means of channel authorization, and is documented in detail in Singularity - Connecting to a GameWisp Channel. It is used as follows:
socket.emit('channel-connect', {
access_token: "channel OAuth2 access token"
});
This event emits app-channel-connected back to your application. See the Successful Authorization section of this README for more discussion about channel authorization.
socketClient.on('app-channel-connected', function(response){
//Do something with the response
});
The response is a JSON object of the form:
{
result: {
status: 1,
message: "Channel authenticated."
},
data: {
channel_id: "channel identifier",
status: 'authenticated',
listening: true
},
channel:{
names:{
gamewisp: 'gamewisp channel name',
twitch: 'twitch channel name',
youtube: 'youtube channel name'
},
ids:{
gamewisp: 'gamewisp channel id',
twitch: 'twitch channel id',
youtube: 'youtube channel id'
}
}
}
See Singularity - Connecting to a GameWisp Channel for more information about this on-demand event.