UNPKG

cloudapp-dl

Version:

CloudApp/Zight API client and CLI. Use as a CLI tool to download videos or as a programmatic library to interact with the Zight API.

40 lines (35 loc) 1.11 kB
/** * cloudapp-dl - Zight/CloudApp API Client * * Use as a programmatic library: * * @example * import { ZightClient } from 'cloudapp-dl'; * * // With email/password * const client = new ZightClient({ * email: 'user@example.com', * password: 'password' * }); * await client.login(); * * // Or with existing session * const client = new ZightClient({ sessionId: 'abc123' }); * * // Use API methods * const account = await client.getAccountDetails(); * const notifications = await client.getNotifications({ limit: 10 }); * const items = await client.getAllItems(); * const result = await client.uploadFile('./screenshot.png'); * console.log(result.share_url); * * @example * // For advanced usage, you can also import raw API functions * import { getNotifications, uploadFile } from 'cloudapp-dl/api'; */ // Main export - the ZightClient class export { ZightClient, default } from './client.js'; // Re-export all API functions for advanced users export * from './api.js'; // Export auth utilities export { performLogin, extractSessionFromCookies } from './auth.js';