Skip to content

Commit 551cdae

Browse files
Merge pull request #658 from appwrite/fix-dotnet-docs
2 parents 6d747e4 + ac489c4 commit 551cdae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/dotnet/docs/example.md.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
using {{ spec.title | caseUcfirst }};
22
using {{ spec.title | caseUcfirst }}.Models;
33

4-
Client client = new Client()
4+
var client = new Client()
55
{% if method.auth|length > 0 %}
66
.SetEndPoint("https://cloud.appwrite.io/v1") // Your API Endpoint
77
{% for node in method.auth %}
88
{% for key,header in node|keys %}
99
.Set{{header | caseUcfirst}}("{{node[header]['x-appwrite']['demo']}}"){% if loop.last %};{% endif %} // {{node[header].description}}
1010
{% endfor %}{% endfor %}{% endif %}
1111

12-
{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = new {{ service.name | caseUcfirst }}(client);
12+
var {{ service.name | caseCamel }} = new {{ service.name | caseUcfirst }}(client);
1313

14-
{% if method.type == 'location' %}byte[]{% else %}{{ method.responseModel | caseUcfirst | overrideIdentifier }}{% endif %} result = await {{ service.name | caseCamel }}.{{ method.name | caseUcfirst }}({% if method.parameters.all | length == 0 %});{% endif %}
14+
{% if method.method != 'delete' %}{% if method.type == 'location' %}byte[]{% else %}{{ method.responseModel | caseUcfirst | overrideIdentifier }}{% endif %} result = {% endif %}await {{ service.name | caseCamel }}.{{ method.name | caseUcfirst }}({% if method.parameters.all | length == 0 %});{% endif %}
1515
{% for parameter in method.parameters.all %}{% if parameter.required %}{% if not loop.first %},{% endif %}
1616

1717
{{ parameter.name }}: {{ parameter | paramExample }}{% endif %}{% endfor %}{% if method.parameters.all | length > 0 %});{% endif %}

0 commit comments

Comments
 (0)