// Install the SDK
// npm install @boostmeup/sdk
import BoostMeUp from '@boostmeup/sdk';
const client = new BoostMeUp({
apiKey: 'bmu_live_xxxxxxxxxxxxxx',
});
// Fetch analytics for an account
const analytics = await client.analytics.get({
accountId: 'acc_abc123',
from: '2025-01-01',
to: '2025-01-31',
});
console.log(analytics.followers_gained); // 1,240
console.log(analytics.engagement_rate); // 4.7%
// Create a new campaign
const campaign = await client.campaigns.create({
accountId: 'acc_abc123',
targeting: {
hashtags: ['#fitness', '#wellness'],
locations: ['New York, NY'],
},
dailyLimit: 150,
});
console.log(campaign.id); // camp_xyz789