zab-client

Wrapper for the Zab API

Usage no npm install needed!

<script type="module">
  import zabClient from 'https://cdn.skypack.dev/zab-client';
</script>

README

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