Skip to content

Commit 74e1e2a

Browse files
chore: generated code for commit 258df91. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 258df91 commit 74e1e2a

11 files changed

+8623
-0
lines changed

snippets/guides/abtesting-snippets.json

Lines changed: 494 additions & 0 deletions
Large diffs are not rendered by default.

snippets/guides/analytics-snippets.json

Lines changed: 944 additions & 0 deletions
Large diffs are not rendered by default.

snippets/guides/crawler-snippets.json

Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
{
2+
"csharp": {
3+
"waitForAppTask": {
4+
"default": "await client.WaitForAppTaskAsync(response.TaskID);"
5+
},
6+
"waitForApiKey": {
7+
"default": {
8+
"add": "await client.WaitForApiKeyAsync(ApiKeyOperation.Add, response.Key);",
9+
"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 });",
10+
"delete": "await client.WaitForApiKeyAsync(ApiKeyOperation.Delete, response.Key);"
11+
}
12+
},
13+
"waitForTask": {
14+
"default": "await client.WaitForTaskAsync(\"<<indexName>>\", response.TaskID);"
15+
}
16+
},
17+
"dart": {
18+
"waitForAppTask": {
19+
"default": "await client.waitAppTask(response.taskID);"
20+
},
21+
"waitForApiKey": {
22+
"default": {
23+
"add": "",
24+
"update": "",
25+
"delete": ""
26+
}
27+
},
28+
"waitForTask": {
29+
"default": "await client.waitTask('<<indexName>>', response.taskID);"
30+
}
31+
},
32+
"go": {
33+
"waitForAppTask": {
34+
"default": "taskResponse, err := searchClient.WaitForAppTask(response.TaskID, nil, nil, nil)\nif err != nil {\n panic(err)\n}"
35+
},
36+
"waitForApiKey": {
37+
"default": {
38+
"add": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_ADD, response.Key, nil)\nif err != nil {\n panic(err)\n}",
39+
"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}",
40+
"delete": "waitResponse, err := client.WaitForApiKey(search.API_KEY_OPERATION_DELETE, response.Key, nil)\nif err != nil {\n panic(err)\n}"
41+
}
42+
},
43+
"waitForTask": {
44+
"default": "taskResponse, err := searchClient.WaitForTask(\"<<indexName>>\", response.TaskID, nil, nil, nil)\nif err != nil {\n panic(err)\n}"
45+
}
46+
},
47+
"java": {
48+
"waitForAppTask": {
49+
"default": "client.waitForAppTask(response.getTaskID());"
50+
},
51+
"waitForApiKey": {
52+
"default": {
53+
"add": "client.waitForApiKey(ApiKeyOperation.ADD, response.Key, null)",
54+
"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))",
55+
"delete": "client.waitForApiKey(ApiKeyOperation.DELETE, response.Key, null)"
56+
}
57+
},
58+
"waitForTask": {
59+
"default": "client.waitForTask(\"<<indexName>>\", response.getTaskID());"
60+
}
61+
},
62+
"javascript": {
63+
"waitForAppTask": {
64+
"default": "await client.waitForAppTask({ taskID: response.taskID });"
65+
},
66+
"waitForApiKey": {
67+
"default": {
68+
"add": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });",
69+
"update": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key, apiKey: {\n acl: ['search', 'addObject'],\n validity: 300,\n maxQueriesPerIPPerHour: 100,\n maxHitsPerQuery: 20,\n }});",
70+
"delete": "await client.waitForApiKey({ operation: \"<<operation>>\", key: response.key });"
71+
}
72+
},
73+
"waitForTask": {
74+
"default": "await client.waitForTask({ indexName: '<<indexName>>', taskID: response.taskID });"
75+
}
76+
},
77+
"kotlin": {
78+
"waitForAppTask": {
79+
"default": "client.waitAppTask(response.taskID)"
80+
},
81+
"waitForApiKey": {
82+
"default": {
83+
"add": "",
84+
"update": "",
85+
"delete": ""
86+
}
87+
},
88+
"waitForTask": {
89+
"default": "client.waitTask(\"<<indexName>>\", response.taskID)"
90+
}
91+
},
92+
"php": {
93+
"waitForAppTask": {
94+
"default": "$client->waitForAppTask($response['taskID']);"
95+
},
96+
"waitForApiKey": {
97+
"default": {
98+
"add": "$client->waitForApiKey('<<operation>>', $response['key']);",
99+
"update": "$client->waitForApiKey('<<operation>>', $response['key'], [\n 'acl' => [\n 'search',\n 'addObject',\n ],\n 'validity' => 300,\n 'maxQueriesPerIPPerHour' => 100,\n 'maxHitsPerQuery' => 20,\n ]);",
100+
"delete": "$client->waitForApiKey('<<operation>>', $response['key']);"
101+
}
102+
},
103+
"waitForTask": {
104+
"default": "$client->waitForTask('<<indexName>>', $response['taskID']);"
105+
}
106+
},
107+
"python": {
108+
"waitForAppTask": {
109+
"default": "await client.wait_for_app_task(task_id=response.task_id)"
110+
},
111+
"waitForApiKey": {
112+
"default": {
113+
"add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)",
114+
"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 })",
115+
"delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)"
116+
}
117+
},
118+
"waitForTask": {
119+
"default": "await client.wait_for_task(index_name=\"<<indexName>>\", task_id=response.task_id)"
120+
}
121+
},
122+
"ruby": {
123+
"waitForAppTask": {
124+
"default": "client.wait_for_app_task(response.task_id)"
125+
},
126+
"waitForApiKey": {
127+
"default": {
128+
"add": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)",
129+
"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 ))",
130+
"delete": "await client.wait_for_api_key(operation=\"<<operation>>\", key=response.key)"
131+
}
132+
},
133+
"waitForTask": {
134+
"default": "client.wait_for_task(\"<<indexName>>\", response.task_id)"
135+
}
136+
},
137+
"scala": {
138+
"waitForAppTask": {
139+
"default": "client.waitAppTask(response.getTaskID())"
140+
},
141+
"waitForApiKey": {
142+
"default": {
143+
"add": "",
144+
"update": "",
145+
"delete": ""
146+
}
147+
},
148+
"waitForTask": {
149+
"default": "client.waitTask(\"<<indexName>>\", response.getTaskID())"
150+
}
151+
},
152+
"swift": {
153+
"waitForAppTask": {
154+
"default": "try await client.waitForAppTask(with: response.taskID)"
155+
},
156+
"waitForApiKey": {
157+
"default": {
158+
"add": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.add)",
159+
"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 ))",
160+
"delete": "try await client.waitForApiKey(with: response.key, operation: ApiKeyOperation.delete)"
161+
}
162+
},
163+
"waitForTask": {
164+
"default": "try await client.waitForTask(with: response.taskID, in: \"<<indexName>>\")"
165+
}
166+
}
167+
}

0 commit comments

Comments
 (0)