new Campaign(client)
A new campaign api object.
Parameters:
| Name | Type | Description |
|---|---|---|
client |
object | `this` from index.js |
- Source:
Methods
(async) get(campaignId, callback)
Get a campaign by its ID
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getBySlug(ownerSlug, campaignSlug, callback)
Get a campaign by its slugs
Parameters:
| Name | Type | Description |
|---|---|---|
ownerSlug |
string | The owner of the slug (either user or team slug) |
campaignSlug |
string | The owner of the slug (either user or team slug) |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getChallenges(campaignId, callback)
Get all targets of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Deprecated:
- Source:
(async) getDonations(campaignId, callback)
Get all donations of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getDonorLeaderboards(campaignId, callback)
Get the top donors of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getMilestones(campaignId, callback)
Get all milestones of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getPolls(campaignId, callback)
Get all polls of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getRecentDonations(campaignId, callback)
Get the most recent 10 donations of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getRewards(campaignId, callback)
Get all rewards of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getSchedule(campaignId, callback)
Get all schedule items of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getSupportingCampaigns(campaignId, callback)
Get all supporting campaigns of a campaign - Only supported for team campaigns!
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getTargets(campaignId, callback)
Get all targets of a campaign
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign or legacy ID |
callback |
function | Callback to execute when done (optional) |
- Source:
(async) getUserLeaderboards(campaignId, callback)
Get the top fundraisers of a campaign - Only supported for team campaigns!
Parameters:
| Name | Type | Description |
|---|---|---|
campaignId |
string | ID of the Campaign |
callback |
function | Callback to execute when done (optional) |
- Source: