Module: resources/items

Items resources

Source:
Source:

Methods

(protected, inner) getAllProgramItems(programId) → {module:resources/items~GetAllFunc}

Higher order function for creating a getAll program items function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns getAll program items function.

Type
module:resources/items~GetAllFunc

(protected, inner) getAllProgramItems(programId) → {module:resources/items~GetAllFunc}

Higher order function for creating a getAll program items function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns getAll program items function.

Type
module:resources/items~GetAllFunc

(protected, inner) getProgramItem(programId) → {module:resources/items~GetFunc}

Higher order function for creating a get program item function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns get program item function.

Type
module:resources/items~GetFunc

(protected, inner) getProgramItemParameters(programId) → {module:resources/items~GetParametersFunc}

Higher order function for creating a getParameters program item function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns getParameters program item function.

Type
module:resources/items~GetParametersFunc

(inner) getSavedItemsSummary(programCode)

Parameters:
Name Type Description
programCode string

string that contains the programCode

Source:
Returns:

api caller

(inner) items(programId) → {module:resources/items~ProgramItems}

Factory for items objects.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
Returns:

Program items object.

Type
module:resources/items~ProgramItems
Example
// Returns a items object for the program with ID 55
const items = ro.program(756).items;

(inner) memberSavedItems(programId, code) → {module:resources/member_saved_items~ProgramItems}

Factory for items objects.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

code
Source:
Returns:

Program items object.

Type
module:resources/member_saved_items~ProgramItems
Example
// Returns a items object for the program with ID 55
const items = ro.program(756).items;

Type Definitions

GetAllFunc

Function for getting an array of item JSON objects.

Properties:
Name Type Description
params object

Request params to pass to the API call

callback module:api~requestCallback

Callback that handles the response

Source:
Example
// Gets an array of item detail objects the program with id 12
ro.program(12).items.getAll((error, responseBody, response) => {
  // ...
});

GetFunc

Function for getting a item JSON object.

Properties:
Name Type Description
itemId string

Program item ID

params object

Request params to pass to the API call

callback module:api~requestCallback

Callback that handles the response

Source:
Example
// Get JSON for the item with ID 938
ro.program(12).items.get(938, (error, responseBody, response) => {
  if (error) {
    console.log(error);
  } else {
    console.log(result);
  }
});

GetParametersFunc

Function for getting an array of filter parameter JSON objects that are relevant to the program.

Properties:
Name Type Description
params object

Request params to pass to the API call

callback module:api~requestCallback

Callback that handles the response

Source:
Example
// Gets an array of filter parameter objects for the program with id 12
ro.program(12).items.getParameters((error, responseBody, response) => {
  // ...
});

ProgramItems

Program items object.

Properties:
Name Type Description
programId number

The ID of the item's parent program

get module:resources/items~GetFunc

get program item function.

getAll module:resources/items~GetAllFunc

getAll program items function.

getParameters function

Get parameters function

Source:

ProgramItems

Program items object.

Properties:
Name Type Description
programId number

The ID of the item's parent program

getAll module:resources/msmber_saved_items~GetAllFunc

getAll program items function.

summary module:resources/member_saved_items_summary~GetAllSummaryFunc
Source:

Member Saved Items resources

Source:
Source:

Methods

(protected, inner) getAllProgramItems(programId) → {module:resources/items~GetAllFunc}

Higher order function for creating a getAll program items function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns getAll program items function.

Type
module:resources/items~GetAllFunc

(protected, inner) getAllProgramItems(programId) → {module:resources/items~GetAllFunc}

Higher order function for creating a getAll program items function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns getAll program items function.

Type
module:resources/items~GetAllFunc

(protected, inner) getProgramItem(programId) → {module:resources/items~GetFunc}

Higher order function for creating a get program item function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns get program item function.

Type
module:resources/items~GetFunc

(protected, inner) getProgramItemParameters(programId) → {module:resources/items~GetParametersFunc}

Higher order function for creating a getParameters program item function.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
See:
Returns:

Returns getParameters program item function.

Type
module:resources/items~GetParametersFunc

(inner) getSavedItemsSummary(programCode)

Parameters:
Name Type Description
programCode string

string that contains the programCode

Source:
Returns:

api caller

(inner) items(programId) → {module:resources/items~ProgramItems}

Factory for items objects.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

Source:
Returns:

Program items object.

Type
module:resources/items~ProgramItems
Example
// Returns a items object for the program with ID 55
const items = ro.program(756).items;

(inner) memberSavedItems(programId, code) → {module:resources/member_saved_items~ProgramItems}

Factory for items objects.

Parameters:
Name Type Description
programId number

The ID of the item's parent program

code
Source:
Returns:

Program items object.

Type
module:resources/member_saved_items~ProgramItems
Example
// Returns a items object for the program with ID 55
const items = ro.program(756).items;

Type Definitions

GetAllFunc

Function for getting an array of item JSON objects.

Properties:
Name Type Description
params object

Request params to pass to the API call

callback module:api~requestCallback

Callback that handles the response

Source:
Example
// Gets an array of item detail objects the program with id 12
ro.program(12).items.getAll((error, responseBody, response) => {
  // ...
});

GetFunc

Function for getting a item JSON object.

Properties:
Name Type Description
itemId string

Program item ID

params object

Request params to pass to the API call

callback module:api~requestCallback

Callback that handles the response

Source:
Example
// Get JSON for the item with ID 938
ro.program(12).items.get(938, (error, responseBody, response) => {
  if (error) {
    console.log(error);
  } else {
    console.log(result);
  }
});

GetParametersFunc

Function for getting an array of filter parameter JSON objects that are relevant to the program.

Properties:
Name Type Description
params object

Request params to pass to the API call

callback module:api~requestCallback

Callback that handles the response

Source:
Example
// Gets an array of filter parameter objects for the program with id 12
ro.program(12).items.getParameters((error, responseBody, response) => {
  // ...
});

ProgramItems

Program items object.

Properties:
Name Type Description
programId number

The ID of the item's parent program

get module:resources/items~GetFunc

get program item function.

getAll module:resources/items~GetAllFunc

getAll program items function.

getParameters function

Get parameters function

Source:

ProgramItems

Program items object.

Properties:
Name Type Description
programId number

The ID of the item's parent program

getAll module:resources/msmber_saved_items~GetAllFunc

getAll program items function.

summary module:resources/member_saved_items_summary~GetAllSummaryFunc
Source: