getOrCreateModerationChannel - kewalsk/My-OpenPeriscope GitHub Wiki

Get or create moderation channel

GET https://channels.pscp.tv/v1/get-or-create-moderation-channel/{uid}

The getOrCreateModerationChannel service respond with the Channel object of class PsChannel which has Type number 3. The purpose of this channel is unknown (at least to me) and the CID of channel has form mod-{uid}. It is possible that such channel has something to do with moderating chats. However, even after creating this channel the List of moderation channels is still empty.

Request parameters

Place Name Type Description Optional
@Header Authorization String The authorization token got from authorizeToken No
@Path uid String The user id No

Response

Name Type Description Optional
Channel PsChannel Channel information object No

PsChannel Fields

Name Type Description Optional
CID String The channel id, the unique string identifying the channel No
RestrictMembersManagement boolean True if the owner make channel restricted (closed group) No
Description String Should be description (to be checked - probably there is no value) Yes
Featured boolean Featured channel (?) No
NMember long The number of members, but the counter is limited to 1000 even if the channel has more members No
Name String The name of the channel (don't have to be uniqe) No
NLive long The number of live streams (private broadcasts to the channel and shared public broadcasts) No
OwnerId String The user id of channel creator No
PublicTag String ? Yes
Slug String ? Yes
ThumbnailURLs List<PsChannelThumbnail> The list of urls with thumbnail pictures Yes
Type int ? (to be checked) Yes
CreatedAt datetime Date and time when the channel was created No
LastActivity datetime Date and time of last activity in channel No

Error responses

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

Example

Sending request (set $token to the proper value first):

curl -H "Authorization: $token" https://channels.pscp.tv/v1/get-or-create-moderation-channel/1r***

Result:

 {
    "Channel": {
        "CID": "mod-1r***",
        "Name": "",
        "Description": "",
        "UniversalLocales": null,
        "NLive": 0,
        "Featured": false,
        "PublicTag": "",
        "Slug": "",
        "ThumbnailURLs": null,
        "CreatedAt": "2019-08-07T12:15:25.617018812Z",
        "LastActivity": "2019-08-07T12:15:25.617018812Z",
        "Type": 3,
        "OwnerId": "1r*",
        "NMember": 0
    }
 }
⚠️ **GitHub.com Fallback** ⚠️