getBroadcastsForChannel - kewalsk/My-OpenPeriscope GitHub Wiki
GET https://channels.pscp.tv/v1/channels/{cid}/broadcasts
The getBroadcastsForChannel give information about the broadcasts shared to the channel by one of the members and the private broadcasts to the channel.
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 |
---|---|---|---|
Broadcasts | List<PsBid></PsBid> | The list of broadcasts id class | No |
NLive | int | The number of live broadcasts | No |
NReplay | int | The number of replay broadcasts | No |
Name | Type | Description | Optional |
---|---|---|---|
BID | String | The broadcasts id | No |
Featured | boolean | Featured broadcast (?) | 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/***/broadcasts
Result:
{ "Broadcasts": [ { "BID": "1MYxNdMeDnpGw", "Featured": false }, { "BID": "1djGXprzvyyGZ", "Featured": false }, { "BID": "1BdGYAEmDaLGX", "Featured": false }, { "BID": "1BdxYAEmpBMxX", "Featured": false }, { "BID": "1jMJgvBWVRkGL", "Featured": false } ], "NLive": 1, "NReplay": 0 }