Class: ClasseurClient

classeur-api-client. ClasseurClient

Constructs a new API client.


new ClasseurClient(userId, apiKey [, host])

Parameters:
Name Type Argument Default Description
userId String

Classeur user ID string.

apiKey String

API Key string. Keep this secret.

host String <optional>
app.classeur.io

Fully qualified hostname to connect to. Connections will be made with HTTPS, regardless of whether the hostname is prefixed with http:// or https://.

Source:

Methods


getFile(id, callback)

Retrieve a single file.

Parameters:
Name Type Description
id String

Classeur file ID to retrieve.

callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be a File object, or null on error.
Source:

getFileMetadata(id, callback)

Retrieve metadata for a file.

Parameters:
Name Type Description
id String

The Classeur file ID for which to retrieve metadata.

callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

Source:

getFiles(&hellipids|[ids], callback)

Retrieve one or more files.

Parameters:
Name Type Argument Description
&hellipids|[ids] String | Array.<String> <repeatable>

An Array of strings, or multiple string arguments, each representing a Classeur file ID to retrieve.

  • See Plural Functions for more information on functions that can be called with an array or with variadic arguments.
  • One REST call is made (in parallel) per ID supplied.
callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be an Array of File objects, or null on error.
Source:

getFilesMetadata(&hellipids|[ids], callback)

Retrieve metadata for one or more files.

Parameters:
Name Type Argument Description
&hellipids|[ids] String | Array.<String> <repeatable>

An Array of strings, or multiple string arguments, each representing a Classeur file IDs for which to retrieve metadata.

  • See Plural Functions for more information on functions that can be called with an array or with variadic arguments.
callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be an Array of FileMetadata objects, or null on error.
Source:

getFolder(id, callback)

Retrieve a single folder.

Parameters:
Name Type Description
id String

Classeur folder ID to retrieve.

callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be a Folder object, or null on error.
Source:

getFolderMetadata(id, callback)

Retrieve metadata for a folder.

Parameters:
Name Type Description
id String

The Classeur folder ID for which to retrieve metadata.

callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

Source:

getFolders(&hellipids|[ids], callback)

Retrieve one or more folders.

Parameters:
Name Type Argument Description
&hellipids|[ids] String | Array.<String> <repeatable>

An Array of strings, or multiple string arguments, each representing a Classeur folder ID to retrieve.

  • See Plural Functions for more information on functions that can be called with an array or with variadic arguments.
  • One REST call is made (in parallel) per ID supplied.
callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be an Array of Folder objects, or null on error.
Source:

getFoldersMetadata(&hellipids|[ids], callback)

Retrieve metadata for one or more folders.

Parameters:
Name Type Argument Description
&hellipids|[ids] String | Array.<String> <repeatable>

An Array of strings, or multiple string arguments, each representing a Classeur folder IDs for which to retrieve metadata.

  • See Plural Functions for more information on functions that can be called with an array or with variadic arguments.
callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be an Array of FolderMetadata objects, or null on error.
Source:

getUserMetadata(id, callback)

Retrieve metadata for a user.

Parameters:
Name Type Description
id String

The Classeur user ID for which to retrieve metadata.

callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

Source:

getUsers(callback)

Retrieve all users on the Classeur account to which the ClasseurClient is connected.

Parameters:
Name Type Description
callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be an Array of User objects, or null on error.
Source:

getUsersMetadata(&hellipids|[ids], callback)

Retrieve metadata for one or more users.

Parameters:
Name Type Argument Description
&hellipids|[ids] String | Array.<String> <repeatable>

An Array of strings, or multiple string arguments, each representing a Classeur user IDs for which to retrieve metadata.

  • See Plural Functions for more information on functions that can be called with an array or with variadic arguments.
callback module:classeur-api-client.ScrubbedCallback

Called with (error, result). See ScrubbedCallback for more info.

  • result will be an Array of UserMetadata objects, or null on error.
Source: