@zezosoft/zezo-ott-api-client
v0.2.8
Published
The official TypeScript SDK for Zezo OTT API. Easily integrate Zezo OTT into your applications with a powerful, developer-friendly package for video streaming, authentication, payments, and more.
Downloads
193
Maintainers
Readme
@zezosoft/zezo-ott-api-client 🎬
installing
npm install --save @zezosoft/zezo-ott-api-client@latestUsing
Typescript
import { ZezoOTT } from "@zezosoft/zezo-ott-api-client";
const zott = new ZezoOTT({ baseUrl: "your-base-url" });
const main = async () => {
const data = await zott.settings.getSettings();
console.log(data);
};
main();Javascript/Nodejs
const { ZezoOTT } = require("@zezosoft/zezo-ott-api-client");
const zott = new ZezoOTT({ baseUrl: "your-base-url" });
const main = async () => {
const data = await zott.settings.getSettings();
console.log(data);
};
main();Docs
- getList
- create
- getManage
- actions
- update
- removeTitleImage
- getSeasonManage
- createSeason
- deleteSeason
- updateSeason
- createEpisode
- deleteEpisode
- updateEpisode
- manageSubtitles
- uploadImages
- deleteImage
- get
- getSeasons
- getIsContentBuyedOrRented
- getTvod
- updateGeoLocation
- fetchSearchResults
- createImageSize
- listImageSizes
- deleteImageSize
- syncTvodContent
Custom / Raw Requests
Every service inherits a public request<T>(config) method from BaseService. It uses the same Axios client (same baseURL, headers, withCredentials, and interceptors) so you don't need to set those up again. Use it when the SDK doesn't have a dedicated method for an endpoint yet.
const response = await zott.settings.request({
method: "GET",
url: "/api/v1/some-new-endpoint",
params: { page: 1, limit: 10 },
});
console.log(response.data);const response = await zott.users.request({
method: "POST",
url: "/api/v1/some-new-endpoint",
data: { name: "example" },
});
console.log(response.data);Any service instance works — zott.users.request(...), zott.settings.request(...), zott.auth.request(...), etc. The underlying Axios client is identical across all services.
TypeScript
You can pass a generic type parameter to get typed response.data:
interface MyResponse {
id: string;
status: string;
}
const response = await zott.settings.request<MyResponse>({
method: "GET",
url: "/api/v1/custom-endpoint",
});
console.log(response.data.id); // typed as string