Skip to content

Commit

Permalink
fix: remove obsolete endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnarkhede committed Feb 23, 2024
1 parent fe23146 commit 4fcfa6d
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/campaign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,37 +58,12 @@ export class Campaign<StreamChatGenerics extends ExtendableGenerics = DefaultGen
return await this.client.delete<APIResponse>(this.client.baseURL + `/campaigns/${this.id}`);
}

async schedule(params: { scheduledFor: number }) {
this.verifyCampaignId();

const { scheduledFor } = params;
const { campaign } = await this.client.patch<{ campaign: Campaign }>(
this.client.baseURL + `/campaigns/${this.id}/schedule`,
{
scheduled_for: scheduledFor,
},
);
return campaign;
}

async stop() {
this.verifyCampaignId();

return this.client.patch<{ campaign: Campaign }>(this.client.baseURL + `/campaigns/${this.id}/stop`);
}

async pause() {
this.verifyCampaignId();

return this.client.patch<{ campaign: Campaign }>(this.client.baseURL + `/campaigns/${this.id}/pause`);
}

async resume() {
this.verifyCampaignId();

return this.client.patch<{ campaign: Campaign }>(this.client.baseURL + `/campaigns/${this.id}/resume`);
}

async get() {
this.verifyCampaignId();

Expand Down

0 comments on commit 4fcfa6d

Please sign in to comment.