
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@bandada/api-sdk
Advanced tools
A Typescript SDK for the Bandada API.
This package provides a list of functions to make it easier to work with the Bandada API. |
---|
Install the @bandada/api-sdk
package with npm:
npm i @bandada/api-sdk
or yarn:
yarn add @bandada/api-sdk
# new ApiSdk(url: SupportedUrl | string, config?: object): ApiSdk
Creates a new instance of ApiSdk using the API URL and the config.
const apiSdk = new ApiSdk()
const apiSdk = new ApiSdk("https://example.com/api")
const url = "https://example.com/api"
const config = {
headers: {
"Content-Type": "text/html"
}
}
const apiSdk = new ApiSdk(url, config)
# getGroups(): Promise<GroupResponse[]>
Returns the list of groups.
const groups = await apiSdk.getGroups()
# getGroup(): Promise<GroupResponse>
Returns a specific group.
const groupId = "10402173435763029700781503965100"
const group = await apiSdk.getGroup(groupId)
# isGroupMember(): Promise<boolean>
Returns true if the member is in the group and false otherwise.
const groupId = "10402173435763029700781503965100"
const memberId = "1"
const isMember = await apiSdk.isGroupMember(groupId, memberId)
# generateMerkleProof(): Promise<string>
Returns the Merkle Proof for a member in a group.
const groupId = "10402173435763029700781503965100"
const memberId = "1"
const proof = await apiSdk.generateMerkleProof(groupId, memberId)
# addMemberByApiKey(): Promise<void>
Adds a member to a group using an API Key.
const groupId = "10402173435763029700781503965100"
const memberId = "1"
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc"
await apiSdk.addMemberByApiKey(groupId, memberId, apiKey)
# addMemberByInviteCode(): Promise<void>
Adds a member to a group using an Invite Code.
const groupId = "10402173435763029700781503965100"
const memberId = "1"
const inviteCode = "MQYS4UR5"
await apiSdk.addMemberByInviteCode(groupId, memberId, inviteCode)
# removeMemberByApiKey(): Promise<void>
Removes a member from a group using an API Key.
const groupId = "10402173435763029700781503965100"
const memberId = "1"
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc"
await apiSdk.removeMemberByApiKey(groupId, memberId, apiKey)
FAQs
A Typescript SDK for the Bandada API.
We found that @bandada/api-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.