@persian-caesar/aparat.js
Version:
The aparat website services for npm package.
31 lines (30 loc) • 1.39 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Aparat = void 0;
const events_1 = require("./core/events");
const video_1 = require("./services/video");
const user_1 = require("./services/user");
const api_1 = require("./core/api");
// The Aparat class acts as a unified interface to interact with various services.
// It encapsulates user operations, video operations, and event handling.
class Aparat {
constructor() {
// Create an instance of ApiService which is used by both UserService and VideoService.
const apiService = new api_1.ApiService();
// Initialize the user service with the API service.
this.user = new user_1.UserService(apiService);
// Initialize the video service with the API service.
this.video = new video_1.VideoService(apiService);
// Initialize the event emitter with the user service for live stream event handling.
this.events = new events_1.AparatEventEmitter(this.user);
}
}
exports.Aparat = Aparat;
/**
* @copyright
* Code by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA
* Developed for Persian Caesar | https://github.com/Persian-Caesar | https://dsc.gg/persian-caesar
*
* If you encounter any issues or need assistance with this code,
* please make sure to credit "Persian Caesar" in your documentation or communications.
*/