zab-client

0.3.3 • Public • Published

Zab Client

Build Status JavaScript Style Guide

A Node wrapper for the Zab API.

Getting Started

$ npm install zab-client --save
const ZabClient = require('zab-client')
const zab = new ZabClient({ /* options */ })

Options

  • token - The API token to use for each request. Defaults to value in ~/.zab/config.json
  • endpoint - The full URL of the Zab API. Defaults to https://api.zab.io
  • raw - Whether to return the raw query instead of sending to API. All functions will return strings instead of promises when this is enabled. Defaults to false

Query Selections

You can override the default GraphQL query selections by chaining the .select() method with any other function.

zab.select('firstName sites { name }').getAccount()

Reference

public

No authentication is required to call these methods.

account
sessions
sites
domains
collaborators
deployments
  • zab.createDeploy
  • zab.activateDeploy
  • zab.waitForFile
other

License

MIT © Zab

Package Sidebar

Install

npm i zab-client

Weekly Downloads

1

Version

0.3.3

License

MIT

Last publish

Collaborators

  • npm