@zbproto/api
TypeScript icon, indicating that this package has built-in type declarations

0.3.18 • Public • Published

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: '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'
})

Readme

Keywords

Package Sidebar

Install

npm i @zbproto/api

Weekly Downloads

0

Version

0.3.18

License

ISC

Unpacked Size

2.62 MB

Total Files

177

Last publish

Collaborators

  • zbproto