22
22
{ {#operations} }
23
23
class { {classname} } {
24
24
25
- function __construct($apiClient ) {
26
- $this -> apiClient = $apiClient ;
27
- }
25
+ function __construct($apiClient ) {
26
+ $this -> apiClient = $apiClient ;
27
+ }
28
28
29
29
{ {#operation} }
30
- /**
31
- * { {{nickname} }}
30
+ /**
31
+ * { {{nickname} }}
32
32
*
33
- * { {{summary} }}
34
- { {#allParams} }* { {paramName} }, { {dataType} }: { {description} } { {^optional} }(required){ {/optional} }{ {#optional} }(optional){ {/optional} }
35
- * { {/allParams} }
36
- * @return { {{returnType} }}
37
- */
38
-
33
+ * { {{summary} }}
34
+ *
35
+ { {#allParams} } * @param { {dataType} } ${ {paramName} } { {description} } { {^optional} }(required){ {/optional} }{ {#optional} }(optional){ {/optional} }
36
+ { {/allParams} } * @return { {#returnType} }{ {{returnType} }}{ {/returnType} }{ {^returnType} }void{ {/returnType} }
37
+ */
39
38
public function { {nickname} }({ {#allParams} }${ {paramName} }{ {#optional} }=null{ {/optional} }{ {#hasMore} }, { {/hasMore} }{ {/allParams} }) {
40
39
41
- // parse inputs
42
- $resourcePath = " {{path}}" ;
43
- $resourcePath = str_replace(" {format}" , " json" , $resourcePath );
44
- $method = " {{httpMethod}}" ;
40
+ // parse inputs
41
+ $resourcePath = " {{path}}" ;
42
+ $resourcePath = str_replace(" {format}" , " json" , $resourcePath );
43
+ $method = " {{httpMethod}}" ;
45
44
$queryParams = array();
46
45
$headerParams = array();
47
46
$formParams = array();
@@ -50,17 +49,17 @@ class {{classname}} {
50
49
51
50
{{#queryParams} }// query params
52
51
if(${ {paramName} } !== null) {
53
- $queryParams [' {{baseName}}' ] = $this -> apiClient -> toQueryValue (${{paramName} });
54
- }{ {/queryParams} }
52
+ $queryParams [' {{baseName}}' ] = $this -> apiClient -> toQueryValue (${{paramName} });
53
+ }{ {/queryParams} }
55
54
{ {#headerParams} }// header params
56
55
if(${ {paramName} } !== null) {
57
- $headerParams [' {{baseName}}' ] = $this -> apiClient -> toHeaderValue (${{paramName} });
58
- }{ {/headerParams} }
56
+ $headerParams [' {{baseName}}' ] = $this -> apiClient -> toHeaderValue (${{paramName} });
57
+ }{ {/headerParams} }
59
58
{ {#pathParams} }// path params
60
59
if(${ {paramName} } !== null) {
61
- $resourcePath = str_replace(" {" . " {{baseName}}" . " }" ,
62
- $this -> apiClient -> toPathValue (${{paramName} }), $resourcePath);
63
- }{ {/pathParams} }
60
+ $resourcePath = str_replace(" {" . " {{baseName}}" . " }" ,
61
+ $this -> apiClient -> toPathValue (${{paramName} }), $resourcePath);
62
+ }{ {/pathParams} }
64
63
{ {#formParams} }// form params
65
64
if (${ {paramName} } !== null) {
66
65
$formParams [' {{baseName}}' ] = {{#isFile} }'@' . { {/isFile} }$this->apiClient->toFormValue(${ {paramName} });
@@ -78,10 +77,10 @@ class {{classname}} {
78
77
$body = http_build_query($body );
79
78
}
80
79
81
- // make the API Call
82
- $response = $this->apiClient->callAPI($resourcePath, $method,
83
- $queryParams, $body,
84
- $headerParams);
80
+ // make the API Call
81
+ $response = $this->apiClient->callAPI($resourcePath, $method,
82
+ $queryParams, $body,
83
+ $headerParams);
85
84
86
85
{ {#returnType} }if(! $response) {
87
86
return null;
0 commit comments