Class: Client

Client()

new Client()

A client for the Borzoo GraphQL API.

Source:

Methods

(async) createList(owner, list) → {Promise.<List>}

Creates a list on Zevere and returns the created list if successful.

Parameters:
Name Type Description
owner string

The to-be owner of the list.

list ListInput

An object containing the fields you wish to populate for your new list.

Source:
Returns:

A promise of containing the new list you've created.

Type
Promise.<List>

(async) createTask(userId, list, task) → {Promise.<Task>}

Adds a task to a chosen list for a user.

Parameters:
Name Type Description
userId string

The owner of the task.

list string

The list ID or name.

task TaskInput

Information about the task you wish to create.

Source:
Returns:

A promise containing the created task.

Type
Promise.<Task>

(async) deleteList(owner, listId) → {Promise.<boolean>}

Deletes an owner's list by ID.

Parameters:
Name Type Description
owner string

The person who owns the list you wish to delete.

listId string

The ID of the list that will be deleted.

Source:
Returns:

A promise containing true if deleted, false if not.

Type
Promise.<boolean>

(async) deleteTask(userId, listId, taskId) → {Promise.<boolean>}

Deletes a task for a Zevere user.

Parameters:
Name Type Description
userId string

The owner of the task.

listId string

The ID of the list that contains the task.

taskId string

The ID of the task you wish to delete.

Source:
Returns:
  • A promise containing a boolean to denote whether the operation passed or failed.
Type
Promise.<boolean>

(async) getList(owner, listId) → {Promise.<List>}

Retrieves a list from Zevere.

Parameters:
Name Type Description
owner string

The owner of the list.

listId string

The ID of the list you wish to retrieve.

Source:
Returns:
  • A promise containing the list you are asking for.
Type
Promise.<List>

(async) getLists(owner) → {Promise.<Array.<List>>}

Returns the lists that the specified owner has.

Parameters:
Name Type Description
owner string

The one who you wish to get the lists for.

Source:
Returns:

A promise containing the owner's lists.

Type
Promise.<Array.<List>>

(async) getTask(owner, listId, taskId)

Gets the specified task in the specified list.

Parameters:
Name Type Description
owner string

The owner of the task.

listId string

The ID of the list that the task belongs to.

taskId string

The ID of the task.

Source:
Returns:

(async) getTasks(owner, listId) → {Promise.<Array.<Task>>}

Gets all of the tasks for a specified list.

Parameters:
Name Type Description
owner string

The owner of the list and tasks.

listId string

The ID of the list that contains the tasks you want.

Source:
Returns:

A promise containing all of the tasks for the specified list.

Type
Promise.<Array.<Task>>