Programs resources
- Copyright:
- 2015–2020 RewardOps Inc.
Members
object
# inner constant programs
A program-specific context type object with getAll
and get
methods.
NOTE: Response may be paginated if you have many programs.
- See:
-
module:context
for more information.
Example
// Get a list of all programs available to you.
RO.programs.getAll((error, responseBody, response) => {
if (error) {
console.log(error);
} else {
console.log(result);
}
});
Methods
# inner program(id, code) → {object}
Get details of a program.
The program object has methods for accessing the program's rewards and orders.
Parameters:
Name | Type | Description |
---|---|---|
id |
number
|
The ID of a program |
code |
string
|
v5 uses |
A program object for the program with the given ID
object
Example
// Get details for program 123
const myProgram = RO.program(123);
myProgram.details((error, responseBody, response) => {
if (error) {
console.log(error);
} else {
console.log(result);
}
});