/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { statsAccountGet } from "../funcs/statsAccountGet.js"; import { statsAccountGetStatsAccountByDate } from "../funcs/statsAccountGetStatsAccountByDate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class StatsAccount extends ClientSDK { /** * Show Current Account Stats * * @remarks * Retrieve account-wide video stats. Get statistics like the number of video loads, plays, and hours watched for the entire account. * * * ## Requires api token with one of the following permissions * ``` * Read detailed stats * ``` * */ async get( options?: RequestOptions, ): Promise { return unwrapAsync(statsAccountGet( this, options, )); } /** * Show Account Stats by Date * * @remarks * Retrieve account-wide stats organized by day, between a start and end date parameter (inclusive). If start and end date are not provided, defaults to yesterday and today. * * * ## Requires api token with one of the following permissions * ``` * Read detailed stats * ``` * */ async getStatsAccountByDate( request?: operations.GetStatsAccountByDateRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapAsync(statsAccountGetStatsAccountByDate( this, request, options, )); } }