This API is a client for Zebra servers. It communicates using GRPC. It includes
- APIs for zebra
- Session management
First install the package:
npm i @zbproto/api
Then in your application:
import {ZebraAgent} from @zbproto/api
const agent = new ZebraAgent()
// create a new account on the server
import {ZebraAgent} from @zbproto/api
const agent = new ZebraAgent()
await agent.createAccount({
firstName: 'Alice',
lastName: 'Bob',
email: 'alice@gmail.com',
handle: 'alice.zebra.com',
password: 'alice2'
});
// if no session was available, create a new one by logging in with handle and password
await agent.login({
handle: 'alice.zebra.com', password: 'alice2'
})