Context
- Copyright:
- 2015–2020 RewardOps Inc.
Methods
# inner contextInstance(contextTypeName, id, code) → {ContextInstance}
Return a context object (i.e. a program
object).
Parameters:
Name | Type | Description |
---|---|---|
contextTypeName |
string
|
The context type name (e.g., |
id |
number
|
The ID for the context |
code |
string
|
v5 uses |
Returns context instance object.
ContextInstance
# inner contextType(context) → {ContextType}
A context is a top-level actor in the RewardOps API.
NOTE: Currently, there is only one type of context ('programs')
Parameters:
Name | Type | Description |
---|---|---|
context |
string
|
The name of the context type ('programs') |
Returns context type object.
ContextType
Type Definitions
object
# ContextInstance
Context instance type definition
Properties:
Name | Type | Description |
---|---|---|
contextTypeName |
string
|
See |
id |
number
|
See |
|
function
|
object
# ContextType
Context type type definition
Properties:
Name | Type | Description |
---|---|---|
context |
string
|
Context value |
getAll |
function
|
Method that returns an array of context objects (e.g., programs) |
get |
function
|
Method that returns a context object (e.g., program) |