new TeamCampaign(self)
A new campaign api object.
Parameters:
Name | Type | Description |
---|---|---|
self |
object | is `this` from index.js |
- Source:
Methods
get(id, callback)
returns information about a campaign.
The total raised is in this returned object.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getChallenges(id, callback)
returns all targets for a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Deprecated:
- replaced with getTargets to match tiltify naming scheme
- Source:
getDonationMatches(id, callback)
returns all donation matching offers from a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getDonations(id, callback)
returns ALL donations from a campaign.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getLeaderboards(id, timeType, callback)
returns leaderboards for a team campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | team id to look up |
timeType |
string | Time range for leaderboard (daily, weekly, monthly, yearly, ytd, all) |
callback |
requestCallback | a function to call when we're done getting data |
- Source:
getMilestones(id, callback)
returns all polls for a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getPolls(id, callback)
returns all polls for a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getRecentDonations(id, callback)
returns the most recent page of donations.
Use this if polling for new donations.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getRewards(id, callback)
returns all rewards for a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getSchedule(id, callback)
returns the schedule of a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getSupportingCampaigns(id, callback)
returns all supporting campaigns for a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source:
getTargets(id, callback)
returns all targets for a campaign
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The campaign ID that you're looking up |
callback |
requestCallback | A function to call when we're done getting data |
- Source: