@bradgarropy/captivate-sdk
Version:
🎤 captivate sdk
36 lines (35 loc) • 1.35 kB
TypeScript
import { AuthenticatedUser, Episode, Feed, ManagedShow, Media, ScheduledEpisode, Show, User } from "./types";
declare class Captivate {
userId: string;
apiKey: string;
token: AuthenticatedUser["token"] | null;
constructor(userId: string, apiKey: string);
authentication: {
authenticateUser: () => Promise<AuthenticatedUser>;
};
users: {
getUser: (userId: User["id"]) => Promise<User>;
getUsersShows: (userId: User["id"]) => Promise<Show[]>;
getUsersManagedShows: (userId: User["id"]) => Promise<ManagedShow[]>;
};
shows: {
getShow: (showId: Show["id"]) => Promise<Show>;
updateShow: () => void;
updateShowArtwork: () => void;
getShowEpisodes: (showId: Show["id"]) => Promise<Episode[]>;
getShowScheduledEpisodes: (showId: Show["id"]) => Promise<ScheduledEpisode[]>;
getShowFeedUrl: (showId: Show["id"]) => Promise<Feed>;
};
media: {
getMedia: (mediaId: Media["id"]) => Promise<Media>;
uploadMedia: () => void;
getShowMedia: (showId: Show["id"]) => Promise<Media[]>;
searchShowMedia: () => void;
};
episodes: {
getEpisode: (episodeId: Episode["id"]) => Promise<Episode>;
createEpisode: () => void;
updateEpisode: () => void;
};
}
export default Captivate;