Skip to content

UnifiedClient

UnifiedClient = object

Defined in: packages/core/src/client.ts:34

batchGetBroadcasts(platform, channelIds): Promise<BatchResult<Broadcast[]>>

Defined in: packages/core/src/client.ts:132

Batch retrieve broadcasts by platform and channel IDs.

string

platform name

string[]

channel identifiers

Promise<BatchResult<Broadcast[]>>

batch result with values (Broadcast[] per channel) and per-item errors

platform is registered

request-level errors (rate limit, auth, network) are thrown, per-item errors go to errors map

PlatformNotFoundError if platform is not registered


batchGetChannels(platform, ids): Promise<BatchResult<Channel>>

Defined in: packages/core/src/client.ts:170

Batch retrieve channels by platform and IDs.

string

platform name

string[]

channel identifiers

Promise<BatchResult<Channel>>

batch result with values and per-item errors

platform is registered

request-level errors (rate limit, auth, network) are thrown, per-item errors go to errors map

PlatformNotFoundError if platform is not registered


batchGetClips(platform, ids): Promise<BatchResult<Clip>>

Defined in: packages/core/src/client.ts:182

Batch retrieve clips by platform and IDs.

string

platform name

string[]

clip identifiers

Promise<BatchResult<Clip>>

batch result with values and per-item errors

platform is registered and supports clips

PlatformNotFoundError if platform is not registered

ValidationError if platform doesn’t support clip retrieval by IDs


batchGetContents(platform, ids): Promise<BatchResult<Content>>

Defined in: packages/core/src/client.ts:120

Batch retrieve content by platform and IDs.

string

platform name

string[]

content identifiers

Promise<BatchResult<Content>>

batch result with values and per-item errors

platform is registered

request-level errors (rate limit, auth, network) are thrown, per-item errors go to errors map

PlatformNotFoundError if platform is not registered


crossListBroadcasts(channels): Promise<Record<string, BatchResult<Broadcast[]>>>

Defined in: packages/core/src/client.ts:192

Fetch broadcasts from all specified platforms in parallel.

Record<string, string[]>

mapping of platform name to channel ID arrays

Promise<Record<string, BatchResult<Broadcast[]>>>

mapping of platform name to batch result of broadcasts; failed platforms get empty BatchResult

all platforms are represented in the result, even on failure

Safe — read-only aggregation


crossSearch(options): Promise<Record<string, Page<Content>>>

Defined in: packages/core/src/client.ts:204

Search across all registered plugins that support search.

SearchOptions

search options (query, status, channelId, order, limit, cursor)

Promise<Record<string, Page<Content>>>

mapping of platform name to paginated search results; failed platforms get empty Page

all searchable platforms are represented in the result, even on failure

Safe — read-only aggregation


getChannel(platform, id): Promise<Channel>

Defined in: packages/core/src/client.ts:108

Retrieve channel information.

string

platform name

string

channel identifier

Promise<Channel>

channel information

platform is registered

PlatformNotFoundError if platform is not registered


getContent(platform, id): Promise<Content>

Defined in: packages/core/src/client.ts:66

Retrieve content by platform name and ID.

string

platform name

string

content identifier

Promise<Content>

the resolved content (Broadcast, ScheduledBroadcast, or Archive)

platform is registered

returns Content (Broadcast, ScheduledBroadcast, or Archive)

PlatformNotFoundError if platform is not registered


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.

string

platform name

string

channel identifier

string

pagination cursor

number

number of items per page

ArchiveListOptions

optional archive filter options (period, sort, videoType)

Promise<Page<Archive>>

paginated list of archives

platform is registered

PlatformNotFoundError if platform is not registered


listBroadcasts(platform, channelId): Promise<Broadcast[]>

Defined in: packages/core/src/client.ts:77

List currently active broadcasts for a channel.

string

platform name

string

channel identifier

Promise<Broadcast[]>

active broadcasts for the channel

platform is registered

PlatformNotFoundError if platform is not registered


listClips(platform, channelId, options?): Promise<Page<Clip>>

Defined in: packages/core/src/client.ts:158

List clips for a channel on a platform.

string

platform name

string

channel identifier

ClipOptions

optional clip query options (date range, limit, cursor)

Promise<Page<Clip>>

paginated list of clips

platform is registered and supports clips

PlatformNotFoundError if platform is not registered

ValidationError if platform doesn’t support clips


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.

string

URL to match against registered plugins

ResolvedUrl | null

resolved URL info, or null if no plugin matches

returns ResolvedUrl or null if no plugin matches


platform(name): PlatformPlugin

Defined in: packages/core/src/client.ts:213

Access a specific platform plugin.

string

platform name to look up

PlatformPlugin

the registered platform plugin

PlatformNotFoundError if platform is not registered


platforms(): string[]

Defined in: packages/core/src/client.ts:231

Returns the names of all registered platforms.

string[]

array of platform name strings

returns a snapshot of currently registered platform names


register(plugin): void

Defined in: packages/core/src/client.ts:43

Register a platform plugin.

PlatformPlugin

the platform plugin to register

void

plugin.name is unique across registered plugins

plugin is available for URL matching and API calls

Re-registering the same name overwrites the previous plugin


resolve(url): Promise<Content>

Defined in: packages/core/src/client.ts:54

Resolve a URL to content. Automatically routes to the correct plugin.

string

content URL to resolve and fetch

Promise<Content>

the resolved content (Broadcast, ScheduledBroadcast, or Archive)

url matches a registered plugin

returns Content (Broadcast, ScheduledBroadcast, or Archive)

PlatformNotFoundError if no plugin matches the URL


search(platform, options): Promise<Page<Content>>

Defined in: packages/core/src/client.ts:145

Search content on a platform. At least one of query/status/channelId required.

string

platform name

SearchOptions

search options (query, status, channelId, order, limit, cursor)

Promise<Page<Content>>

paginated search results

platform is registered and supports search

at least one of options.query, options.status, or options.channelId is provided

PlatformNotFoundError if platform is not registered

ValidationError if no query, status, or channelId provided, or platform doesn’t support search