Class: DevicePins

DevicePins(client) → {void}

Simple manager for interacting with all Device Pin endpoints and actions.

Constructor

new DevicePins(client) → {void}

Parameters:
Name Type Description
client BoxClient The Box API Client that is responsible for making calls to the API
Source:
Returns:
Type
void

Methods

delete(pinID, optionsopt, callbackopt) → {Promise.<void>}

Delete a specific device pinning record API Endpoint: '/device_pinners/:pinID' Method: DELETE
Parameters:
Name Type Attributes Description
pinID string The ID of the pin to delete
options Object <optional>
Optional paramters, can be left null in many cases
callback function <optional>
Passed nothing if successful, error otherwise
Source:
Returns:
A promise resolving to nothing
Type
Promise.<void>

delete(pinID, optionsopt, callbackopt) → {Promise.<void>}

Delete a specific device pinning record API Endpoint: '/device_pinners/:pinID' Method: DELETE
Parameters:
Name Type Attributes Description
pinID string The ID of the pin to delete
options Object <optional>
Optional paramters, can be left null in many cases
callback function <optional>
Passed nothing if successful, error otherwise
Source:
Returns:
A promise resolving to nothing
Type
Promise.<void>

get(pinID, optionsopt, callbackopt) → {Promise.<Object>}

Get a specific device pinning record API Endpoint: '/device_pinners/:pinID' Method: GET
Parameters:
Name Type Attributes Description
pinID string The ID of the pin to retrieve
options Object <optional>
Optional paramters, can be left null in many cases
callback function <optional>
Passed the device pin if successful, error otherwise
Source:
Returns:
A promise resolving to the device pin object
Type
Promise.<Object>

get(pinID, optionsopt, callbackopt) → {Promise.<Object>}

Get a specific device pinning record API Endpoint: '/device_pinners/:pinID' Method: GET
Parameters:
Name Type Attributes Description
pinID string The ID of the pin to retrieve
options Object <optional>
Optional paramters, can be left null in many cases
callback function <optional>
Passed the device pin if successful, error otherwise
Source:
Returns:
A promise resolving to the device pin object
Type
Promise.<Object>

getAll(optionsopt, callbackopt) → {Promise.<Object>}

Get all device pin records for the current enterprise API Endpoint: '/enterprises/:enterpriseID/device_pinners' Method: GET
Parameters:
Name Type Attributes Description
options Object <optional>
Optional paramters, can be left null in many cases
callback function <optional>
Passed a list of device pins if successful, error otherwise
Source:
Returns:
A promise resolving to the collection of device pins
Type
Promise.<Object>

getAll(optionsopt, callbackopt) → {Promise.<Object>}

Get all device pin records for the current enterprise API Endpoint: '/enterprises/:enterpriseID/device_pinners' Method: GET
Parameters:
Name Type Attributes Description
options Object <optional>
Optional paramters, can be left null in many cases
callback function <optional>
Passed a list of device pins if successful, error otherwise
Source:
Returns:
A promise resolving to the collection of device pins
Type
Promise.<Object>