Constructor
new JobsManager(options)
Parameters:
Name |
Type |
Description |
options |
Object
|
The client options.
Properties
Name |
Type |
Attributes |
Description |
baseUrl |
String
|
|
The URL of the API. |
headers |
Object
|
<optional>
|
Headers to be included in all requests. |
|
- Source:
Members
Type:
- Source:
Methods
get(params, cbopt) → {Promise|undefined}
Get a job by its ID.
Parameters:
Name |
Type |
Attributes |
Description |
params |
Object
|
|
Job parameters.
Properties
Name |
Type |
Description |
id |
String
|
Job ID. |
|
cb |
function
|
<optional>
|
Callback function. |
- Source:
Returns:
-
Type
-
Promise
|
undefined
Example
var params = {
id: '{JOB_ID}'
};
management.jobs.get(params, function (err, job) {
if (err) {
// Handle error.
}
// Retrieved job.
console.log(job);
});
importUsers(data, cbopt) → {Promise|undefined}
Given a path to a file and a connection id, create a new job that imports the
users contained in the file and associate them with the given connection.
Parameters:
Name |
Type |
Attributes |
Description |
data |
Object
|
|
Users import data.
Properties
Name |
Type |
Description |
connectionId |
String
|
Connection for the users insertion. |
users |
String
|
Path to the users data file. |
|
cb |
function
|
<optional>
|
Callback function. |
- Source:
Returns:
-
Type
-
Promise
|
undefined
Example
var params = {
connection_id: '{CONNECTION_ID}',
users: '{PATH_TO_USERS_FILE}'
};
management.jobs.get(params, function (err) {
if (err) {
// Handle error.
}
});
verifyEmail(data, cbopt) → {Promise|undefined}
Send a verification email to a user.
Parameters:
Name |
Type |
Attributes |
Description |
data |
Object
|
|
User data object.
Properties
Name |
Type |
Description |
user_id |
String
|
ID of the user to be verified. |
|
cb |
function
|
<optional>
|
Callback function. |
- Source:
Returns:
-
Type
-
Promise
|
undefined
Example
var params = {
user_id: '{USER_ID}'
};
management.jobs.verifyEmail(function (err) {
if (err) {
// Handle error.
}
});