UnifiedClient
このコンテンツはまだ日本語訳がありません。
UnifiedClient =
object
Defined in: packages/core/src/client.ts:34
Methods
Section titled “Methods”batchGetBroadcasts()
Section titled “batchGetBroadcasts()”batchGetBroadcasts(
platform,channelIds):Promise<BatchResult<Broadcast[]>>
Defined in: packages/core/src/client.ts:132
Batch retrieve broadcasts by platform and channel IDs.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
channelIds
Section titled “channelIds”string[]
channel identifiers
Returns
Section titled “Returns”Promise<BatchResult<Broadcast[]>>
batch result with values (Broadcast[] per channel) and per-item errors
Precondition
Section titled “Precondition”platform is registered
Postcondition
Section titled “Postcondition”request-level errors (rate limit, auth, network) are thrown, per-item errors go to errors map
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
batchGetChannels()
Section titled “batchGetChannels()”batchGetChannels(
platform,ids):Promise<BatchResult<Channel>>
Defined in: packages/core/src/client.ts:170
Batch retrieve channels by platform and IDs.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
string[]
channel identifiers
Returns
Section titled “Returns”Promise<BatchResult<Channel>>
batch result with values and per-item errors
Precondition
Section titled “Precondition”platform is registered
Postcondition
Section titled “Postcondition”request-level errors (rate limit, auth, network) are thrown, per-item errors go to errors map
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
batchGetClips()
Section titled “batchGetClips()”batchGetClips(
platform,ids):Promise<BatchResult<Clip>>
Defined in: packages/core/src/client.ts:182
Batch retrieve clips by platform and IDs.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
string[]
clip identifiers
Returns
Section titled “Returns”Promise<BatchResult<Clip>>
batch result with values and per-item errors
Precondition
Section titled “Precondition”platform is registered and supports clips
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
Throws
Section titled “Throws”ValidationError if platform doesn’t support clip retrieval by IDs
batchGetContents()
Section titled “batchGetContents()”batchGetContents(
platform,ids):Promise<BatchResult<Content>>
Defined in: packages/core/src/client.ts:120
Batch retrieve content by platform and IDs.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
string[]
content identifiers
Returns
Section titled “Returns”Promise<BatchResult<Content>>
batch result with values and per-item errors
Precondition
Section titled “Precondition”platform is registered
Postcondition
Section titled “Postcondition”request-level errors (rate limit, auth, network) are thrown, per-item errors go to errors map
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
crossListBroadcasts()
Section titled “crossListBroadcasts()”crossListBroadcasts(
channels):Promise<Record<string,BatchResult<Broadcast[]>>>
Defined in: packages/core/src/client.ts:192
Fetch broadcasts from all specified platforms in parallel.
Parameters
Section titled “Parameters”channels
Section titled “channels”Record<string, string[]>
mapping of platform name to channel ID arrays
Returns
Section titled “Returns”Promise<Record<string, BatchResult<Broadcast[]>>>
mapping of platform name to batch result of broadcasts; failed platforms get empty BatchResult
Postcondition
Section titled “Postcondition”all platforms are represented in the result, even on failure
Idempotency
Section titled “Idempotency”Safe — read-only aggregation
crossSearch()
Section titled “crossSearch()”crossSearch(
options):Promise<Record<string,Page<Content>>>
Defined in: packages/core/src/client.ts:204
Search across all registered plugins that support search.
Parameters
Section titled “Parameters”options
Section titled “options”search options (query, status, channelId, order, limit, cursor)
Returns
Section titled “Returns”Promise<Record<string, Page<Content>>>
mapping of platform name to paginated search results; failed platforms get empty Page
Postcondition
Section titled “Postcondition”all searchable platforms are represented in the result, even on failure
Idempotency
Section titled “Idempotency”Safe — read-only aggregation
getChannel()
Section titled “getChannel()”getChannel(
platform,id):Promise<Channel>
Defined in: packages/core/src/client.ts:108
Retrieve channel information.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
string
channel identifier
Returns
Section titled “Returns”Promise<Channel>
channel information
Precondition
Section titled “Precondition”platform is registered
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
getContent()
Section titled “getContent()”getContent(
platform,id):Promise<Content>
Defined in: packages/core/src/client.ts:66
Retrieve content by platform name and ID.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
string
content identifier
Returns
Section titled “Returns”Promise<Content>
the resolved content (Broadcast, ScheduledBroadcast, or Archive)
Precondition
Section titled “Precondition”platform is registered
Postcondition
Section titled “Postcondition”returns Content (Broadcast, ScheduledBroadcast, or Archive)
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
listArchives()
Section titled “listArchives()”listArchives(
platform,channelId,cursor?,pageSize?,options?):Promise<Page<Archive>>
Defined in: packages/core/src/client.ts:91
List archives for a channel with cursor-based pagination.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
channelId
Section titled “channelId”string
channel identifier
cursor?
Section titled “cursor?”string
pagination cursor
pageSize?
Section titled “pageSize?”number
number of items per page
options?
Section titled “options?”optional archive filter options (period, sort, videoType)
Returns
Section titled “Returns”paginated list of archives
Precondition
Section titled “Precondition”platform is registered
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
listBroadcasts()
Section titled “listBroadcasts()”listBroadcasts(
platform,channelId):Promise<Broadcast[]>
Defined in: packages/core/src/client.ts:77
List currently active broadcasts for a channel.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
channelId
Section titled “channelId”string
channel identifier
Returns
Section titled “Returns”Promise<Broadcast[]>
active broadcasts for the channel
Precondition
Section titled “Precondition”platform is registered
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
listClips()
Section titled “listClips()”listClips(
platform,channelId,options?):Promise<Page<Clip>>
Defined in: packages/core/src/client.ts:158
List clips for a channel on a platform.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
channelId
Section titled “channelId”string
channel identifier
options?
Section titled “options?”optional clip query options (date range, limit, cursor)
Returns
Section titled “Returns”paginated list of clips
Precondition
Section titled “Precondition”platform is registered and supports clips
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
Throws
Section titled “Throws”ValidationError if platform doesn’t support clips
match()
Section titled “match()”match(
url):ResolvedUrl|null
Defined in: packages/core/src/client.ts:223
Parse a URL to determine which platform and resource it refers to. No network calls.
Parameters
Section titled “Parameters”string
URL to match against registered plugins
Returns
Section titled “Returns”ResolvedUrl | null
resolved URL info, or null if no plugin matches
Postcondition
Section titled “Postcondition”returns ResolvedUrl or null if no plugin matches
platform()
Section titled “platform()”platform(
name):PlatformPlugin
Defined in: packages/core/src/client.ts:213
Access a specific platform plugin.
Parameters
Section titled “Parameters”string
platform name to look up
Returns
Section titled “Returns”the registered platform plugin
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
platforms()
Section titled “platforms()”platforms():
string[]
Defined in: packages/core/src/client.ts:231
Returns the names of all registered platforms.
Returns
Section titled “Returns”string[]
array of platform name strings
Postcondition
Section titled “Postcondition”returns a snapshot of currently registered platform names
register()
Section titled “register()”register(
plugin):void
Defined in: packages/core/src/client.ts:43
Register a platform plugin.
Parameters
Section titled “Parameters”plugin
Section titled “plugin”the platform plugin to register
Returns
Section titled “Returns”void
Precondition
Section titled “Precondition”plugin.name is unique across registered plugins
Postcondition
Section titled “Postcondition”plugin is available for URL matching and API calls
Idempotency
Section titled “Idempotency”Re-registering the same name overwrites the previous plugin
resolve()
Section titled “resolve()”resolve(
url):Promise<Content>
Defined in: packages/core/src/client.ts:54
Resolve a URL to content. Automatically routes to the correct plugin.
Parameters
Section titled “Parameters”string
content URL to resolve and fetch
Returns
Section titled “Returns”Promise<Content>
the resolved content (Broadcast, ScheduledBroadcast, or Archive)
Precondition
Section titled “Precondition”url matches a registered plugin
Postcondition
Section titled “Postcondition”returns Content (Broadcast, ScheduledBroadcast, or Archive)
Throws
Section titled “Throws”PlatformNotFoundError if no plugin matches the URL
search()
Section titled “search()”Defined in: packages/core/src/client.ts:145
Search content on a platform. At least one of query/status/channelId required.
Parameters
Section titled “Parameters”platform
Section titled “platform”string
platform name
options
Section titled “options”search options (query, status, channelId, order, limit, cursor)
Returns
Section titled “Returns”paginated search results
Precondition
Section titled “Precondition”platform is registered and supports search
Precondition
Section titled “Precondition”at least one of options.query, options.status, or options.channelId is provided
Throws
Section titled “Throws”PlatformNotFoundError if platform is not registered
Throws
Section titled “Throws”ValidationError if no query, status, or channelId provided, or platform doesn’t support search