/**
  * @param string $action
  *
  * @returns array
  */
 private function generateOperation($action)
 {
     $details = $this->client->paraminfo(array('modules' => $action));
     $details = $details['paraminfo']['modules'][0];
     $operation = array();
     $operation['extends'] = '_abstract_request';
     $mustBePosted = array_key_exists('mustbeposted', $details);
     if ($mustBePosted) {
         $operation['httpMethod'] = 'POST';
     } else {
         $operation['httpMethod'] = 'GET';
     }
     if (array_key_exists('description', $details)) {
         $operation['summary'] = $details['description'];
     }
     if (array_key_exists('prefix', $details)) {
         $prefix = $details['prefix'];
     } else {
         $prefix = '';
     }
     if (array_key_exists('parameters', $details)) {
         $operation['parameters'] = $this->generateParameters($action, $details['parameters'], $mustBePosted, $prefix);
     }
     return $operation;
 }
 /**
  * @returns array
  */
 public function generateList()
 {
     $config = $this->client->getConfig();
     $request = $this->client->get($config['base_url']);
     $result = $request->send();
     $body = $result->getBody(true);
     preg_match_all('/\\*\\saction\\=(\\S+?)\\s/', $body, $matches);
     $actions = $matches[1];
     return array_unique($actions);
 }