@octalmage/node-appletv
Version:
A Node.js library for communicating with an Apple TV
21 lines (20 loc) • 1.14 kB
TypeScript
import { Credentials } from './lib/credentials';
import { AppleTV } from './lib/appletv';
import { Browser } from './lib/browser';
import { NowPlayingInfo } from './lib/now-playing-info';
import { Message } from './lib/message';
import { SupportedCommand } from './lib/supported-command';
/**
* A convenience function to scan for AppleTVs on the local network.
* @param uniqueIdentifier An optional identifier for the AppleTV to scan for. The AppleTV advertises this via Bonjour.
* @param timeout An optional timeout value (in seconds) to give up the search after.
* @returns A promise that resolves to an array of AppleTV objects. If you provide a `uniqueIdentifier` the array is guaranteed to only contain one object.
*/
export declare function scan(uniqueIdentifier?: string, timeout?: number): Promise<AppleTV[]>;
/**
* A convenience function to parse a credentials string into a Credentials object.
* @param text The credentials string.
* @returns A credentials object.
*/
export declare function parseCredentials(text: string): Credentials;
export { AppleTV, Browser, NowPlayingInfo, Credentials, Message, SupportedCommand };