@flashcoffee/fcbraze
TypeScript icon, indicating that this package has built-in type declarations

1.2.61 • Public • Published

fcbraze

Installation

$ yarn add @flashcoffee/fcbraze

Setup

Set required environment variable for credentials

BRAZE_BASE_URL=https://some-rest-endpoint.braze.com
BRAZE_API_KEY=your-api-key-here

Usage

import FCBraze from '@flashcoffee/fcbraze';

await FCBraze.triggerCampaign();

OR

import {BrazeService} from '@flashcoffee/fcbraze';

@Injectable()
export class SomeService {
  constructor(
    private readonly braze: BrazeService,
  ) {}

  public async someMethod() {
    await this.braze.triggerCampaign();
  }
}

@Module({
  providers: [SomeService, BrazeService],
})
export class SomeModule {}

Available API

braze.api; // axios instance, example: braze.api.post('url', payload)
braze.trackUser();
braze.patchUserAttributes();
braze.patchUserEvents();
braze.patchUserPurchases();
braze.triggerCampaign();
braze.triggerCanvas();
braze.exportUser();

Readme

Keywords

Package Sidebar

Install

npm i @flashcoffee/fcbraze

Weekly Downloads

1

Version

1.2.61

License

ISC

Unpacked Size

32 kB

Total Files

32

Last publish

Collaborators

  • geunta.buwono.fc
  • hirzieji.fc
  • jasperleeflashcoffee
  • yesafc
  • vivinapriyanti
  • dorman-flash
  • peterandrew987
  • oki.aji
  • flashcoffeedev
  • robbyfc
  • sulfano.fikri
  • agustinuswd