UNPKG

@basetime/a2w-api-ts

Version:

Client library that communicates with the addtowallet API.

24 lines (23 loc) 663 B
import { CampaignStats } from '../../types/CampaignStats'; import Endpoint from '../Endpoint'; /** * Communicate with the `/campaigns/:campaignId/stats` sub-endpoint. * * Accessed via `client.campaigns.stats`. */ export default class CampaignStatsEndpoint extends Endpoint { /** * Constructor. * * @param parent The parent `CampaignsEndpoint` whose `req`, `do`, and `qb` are * reused. */ constructor(parent: Endpoint); /** * Returns statistics for a campaign. * * @param campaignId The ID of the campaign. * @returns The statistics. */ get: (campaignId: string) => Promise<CampaignStats>; }