New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@justeattakeaway/cc-braze-adapter

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@justeattakeaway/cc-braze-adapter

The promotion card component of content cards

  • 0.4.0
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
4
Weekly downloads
 
Created
Source

Braze Adapter

This is the package for the new braze adapter running on v4 of the Braze SDK. For the older version please see the fozzie components repo f-braze-aapter.

Installing the Adapter

To install the package run one of the following:

yarn add @justeattakewaway/cc-braze-adapter

npm install @justeattakewaway/cc-braze-adapter

You will also need to install the peer dependency of @braze/web-sdk:

yarn add @braze/web-sdk

npm install @braze/web-sdk

Instantiating the Adapter

To use the adapter you first have to call the function with an Object containing following parameters

{
    apiKey: "THIS IS THE BRAZE API KEY",
    sdkEndpoint: "ENDPOINT FOR BRAZE SDK",
    userId: "THE GLOBAL USER ID"
}

Example adapter call:

import brazeAdapter from "@justeattakeaway/cc-braze-adapter";

const adapter = brazeAdapter({
  apiKey: 'THIS IS THE BRAZE API KEY',
  sdkEndpoint: 'ENDPOINT FOR BRAZE SDK',
  userId: 'THE GLOBAL USER ID'
});

Using the adapter

Getting Cards

Once the adapter function has been called you then need to do the following to use the adapter. Callback have been used instead of promises as cards maybe returned more than once (updates to cards return if braze gets updates). This is something that you should factor into integration.

adapter.initalise((cards) => {
  // do somthing with cards
}, (error) => {
  // do somthing with errors
})

Getting Adapter Source

The adapter source can get obtained by using the source attribute on adapter.

adapter.source

Keywords

FAQs

Package last updated on 10 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc