Skip to content

Commit

Permalink
chore: generated code for commit 258df91. [skip ci]
Browse files Browse the repository at this point in the history
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
  • Loading branch information
algolia-bot and shortcuts committed Jul 12, 2024
1 parent 258df91 commit 74e1e2a
Show file tree
Hide file tree
Showing 11 changed files with 8,623 additions and 0 deletions.
494 changes: 494 additions & 0 deletions snippets/guides/abtesting-snippets.json

Large diffs are not rendered by default.

944 changes: 944 additions & 0 deletions snippets/guides/analytics-snippets.json

Large diffs are not rendered by default.

167 changes: 167 additions & 0 deletions snippets/guides/crawler-snippets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
{
"csharp": {
"waitForAppTask": {
"default": "await client.WaitForAppTaskAsync(response.TaskID);"
},
"waitForApiKey": {
"default": {
"add": "await client.WaitForApiKeyAsync(ApiKeyOperation.Add, response.Key);",
"update": "await client.WaitForApiKeyAsync(ApiKeyOperation.Update, response.Key, {\n Acl = new List<Acl> { Enum.Parse<Acl>(\"Search\"), Enum.Parse<Acl>(\"AddObject\") },\n Validity = 300,\n MaxQueriesPerIPPerHour = 100,\n MaxHitsPerQuery = 20,\n });",
"delete": "await client.WaitForApiKeyAsync(ApiKeyOperation.Delete, response.Key);"
}
},
"waitForTask": {
"default": "await client.WaitForTaskAsync(\"<<indexName>>\", response.TaskID);"
}
},
"dart": {
"waitForAppTask": {
"default": "await client.waitAppTask(response.taskID);"
},
"waitForApiKey": {
"default": {
"add": "",
"update": "",
"delete": ""
}
},
"waitForTask": {
"default": "await client.waitTask('<<indexName>>', response.taskID);"
}
},
"go": {
"waitForAppTask": {
"default": "taskResponse, err := searchClient.WaitForAppTask(response.TaskID, nil, nil, nil)\nif err != nil {\n panic(err)\n}"
},
"waitForApiKey": {
"default": {
"add": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_ADD, response.Key, nil)\nif err != nil {\n panic(err)\n}",
"update": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_UPDATE, response.Key, search.NewEmptyApiKey().SetAcl([]search.Acl{search.Acl(\"search\"), search.Acl(\"addObject\")}).SetValidity(300).SetMaxQueriesPerIPPerHour(100).SetMaxHitsPerQuery(20))\nif err != nil {\n panic(err)\n}",
"delete": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_DELETE, response.Key, nil)\nif err != nil {\n panic(err)\n}"
}
},
"waitForTask": {
"default": "taskResponse, err := searchClient.WaitForTask(\"<<indexName>>\", response.TaskID, nil, nil, nil)\nif err != nil {\n panic(err)\n}"
}
},
"java": {
"waitForAppTask": {
"default": "client.waitForAppTask(response.getTaskID());"
},
"waitForApiKey": {
"default": {
"add": "client.waitForApiKey(ApiKeyOperation.ADD, response.Key, null)",
"update": "client.waitForApiKey(ApiKeyOperation.UPDATE, response.Key, new ApiKey()\n .setAcl(List.of(Acl.SEARCH, Acl.ADD_OBJECT))\n .setValidity(300)\n .setMaxQueriesPerIPPerHour(100)\n .setMaxHitsPerQuery(20))",
"delete": "client.waitForApiKey(ApiKeyOperation.DELETE, response.Key, null)"
}
},
"waitForTask": {
"default": "client.waitForTask(\"<<indexName>>\", response.getTaskID());"
}
},
"javascript": {
"waitForAppTask": {
"default": "await client.waitForAppTask({ taskID: response.taskID });"
},
"waitForApiKey": {
"default": {
"add": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });",
"update": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key, apiKey: {\n acl: ['search', 'addObject'],\n validity: 300,\n maxQueriesPerIPPerHour: 100,\n maxHitsPerQuery: 20,\n }});",
"delete": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });"
}
},
"waitForTask": {
"default": "await client.waitForTask({ indexName: '<<indexName>>', taskID: response.taskID });"
}
},
"kotlin": {
"waitForAppTask": {
"default": "client.waitAppTask(response.taskID)"
},
"waitForApiKey": {
"default": {
"add": "",
"update": "",
"delete": ""
}
},
"waitForTask": {
"default": "client.waitTask(\"<<indexName>>\", response.taskID)"
}
},
"php": {
"waitForAppTask": {
"default": "$client->waitForAppTask($response['taskID']);"
},
"waitForApiKey": {
"default": {
"add": "$client->waitForApiKey('<<operation>>', $response['key']);",
"update": "$client->waitForApiKey('<<operation>>', $response['key'], [\n 'acl' => [\n 'search',\n 'addObject',\n ],\n 'validity' => 300,\n 'maxQueriesPerIPPerHour' => 100,\n 'maxHitsPerQuery' => 20,\n ]);",
"delete": "$client->waitForApiKey('<<operation>>', $response['key']);"
}
},
"waitForTask": {
"default": "$client->waitForTask('<<indexName>>', $response['taskID']);"
}
},
"python": {
"waitForAppTask": {
"default": "await client.wait_for_app_task(task_id=response.task_id)"
},
"waitForApiKey": {
"default": {
"add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)",
"update": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key, api_key={\n \"acl\": [\n \"search\",\n \"addObject\",\n ],\n \"validity\": 300,\n \"maxQueriesPerIPPerHour\": 100,\n \"maxHitsPerQuery\": 20,\n })",
"delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)"
}
},
"waitForTask": {
"default": "await client.wait_for_task(index_name=\"<<indexName>>\", task_id=response.task_id)"
}
},
"ruby": {
"waitForAppTask": {
"default": "client.wait_for_app_task(response.task_id)"
},
"waitForApiKey": {
"default": {
"add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)",
"update": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key, api_key=ApiKey.new(\n acl: ['search', 'addObject'],\n validity: 300,\n max_queries_per_ip_per_hour: 100,\n max_hits_per_query: 20\n ))",
"delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)"
}
},
"waitForTask": {
"default": "client.wait_for_task(\"<<indexName>>\", response.task_id)"
}
},
"scala": {
"waitForAppTask": {
"default": "client.waitAppTask(response.getTaskID())"
},
"waitForApiKey": {
"default": {
"add": "",
"update": "",
"delete": ""
}
},
"waitForTask": {
"default": "client.waitTask(\"<<indexName>>\", response.getTaskID())"
}
},
"swift": {
"waitForAppTask": {
"default": "try await client.waitForAppTask(with: response.taskID)"
},
"waitForApiKey": {
"default": {
"add": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.add)",
"update": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.update, apiKey: ApiKey(\n acl: [Acl.search, Acl.addObject],\n maxHitsPerQuery: 20,\n maxQueriesPerIPPerHour: 100,\n validity: 300\n ))",
"delete": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.delete)"
}
},
"waitForTask": {
"default": "try await client.waitForTask(with: response.taskID, in: \"<<indexName>>\")"
}
}
}
Loading

0 comments on commit 74e1e2a

Please sign in to comment.