This commit is contained in:
Tony Tam 2015-01-21 23:19:13 -08:00
commit 2f6bf95fa2

View File

@ -30,7 +30,6 @@ class {{classname}} {
/** /**
* {{nickname}} * {{nickname}}
* {{summary}} * {{summary}}
*
{{#allParams}} {{#allParams}}
* @param {{dataType}} ${{paramName}} {{description}} ({{^optional}}required{{/optional}}{{#optional}}optional{{/optional}}) * @param {{dataType}} ${{paramName}} {{description}} ({{^optional}}required{{/optional}}{{#optional}}optional{{/optional}})
{{/allParams}} {{/allParams}}
@ -67,10 +66,20 @@ class {{classname}} {
} }
{{/pathParams}} {{/pathParams}}
//make the API Call // Generate form params
if (! isset($body)) { if (! isset($body)) {
$body = array();
}
{{#formParams}}
if(${{paramName}} != null) {
$body['{{paramName}}'] = ${{paramName}};
}
{{/formParams}}
if (empty($body)) {
$body = null; $body = null;
} }
// Make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method, $response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body, $queryParams, $body,
$headerParams); $headerParams);