File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ class MainActivity : AppCompatActivity() {
2323 val {{ service .name | caseCamel }} = {{ service .name | caseUcfirst }}(client)
2424
2525 GlobalScope.launch {
26- val response = {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% if method .parameters .all | length == 0 %}){% endif %}
26+ {% if method . type == ' webAuth ' %} {% elseif method . type == ' location ' %} val result = {% else %} val response = {% endif %} {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% if method .parameters .all | length == 0 %}){% endif %}
2727
2828{% for parameter in method .parameters .all %}
2929{% if parameter .required %}
@@ -34,6 +34,8 @@ class MainActivity : AppCompatActivity() {
3434 )
3535{% endif %}
3636{% endfor %}
37+ {% if method .type == ' webAuth' %}{% elseif method .type == ' location' %} println(result); // Resource URL{% else %} val json = response.body?.string(){% endif %}
38+
3739 }
3840 }
3941}
Original file line number Diff line number Diff line change @@ -10,9 +10,8 @@ suspend fun main() {
1010 .set{{header | caseUcfirst }}("{{node [header ][' x-appwrite' ]['demo' ]}}") // {{node [header ].description}}
1111{% endfor %}{% endfor %}{% endif %}
1212
13-
1413 val {{ service .name | caseCamel }} = {{ service .name | caseUcfirst }}(client)
15- val response = {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% if method .parameters .all | length == 0 %}){% endif %}
14+ {% if method . type == ' webAuth ' %} {% elseif method . type == ' location ' %} val result = {% else %} val response = {% endif %} {{ service .name | caseCamel }}.{{ method .name | caseCamel }}({% if method .parameters .all | length == 0 %}){% endif %}
1615
1716{% for parameter in method .parameters .all %}
1817{% if parameter .required %}
@@ -23,4 +22,6 @@ suspend fun main() {
2322 )
2423{% endif %}
2524{% endfor %}
25+ {% if method .type == ' webAuth' %}{% elseif method .type == ' location' %} println(result); // Resource URL{% else %} val json = response.body?.string(){% endif %}
26+
2627}
You can’t perform that action at this time.
0 commit comments