You've already forked AstralRinth
forked from didirus/AstralRinth
87c86c7d0d
* Reapply "fix: start swapping useBaseFetch usages to api-client" This reverts commit f4f33db7019ea861addb2c66c204d736800b7b6c. * fix: bugs * fix: analytics * fix: lint
27 lines
722 B
TypeScript
27 lines
722 B
TypeScript
import { AbstractModule } from '../../../core/abstract-module.js'
|
|
import type { Labrinth } from '../types'
|
|
|
|
export class LabrinthPayoutsV3Module extends AbstractModule {
|
|
public getModuleID(): string {
|
|
return 'labrinth_payouts_v3'
|
|
}
|
|
|
|
/**
|
|
* Get platform revenue data.
|
|
*
|
|
* @param params - Optional start/end date filters
|
|
* @returns Promise resolving to platform revenue data
|
|
*/
|
|
public async getPlatformRevenue(params?: {
|
|
start?: string
|
|
end?: string
|
|
}): Promise<Labrinth.Payouts.v3.RevenueResponse> {
|
|
return this.client.request<Labrinth.Payouts.v3.RevenueResponse>('/payout/platform_revenue', {
|
|
api: 'labrinth',
|
|
version: 3,
|
|
method: 'GET',
|
|
params: params as Record<string, string>,
|
|
})
|
|
}
|
|
}
|