@zbproto/api
v0.3.18
Published
Client libray for Zebra
Downloads
25
Readme
ZEBRA API
This API is a client for Zebra servers. It communicates using GRPC. It includes
- APIs for zebra
- Session management
Getting started
First install the package:
npm i @zbproto/api
Then in your application:
import {ZebraAgent} from @zbproto/api
const agent = new ZebraAgent()
Usage
Session management
// create a new account on the server
import {ZebraAgent} from @zbproto/api
const agent = new ZebraAgent()
await agent.createAccount({
firstName: 'Alice',
lastName: 'Bob',
email: '[email protected]',
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'
})