Skip to content

Commit c83a12b

Browse files
committed
revert snippets
1 parent c3615f4 commit c83a12b

File tree

9 files changed

+9
-0
lines changed

9 files changed

+9
-0
lines changed

templates/csharp/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Snippet{{client}}
2727
// Initialize the client
2828
var client = new {{client}}(new {{clientPrefix}}Config("YOUR_APP_ID", "YOUR_API_KEY"{{#hasRegionalHost}},"YOUR_APP_ID_REGION"{{/hasRegionalHost}}));
2929

30+
// Call the API
3031
{{#hasResponse}}var response = {{/hasResponse}}{{> tests/method}};
3132
// SEPARATOR<
3233
}

templates/dart/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ void snippetFor{{method}}{{testIndex}}() async {
1313
// Initialize the client
1414
final client = {{client}}(appId: 'YOUR_APP_ID', apiKey: 'YOUR_API_KEY'{{#hasRegionalHost}}, region: 'YOUR_APP_ID_REGION'{{/hasRegionalHost}});
1515

16+
// Call the API
1617
{{#hasResponse}}final response = {{/hasResponse}}{{#isAsync}}await {{/isAsync}}client.{{method}}(
1718
{{#parametersWithDataType}}
1819
{{> tests/request_param}}

templates/go/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ func SnippetFor{{#lambda.titlecase}}{{method}}{{/lambda.titlecase}}Of{{#lambda.p
2323
panic(err)
2424
}
2525

26+
// Call the API
2627
{{#hasResponse}}response, err :={{/hasResponse}}{{^hasResponse}}err ={{/hasResponse}} {{> tests/method}}
2728
if err != nil {
2829
// handle the eventual error

templates/java/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class Snippet{{client}} {
1717
// Initialize the client
1818
{{client}} client = new {{client}}("YOUR_APP_ID", "YOUR_API_KEY"{{#hasRegionalHost}}, "YOUR_APP_ID_REGION"{{/hasRegionalHost}});
1919

20+
// Call the API
2021
{{> tests/method}};
2122
// SEPARATOR<
2223
}

templates/javascript/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ export {{#isAsync}}async{{/isAsync}} function snippetFor{{#lambda.pascalcase}}{{
1616
// Initialize the client
1717
const client = {{client}}("YOUR_APP_ID", "YOUR_API_KEY", {{#hasRegionalHost}}'YOUR_APP_ID_REGION', {{/hasRegionalHost}});
1818

19+
// Call the API
1920
{{#hasResponse}}const response = {{/hasResponse}}{{> tests/method}};
2021
{{#hasResponse}}
2122
// use typed response

templates/kotlin/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class Snippet{{client}} {
1919
// Initialize the client
2020
val client = {{client}}(appId = "YOUR_APP_ID", apiKey = "YOUR_API_KEY"{{#hasRegionalHost}}, region = "YOUR_APP_ID_REGION"{{/hasRegionalHost}})
2121

22+
// Call the API
2223
{{#hasResponse}}var response = {{/hasResponse}}client.{{> tests/method}}
2324
{{#hasResponse}}
2425
// Use the response

templates/php/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Snippet{{client}}
2323
// Initialize the client
2424
$client = {{client}}::create('<YOUR_APP_ID>', '<YOUR_API_KEY>'{{#hasRegionalHost}}, 'YOUR_APP_ID_REGION'{{/hasRegionalHost}});
2525

26+
// Call the API
2627
{{#hasResponse}}$response = {{/hasResponse}}{{> tests/method}};
2728
{{#hasResponse}}
2829
// play with the response

templates/scala/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class Snippet{{client}} {
3131
// Initialize the client
3232
val client = {{client}}(appId = "YOUR_APP_ID", apiKey = "YOUR_API_KEY"{{#hasRegionalHost}}, region = {{#fallbackToAliasHost}}Option({{/fallbackToAliasHost}}"YOUR_APP_ID_REGION"{{#fallbackToAliasHost}}){{/fallbackToAliasHost}}{{/hasRegionalHost}})
3333

34+
// Call the API
3435
{{#hasResponse}}val response = {{/hasResponse}}{{> tests/method}}
3536
{{#hasResponse}}
3637
// Use the response

templates/swift/snippets/method.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ final class {{client}}Snippet {
1616
// Initialize the client
1717
let client = try {{client}}(appID: "YOUR_APP_ID", apiKey: "YOUR_API_KEY"{{#hasRegionalHost}}, region: .{{defaultRegion}}{{/hasRegionalHost}})
1818

19+
// Call the API
1920
{{#hasResponse}}let response{{#isGeneric}}: {{{returnType}}}<Hit>{{/isGeneric}} = {{/hasResponse}}try {{#isAsync}}await {{/isAsync}}client.{{method}}({{#hasParams}}{{#parametersWithDataType}}{{> tests/generateParams }}{{^-last}}, {{/-last}}{{/parametersWithDataType}}{{/hasParams}}{{#hasRequestOptions}}, requestOptions: RequestOptions({{#requestOptions.headers}}
2021
headers: [{{#parametersWithDataType}}"{{key}}": {{> tests/paramValue }}{{^-last}}, {{/-last}}{{/parametersWithDataType}}]{{/requestOptions.headers}}
2122
{{#requestOptions.headers}}{{#requestOptions.queryParameters}},{{/requestOptions.queryParameters}}{{/requestOptions.headers}}{{#requestOptions.queryParameters}}

0 commit comments

Comments
 (0)