Skip to content

Commit

Permalink
Merge pull request #658 from appwrite/fix-dotnet-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lohanidamodar authored May 16, 2023
2 parents 6d747e4 + ac489c4 commit 551cdae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions templates/dotnet/docs/example.md.twig
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
using {{ spec.title | caseUcfirst }};
using {{ spec.title | caseUcfirst }}.Models;

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

{{ service.name | caseUcfirst }} {{ service.name | caseCamel }} = new {{ service.name | caseUcfirst }}(client);
var {{ service.name | caseCamel }} = new {{ service.name | caseUcfirst }}(client);

{% 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 %}
{% 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 %}
{% for parameter in method.parameters.all %}{% if parameter.required %}{% if not loop.first %},{% endif %}

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

0 comments on commit 551cdae

Please sign in to comment.