public function requestAccountData($start_index=1, $max_results=1000) {
    $get_variables = array(
      'start-index' => $start_index,
      'max-results' => $max_results,
      );
    $url = new gapiRequest(gapi::account_data_url);
    $response = $url->get($get_variables, $this->auth_method->generateAuthHeader());

    if (substr($response['code'], 0, 1) == '2') {
      return $this->accountObjectMapper($response['body']);
    } else {
      throw new Exception('GAPI: Failed to request account data. Error: "' . strip_tags($response['body']) . '"');
    }
  }
public function requestAccountData($start_index=1, $max_results=1000) {
    $get_variables = array(
      'start-index' => $start_index,
      'max-results' => $max_results,
      );
    $url = new gapiRequest(gapi::account_data_url);
    $response = $url->get($get_variables, $this->auth_method->generateAuthHeader());

    if (substr($response['code'], 0, 1) == '2') {
      return $this->accountObjectMapper($response['body']);
    } else {
      throw new Exception('GAPI: Failed to request account data. Error: "' . strip_tags($response['body']) . '"');
    }
  }
public function requestAccountData ( $ start_index = 1 , $ max_results = 1000 ) { $ get_variables = array ( 'start-index' => $ start_index , 'max-results' => $ max_results , ) ; $ url = new gapiRequest ( gapi :: account_data_url ) ; $ response = $ url -> get ( $ get_variables , $ this -> auth_method -> generateAuthHeader ( ) ) ; if ( substr ( $ response [ 'code' ] , 0 , 1 ) == '2' ) { return $ this -> accountObjectMapper ( $ response [ 'body' ] ) ; } else { throw new Exception ( 'GAPI: Failed to request account data. Error: "' . strip_tags ( $ response [ 'body' ] ) . '"' ) ; } }
Request account data from Google Analytics

@param Int $start_index OPTIONAL: Start index of results
@param Int $max_results OPTIONAL: Max results returned
Request account data from Google Analytics