@gobistories/gobi-web-integration
Version:
This library will let you put your Gobi stories on your site.
49 lines (48 loc) • 1.29 kB
TypeScript
import { HttpClient } from './http-client';
interface Team {
id: string;
name: string;
organizationId: string;
}
interface Collection {
id: string;
teamId: string;
organizationId: string;
tag: string | null;
title: string;
embedType: 'bubbles' | 'cards';
storyIds: string[];
createdAt: number;
publishedAt: number;
}
interface Story {
id: string;
teamId: string;
organizationId: string;
title: string;
thumbnailUrl: string;
webmThumbnailUrl: string;
mp4ThumbnailUrl: string;
coverUrl: string;
webmCoverUrl: string;
mp4CoverUrl: string;
posterUrl: string;
createdAt: number;
publishedAt: number;
}
declare class GobiApiException extends Error {
readonly statusCode: number;
readonly url?: string;
constructor(statusCode: number, message: string, url?: string);
}
declare class ApiClient {
protected httpClient: HttpClient;
private readonly apiKey;
private readonly baseUrl;
constructor(httpClient: HttpClient, apiKey: string, baseUrl?: string);
private request;
teams(): Promise<Team[]>;
collections(teamId?: string): Promise<Collection[]>;
stories(teamId?: string): Promise<Story[]>;
}
export { ApiClient, GobiApiException, Team, Collection, Story };