This is an unofficial sdk for branch.io. See API reference for what you can do with branch here
Features
- Initialize SDK using either
appId
orbranchKey
Installation
> npm install branchio-sdk
Usage
const branchio = const client = const url = await clientlink alias: '' stage: 'new user' channel: 'facebook' feature: 'dashboard' campaign: 'content 123' tags: 'tag1' 'tag2' 'tag3' data: 'custom_bool': true '$og_title': 'Title' '$og_description': 'Description' '$og_image_url': 'https://lorempixel.com/400/400' //=> https://example.app.link/0AjuiLcpqF
Methods
link()
This method is use for creating a deep link. See corresponding docs here
const url = await clientlink alias: '' stage: 'new user' channel: 'facebook' feature: 'dashboard' campaign: 'content 123' tags: 'tag1' 'tag2' 'tag3' data: 'custom_bool': true '$og_title': 'Title' '$og_description': 'Description' '$og_image_url': 'https://lorempixel.com/400/400' //=> https://example.app.link/0AjuiLcpqF
bulkLinks()
This method allows you to create multiple deep links at a go. See docs
const links = await client// => [{ url: 'https://example.app.link/xUrsD0P' }, { url: 'https:/example.app.link/erTweDt' }]
readLink()
This method is for reading details of a deep link. See corresponding docs here
const linkData = await client//=> link data
updateLink()
This method is for updating details of a deep link
const client = const updateData = await client //=> link data
TODO:
- Add method to read link
- Add method to update link
- Add method to update link tips
- Add method to create events
- Add method to create commerce events
- Add method to read user
- Add method to create referral link
- Add method to create referral reward
...