new KeyList(version, accountSid)
Initialize the KeyList
Parameters:
Name | Type | Description |
---|---|---|
version |
Twilio.Api.V2010 | Version of the resource |
accountSid |
string | A 34 character string that uniquely identifies this resource. |
- Source:
Methods
each(optsopt, callbackopt)
Streams KeyInstance records from the API.
This operation lazily loads records as efficiently as possible until the limit
is reached.
The results are passed into the callback function, so this operation is memory
efficient.
If a function is passed as the first argument, it will be used as the callback
function.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||||||||||
callback |
function |
<optional> |
Function to process each record |
- Source:
get(sid) → {Twilio.Api.V2010.AccountContext.KeyContext}
Constructs a key
Parameters:
Name | Type | Description |
---|---|---|
sid |
string | The unique string that identifies the resource |
- Source:
Returns:
getPage(targetUrlopt, callbackopt) → {Promise}
Retrieve a single target page of KeyInstance records from the API.
The request is executed immediately.
If a function is passed as the first argument, it will be used as the callback
function.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
targetUrl |
string |
<optional> |
API-generated URL for the requested results page |
callback |
function |
<optional> |
Callback to handle list of records |
- Source:
Returns:
Resolves to a list of records
- Type
- Promise
list(optsopt, callbackopt) → {Promise}
Lists KeyInstance records from the API as a list.
If a function is passed as the first argument, it will be used as the callback
function.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||
callback |
function |
<optional> |
Callback to handle list of records |
- Source:
Returns:
Resolves to a list of records
- Type
- Promise
page(optsopt, callbackopt) → {Promise}
Retrieve a single page of KeyInstance records from the API.
The request is executed immediately.
If a function is passed as the first argument, it will be used as the callback
function.
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for request
Properties
|
||||||||||||||||
callback |
function |
<optional> |
Callback to handle list of records |
- Source:
Returns:
Resolves to a list of records
- Type
- Promise
toJSON()
Provide a user-friendly representation
- Source:
Returns:
Object