Skip to content

grindery-io/grindery-nexus-client

Repository files navigation

Grindery Nexus Client

JS wrapper for Nexus engine API

How to use

Install library

yarn add grindery-nexus-client

or

npm install grindery-nexus-client

Import client class

On frontend, for example in a ReactJS app:

import GrinderyClient from 'grindery-nexus-client';

On backend, for example in a NodeJS app:

import { default as GrinderyClient } from 'grindery-nexus-client';

Init client

const client = new GrinderyClient('{user_authentication_token}');

Call client methods

const listWorkflows = async () => {
  const workflows = await client.workflow.list();
};

How to migrate from version 0.x.x to 1.x.x

There are some changes you need to do in your code in order to upgrade library to 1.x.x version.

Here are some examples:

Client authentication

0.x.x
const client = new GrinderyClient();
client.authenticate('{user_authentication_token}');
1.x.x
const client = new GrinderyClient('{user_authentication_token}');

Workflow methods

0.x.x
const listWorkflows = async () => {
  const workflows = await client.listWorkflows();
};
1.x.x
const listWorkflows = async () => {
  const workflows = await client.workflow.list();
};

Workspace methods

0.x.x
const listWorkspaces = async () => {
  const workspaces = await client.listWorkspaces();
};
1.x.x
const listWorkflows = async () => {
  const workspaces = await client.workspace.list();
};

See full documentation in the DOCUMENTATION.md file.

Development

See DEVELOPMENT.md file.

License

MIT