Table of Contents

Class ProxseeApi

Namespace
Twikit.Spaces
Assembly
Twikit.dll

Periscope(proxsee.pscp.tv)v2 API のクライアント。 認証は 2 段階です: authenticatePeriscope(X の GraphQL)で JWT を得て、 loginTwitterToken でそれを proxsee のセッション Cookie に交換します。

public sealed class ProxseeApi
Inheritance
ProxseeApi
Inherited Members

Constructors

ProxseeApi(Client)

public ProxseeApi(Client client)

Parameters

client Client

Properties

DisplayName

public string? DisplayName { get; }

Property Value

string

PeriscopeUserId

public string? PeriscopeUserId { get; }

Property Value

string

TwitterId

public string? TwitterId { get; }

Property Value

string

TwitterScreenName

public string? TwitterScreenName { get; }

Property Value

string

UserType

public string? UserType { get; }

Property Value

string

Methods

AccessChatAsync(string)

チャットトークンを {endpoint, room_id, access_token} に交換します。

public Task<JsonObject> AccessChatAsync(string chatToken)

Parameters

chatToken string

Returns

Task<JsonObject>

AccessChatPublicAsync(string)

public Task<JsonObject> AccessChatPublicAsync(string chatToken)

Parameters

chatToken string

Returns

Task<JsonObject>

AssociateTweetWithBroadcastAsync(string, string, bool)

public Task<JsonObject> AssociateTweetWithBroadcastAsync(string broadcastId, string tweetId, bool tweetExternal = false)

Parameters

broadcastId string
tweetId string
tweetExternal bool

Returns

Task<JsonObject>

CancelScheduledSpaceAsync(string)

public Task<JsonObject> CancelScheduledSpaceAsync(string broadcastId)

Parameters

broadcastId string

Returns

Task<JsonObject>

CreateBroadcastAsync(JsonObject)

ブロードキャストを作成します(broadcast、access_token、room_id、stream_name、credential、webrtc_gw_url などを返します)。

public Task<JsonObject> CreateBroadcastAsync(JsonObject metadata)

Parameters

metadata JsonObject

Returns

Task<JsonObject>

EndBroadcastAsync(string)

public Task<JsonObject> EndBroadcastAsync(string broadcastId)

Parameters

broadcastId string

Returns

Task<JsonObject>

GetChatHistoryAsync(string, string, string?, int, JsonNode?, bool)

public Task<JsonObject> GetChatHistoryAsync(string endpoint, string accessToken, string? cursor = null, int limit = 1000, JsonNode? since = null, bool quickGet = true)

Parameters

endpoint string
accessToken string
cursor string
limit int
since JsonNode
quickGet bool

Returns

Task<JsonObject>

GetScheduledSpacesAsync()

public Task<JsonObject> GetScheduledSpacesAsync()

Returns

Task<JsonObject>

GetTokenForServiceAsync(string)

public Task<JsonObject> GetTokenForServiceAsync(string service)

Parameters

service string

Returns

Task<JsonObject>

GetTurnServersAsync()

{uris, username, password}(WebRTC 用の TURN サーバー)を返します。

public Task<JsonObject> GetTurnServersAsync()

Returns

Task<JsonObject>

Headers()

proxsee は毎回ブラウザ風のヘッダーを要求します(無いと turnServers などが 401/400)。

public static Dictionary<string, string> Headers()

Returns

Dictionary<string, string>

LoginAsync(bool)

AuthenticatePeriscope の JWT を proxsee のセッションに交換します。

public Task LoginAsync(bool createUser = false)

Parameters

createUser bool

Returns

Task

PostAsync(string, JsonObject)

ログイン済みで proxsee の /api/v2/{endpoint} に POST します。

public Task<JsonObject> PostAsync(string endpoint, JsonObject payload)

Parameters

endpoint string
payload JsonObject

Returns

Task<JsonObject>

PrePublishScheduledAudioBroadcastAsync(string)

public Task<JsonObject> PrePublishScheduledAudioBroadcastAsync(string broadcastId)

Parameters

broadcastId string

Returns

Task<JsonObject>

PublishBroadcastAsync(JsonObject?)

public Task<JsonObject> PublishBroadcastAsync(JsonObject? extra = null)

Parameters

extra JsonObject

Returns

Task<JsonObject>

ReconnectHostAsync(string)

public Task<JsonObject> ReconnectHostAsync(string broadcastId)

Parameters

broadcastId string

Returns

Task<JsonObject>

WebrtcBroadcastMetaAsync(JsonObject)

public Task<JsonObject> WebrtcBroadcastMetaAsync(JsonObject payload)

Parameters

payload JsonObject

Returns

Task<JsonObject>

WebrtcPlaybackMetaAsync(JsonObject)

public Task<JsonObject> WebrtcPlaybackMetaAsync(JsonObject payload)

Parameters

payload JsonObject

Returns

Task<JsonObject>