Api
Version
mediamosa-21Class
mediamosa_rest_call_group_listCode
File: /sites/all/modules/mediamosa/modules/user/group/mediamosa_user_group.rest.inc
<?php
/**
* URI: /group
*
* Method: GET
*
* 1.x: user_management_list_group
*
*/
class mediamosa_rest_call_group_list extends mediamosa_rest_call {
// ------------------------------------------------------------------ Consts.
// Rest vars;
// ------------------------------------------------------------------ Get Var Setup.
public function get_var_setup() {
$a_var_setup = array();
// Enrich with range.
$a_var_setup = self::get_var_setup_range($a_var_setup);
// Enrich with required REST vars.
return self::get_var_setup_default($a_var_setup);
}
// ------------------------------------------------------------------ Do Call.
public function do_call() {
$o_mediamosa = mediamosa::get();
$a_app_ids = $this->get_param_value_app();
$app_id = reset($a_app_ids);
$offset = $this->get_param_value_offset();
$limit = $this->get_param_value_limit();
// Fetch the items.
$result = mediamosa_user::get_all(FALSE, $app_id, $offset, $limit);
// Fill the response.
foreach ($result as $row) {
$o_mediamosa->add_item($row);
}
// Set total count.
$o_mediamosa->item_count_total = $result->found_rows;
}
}