OryksaTvClientBackend class

The real backend: the ORYKSA API through an OryksaClient (its session token, its platform). Written against the contract in the TV SDK design (section 9); each call is only proven once the server side is live.

Implemented types

Constructors

OryksaTvClientBackend(OryksaClient client)
Creates the backend on client. Create the client with the TV platform, for example OryksaClient(getToken: ..., platform: OryksaTvPlatform.fireTv.wire).

Properties

client → OryksaClient
The client with the session token.
final
hashCode → int
The hash code for this object.
no setterinherited
platform → String
The value sent as platform (for example fire_tv).
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

ai({String? instructions, String? input, Map<String, dynamic>? schema}) → Future<OryksaAiResult>
An AI task of your app (client.ai), counted as ORYKSA interactions.
override
chat(String message, {required String locale, OryksaAppContext? appContext, bool voice = false}) → Future<OryksaReply>
Sends a message to the AI and waits for the reply (the assistant panel).
override
config(String locale) → Future<OryksaTvConfig>
The TV configuration for locale (texts, presenter, rules). The server picks the supported locale and says which in OryksaTvConfig.locale.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pair(String locale) → Future<OryksaPairing>
Starts pairing a phone: the QR and the code to show.
override
phoneEvents(String pairId, {int after = 0, Duration wait = const Duration(seconds: 25)}) → Future<OryksaPhoneEventsPage>
Waits up to wait for phone events newer than after (long-poll).
override
speak(String text, {required String locale, bool whisper = false, bool voice = true, String? cachedRev}) → Future<OryksaTvSpeech?>
The presenter's line text in locale, charged each time by the ORYKSA interaction cost table (OryksaTvSpeech.interactionsSpent; a line not counted is not shown). voice false: subtitles only, no voice wanted. cachedRev: the device already has this line with that voice revision, so the server may only count it and send no voice. The bytes may be empty (subtitles only). Null when the server gave nothing for it. Throws on other errors.
override
toString() → String
A string representation of this object.
inherited
unpair(String pairId) → Future<void>
Ends the pairing.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited