Context
- Copyright:
- 2015–2020 RewardOps Inc.
- Source:
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 |
- Source:
Returns:
Returns context instance object.
- Type
- 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') |
- Source:
Returns:
Returns context type object.
- Type
- ContextType
Type Definitions
ContextInstance
Context instance type definition
Type:
- object
Properties:
| Name | Type | Description |
|---|---|---|
contextTypeName |
string | See |
id |
number | See |
handle |
function | Context handler function |
- Source:
ContextType
Context type type definition
Type:
- object
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) |
- Source: