Global

Type Definitions

ClientOptions

Type:
  • object
Properties:
Name Type Attributes Description
request object <optional>
pass in a specific version of the request library.
promise object <optional>
pass in a specific version of promise library.
requestOptions object <optional>
a base set of options provided to Request, overridden by options passed to a specific API method. defaults to empty object.
decamelizeKeys boolean <optional>
whether to automagically translate query and JSON body keys to use underscore separated names.
protocol string <optional>
defaults to https.
hostname string <optional>
defaults to api.digitalocean.com.
port string <optional>
defaults to protocol default (e.g. with a protocol of https defaults to 443).
Source:

listRequestCallback(error, listResource, headers, body)

Every resource method accepts an optional callback as the last argument.
Parameters:
Name Type Description
error object An error or null if no error occurred.
listResource ListResponse The list resource or null if error.
headers object An object containing the response headers.
body string The raw response body.
Source:

requestCallback(error, resource, headers, body)

Every resource method accepts an optional callback as the last argument.
Parameters:
Name Type Description
error object An error or null if no error occurred.
resource object The resource or null if error.
headers object An object containing the response headers.
body string The raw response body.
Source:

Resources

Type:
  • object
Properties:
Name Type Description
resource_id string a resource ID.
resource_type string a resource type.
Source: