File tree Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Expand file tree Collapse file tree 2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ public function getParamExample(array $param)
194194 $ output .= 'false ' ;
195195 break ;
196196 case self ::TYPE_STRING :
197- $ output .= " '' " ;
197+ $ output .= ' "" ' ;
198198 break ;
199199 case self ::TYPE_OBJECT :
200200 $ output .= 'new Object() ' ;
@@ -217,7 +217,7 @@ public function getParamExample(array $param)
217217 $ output .= ($ example ) ? 'true ' : 'false ' ;
218218 break ;
219219 case self ::TYPE_STRING :
220- $ output .= "' {$ example }' " ;
220+ $ output .= "\" {$ example }\" " ;
221221 break ;
222222 }
223223 }
@@ -249,6 +249,12 @@ public function getFiles()
249249 'template ' => '/csharp/LICENSE.twig ' ,
250250 'minify ' => false ,
251251 ],
252+ [
253+ 'scope ' => 'method ' ,
254+ 'destination ' => 'docs/examples/{{service.name | caseLower}}/{{method.name | caseDash}}.md ' ,
255+ 'template ' => '/csharp/docs/example.md.twig ' ,
256+ 'minify ' => false ,
257+ ],
252258 [
253259 'scope ' => 'default ' ,
254260 'destination ' => '/src/Appwrite.sln ' ,
Original file line number Diff line number Diff line change 1+ use {{ spec .title | caseUcfirst }};
2+
3+ Client client = new Client();
4+
5+ {% if method .security | length > 0 %}
6+ client
7+ .SetEndPoint("https://[HOSTNAME_OR_IP]/v1") # Your API Endpoint
8+ {% for node in method .security %}
9+ {% for key ,header in node | keys %}
10+ .Set{{header | caseUcfirst }}("{{node [header ][" x-appwrite" ]["demo" ]}}") # {{node [header ].description}}
11+ {% endfor %}
12+ {% endfor %};
13+
14+ {% endif %}
15+ {{ service .name | caseUcfirst }} {{ service .name | caseCamel }} = new {{ service .name | caseUcfirst }}(client);
16+
17+ result = {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% for parameter in method .parameters .all %}{% if parameter .required %}{% if not loop .first %}, {% endif %}{{ parameter | paramExample }}{% endif %}{% endfor %});
You can’t perform that action at this time.
0 commit comments