getChannelCountForMember - kewalsk/My-OpenPeriscope GitHub Wiki
GET https://channels.pscp.tv/v1/users/{uid}/channels/count
The getChannelCountForMember give the number of channels the user if {uid} has currently, but this number is not updated frequently and limited to ~1000, so I'd not recommend to rely on this information. For the small number of channels it gives good values, but when the number of channels grow the value starts to be not reliable.
Place | Name | Type | Description | Optional |
---|---|---|---|---|
@Header | Authorization | String | The authorization token got from authorizeToken | No |
@Path | uid | String | The user id | No |
Name | Type | Description | Optional |
---|---|---|---|
Active | int | The number of active channels | No |
Block | int | The number of blocked (?) channels | No |
Pending | int | The number of pending channels | No |
HasMore | boolean | Indicate if next batch is available, but for this service this is probably overkill | Yes |
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/users/1r***/channels/count
Result:
{"Active":174,"Pending":0,"Block":0,"ModerationActive":0,"ModerationBlock":0,"HasMore":false}