getChannelInfo - kewalsk/My-OpenPeriscope GitHub Wiki
GET https://channels.pscp.tv/v1/channels/{cid}
The getChannelInfo give information about the channel of given {cid} if the channel is accessible to the user (user is one of members). CID is unique identification number of the channel. This identifier can be obtained from the list of channels.
Place | Name | Type | Description | Optional |
---|---|---|---|---|
@Header | Authorization | String | The authorization token got from authorizeToken | No |
@Path | CID | String | The unique identification number of the channel | No |
Name | Type | Description | Optional |
---|---|---|---|
Channel | PsChannel | The channel class | No |
HTTP Result | HTTP Message | Body message | Description |
---|---|---|---|
400 | Bad Request |
{"success":false,"msg":"Bad Request"}
|
The request has some improper arguments, for example token is wrong |
401 | Unauthorized |
Token did not validate:token is expired
|
The authorization token is expired - get the new one |
401 | Unauthorized |
Requires authorization header
|
There is no Authorization header in request |
401 | Unauthorized |
Token did not validate:token contains an invalid number of segments
|
The authorization token is wrong |
405 | Method Not Allowed |
|
Wrong HTTP method was used, i.e. POST instead of GET |
Sending request (set $token to the proper value first):
curl -H "Authorization: $token" https://channels.pscp.tv/v1/channels/5584785743201822763
Result:
{ "Channel": { "CID": "5584785743201822763", "Name": "Travel the World", "Description": "Navigate the globe and teleport yourself to interesting broadcasts anywhere on the planet.", "UniversalLocales": null, "NLive": 3, "Featured": false, "PublicTag": "", "Slug": "travel-world-new", "ThumbnailURLs": null, "CreatedAt": "2018-07-18T00:56:12.494869712Z", "LastActivity": "2019-08-08T18:08:54.605162446Z", "Type": 2, "OwnerId": "1xeEWxrqzBzQP", "NMember": 6 } }