@wwdrew/expo-spotify-sdk
Version:
Expo module wrapping the native Spotify iOS (v5) and Android (v4) SDKs for OAuth authentication and App Remote playback control
38 lines • 1.21 kB
TypeScript
export type { ContentErrorCode } from "./error";
export { ContentError } from "./error";
export type ContentType = "default" | "navigation" | "fitness" | "gaming";
export interface ContentItem {
title: string | null;
subtitle: string | null;
contentDescription: string | null;
identifier: string;
uri: string;
imageIdentifier: string | null;
isAvailableOffline: boolean;
isPlayable: boolean;
isContainer: boolean;
isPinned: boolean;
children?: ContentItem[];
}
/**
* Spotify Content namespace. Browse Spotify's curated content tree.
* Requires `AppRemote.connect()` to be resolved before any call.
*
* @example
* ```ts
* import { Content } from "@wwdrew/expo-spotify-sdk";
*
* const items = await Content.getRecommendedContentItems("default");
* ```
*/
export declare const Content: {
/**
* Returns Spotify-curated recommended content for the given feed type.
*/
readonly getRecommendedContentItems: (type: ContentType) => Promise<ContentItem[]>;
/**
* Returns children of a browsable (container) content item.
*/
readonly getChildren: (item: ContentItem) => Promise<ContentItem[]>;
};
//# sourceMappingURL=index.d.ts.map