Skip to content

Commit 0d97454

Browse files
algolia-botmillotp
andcommitted
snippets: remove all the >LOG (#5479) (generated) [skip ci]
Co-authored-by: Pierre Millot <[email protected]>
1 parent ccb9c37 commit 0d97454

File tree

162 files changed

+22449
-16606
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+22449
-16606
lines changed

docs/bundled/abtesting-snippets.json

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -123,55 +123,55 @@
123123
"default": "import com.algolia.api.AbtestingClient;\nimport com.algolia.config.*;"
124124
},
125125
"addABTests": {
126-
"default": "client.addABTests(\n new AddABTestsRequest()\n .setEndAt(\"2022-12-31T00:00:00.000Z\")\n .setName(\"myABTest\")\n .setVariants(\n Arrays.asList(\n new AbTestsVariant().setIndex(\"AB_TEST_1\").setTrafficPercentage(30),\n new AbTestsVariant().setIndex(\"AB_TEST_2\").setTrafficPercentage(50)\n )\n )\n);"
126+
"default": "ABTestResponse response = client.addABTests(\n new AddABTestsRequest()\n .setEndAt(\"2022-12-31T00:00:00.000Z\")\n .setName(\"myABTest\")\n .setVariants(\n Arrays.asList(\n new AbTestsVariant().setIndex(\"AB_TEST_1\").setTrafficPercentage(30),\n new AbTestsVariant().setIndex(\"AB_TEST_2\").setTrafficPercentage(50)\n )\n )\n);"
127127
},
128128
"customDelete": {
129-
"allow del method for a custom path with minimal parameters": "client.customDelete(\"test/minimal\");",
130-
"allow del method for a custom path with all parameters": "client.customDelete(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n }\n);"
129+
"allow del method for a custom path with minimal parameters": "Object response = client.customDelete(\"test/minimal\");",
130+
"allow del method for a custom path with all parameters": "Object response = client.customDelete(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n }\n);"
131131
},
132132
"customGet": {
133-
"allow get method for a custom path with minimal parameters": "client.customGet(\"test/minimal\");",
134-
"allow get method for a custom path with all parameters": "client.customGet(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters with space\");\n }\n }\n);",
135-
"requestOptions should be escaped too": "client.customGet(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"to be overridden\");\n }\n },\n new RequestOptions()\n .addExtraQueryParameters(\"query\", \"parameters with space\")\n .addExtraQueryParameters(\"and an array\", Arrays.asList(\"array\", \"with spaces\"))\n .addExtraHeader(\"x-header-1\", \"spaces are left alone\")\n);"
133+
"allow get method for a custom path with minimal parameters": "Object response = client.customGet(\"test/minimal\");",
134+
"allow get method for a custom path with all parameters": "Object response = client.customGet(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters with space\");\n }\n }\n);",
135+
"requestOptions should be escaped too": "Object response = client.customGet(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"to be overridden\");\n }\n },\n new RequestOptions()\n .addExtraQueryParameters(\"query\", \"parameters with space\")\n .addExtraQueryParameters(\"and an array\", Arrays.asList(\"array\", \"with spaces\"))\n .addExtraHeader(\"x-header-1\", \"spaces are left alone\")\n);"
136136
},
137137
"customPost": {
138-
"allow post method for a custom path with minimal parameters": "client.customPost(\"test/minimal\");",
139-
"allow post method for a custom path with all parameters": "client.customPost(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"body\", \"parameters\");\n }\n }\n);",
140-
"requestOptions can override default query parameters": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"query\", \"myQueryParameter\")\n);",
141-
"requestOptions merges query parameters with default ones": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"query2\", \"myQueryParameter\")\n);",
142-
"requestOptions can override default headers": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraHeader(\"x-algolia-api-key\", \"ALGOLIA_API_KEY\")\n);",
143-
"requestOptions merges headers with default ones": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraHeader(\"x-algolia-api-key\", \"ALGOLIA_API_KEY\")\n);",
144-
"requestOptions queryParameters accepts booleans": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"isItWorking\", true)\n);",
145-
"requestOptions queryParameters accepts integers": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", 2)\n);",
146-
"requestOptions queryParameters accepts list of string": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", Arrays.asList(\"b and c\", \"d\"))\n);",
147-
"requestOptions queryParameters accepts list of booleans": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", Arrays.asList(true, true, false))\n);",
148-
"requestOptions queryParameters accepts list of integers": "client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", Arrays.asList(1, 2))\n);"
138+
"allow post method for a custom path with minimal parameters": "Object response = client.customPost(\"test/minimal\");",
139+
"allow post method for a custom path with all parameters": "Object response = client.customPost(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"body\", \"parameters\");\n }\n }\n);",
140+
"requestOptions can override default query parameters": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"query\", \"myQueryParameter\")\n);",
141+
"requestOptions merges query parameters with default ones": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"query2\", \"myQueryParameter\")\n);",
142+
"requestOptions can override default headers": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraHeader(\"x-algolia-api-key\", \"ALGOLIA_API_KEY\")\n);",
143+
"requestOptions merges headers with default ones": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraHeader(\"x-algolia-api-key\", \"ALGOLIA_API_KEY\")\n);",
144+
"requestOptions queryParameters accepts booleans": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"isItWorking\", true)\n);",
145+
"requestOptions queryParameters accepts integers": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", 2)\n);",
146+
"requestOptions queryParameters accepts list of string": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", Arrays.asList(\"b and c\", \"d\"))\n);",
147+
"requestOptions queryParameters accepts list of booleans": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", Arrays.asList(true, true, false))\n);",
148+
"requestOptions queryParameters accepts list of integers": "Object response = client.customPost(\n \"test/requestOptions\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"facet\", \"filters\");\n }\n },\n new RequestOptions().addExtraQueryParameters(\"myParam\", Arrays.asList(1, 2))\n);"
149149
},
150150
"customPut": {
151-
"allow put method for a custom path with minimal parameters": "client.customPut(\"test/minimal\");",
152-
"allow put method for a custom path with all parameters": "client.customPut(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"body\", \"parameters\");\n }\n }\n);"
151+
"allow put method for a custom path with minimal parameters": "Object response = client.customPut(\"test/minimal\");",
152+
"allow put method for a custom path with all parameters": "Object response = client.customPut(\n \"test/all\",\n new HashMap() {\n {\n put(\"query\", \"parameters\");\n }\n },\n new HashMap() {\n {\n put(\"body\", \"parameters\");\n }\n }\n);"
153153
},
154154
"deleteABTest": {
155-
"default": "client.deleteABTest(42);"
155+
"default": "ABTestResponse response = client.deleteABTest(42);"
156156
},
157157
"estimateABTest": {
158-
"default": "client.estimateABTest(\n new EstimateABTestRequest()\n .setConfiguration(\n new EstimateConfiguration()\n .setEmptySearch(new EmptySearch().setExclude(true))\n .setMinimumDetectableEffect(new MinimumDetectableEffect().setSize(0.03).setMetric(EffectMetric.CONVERSION_RATE))\n )\n .setVariants(\n Arrays.asList(\n new AbTestsVariant().setIndex(\"AB_TEST_1\").setTrafficPercentage(50),\n new AbTestsVariant().setIndex(\"AB_TEST_2\").setTrafficPercentage(50)\n )\n )\n);"
158+
"default": "EstimateABTestResponse response = client.estimateABTest(\n new EstimateABTestRequest()\n .setConfiguration(\n new EstimateConfiguration()\n .setEmptySearch(new EmptySearch().setExclude(true))\n .setMinimumDetectableEffect(new MinimumDetectableEffect().setSize(0.03).setMetric(EffectMetric.CONVERSION_RATE))\n )\n .setVariants(\n Arrays.asList(\n new AbTestsVariant().setIndex(\"AB_TEST_1\").setTrafficPercentage(50),\n new AbTestsVariant().setIndex(\"AB_TEST_2\").setTrafficPercentage(50)\n )\n )\n);"
159159
},
160160
"getABTest": {
161-
"default": "client.getABTest(42);"
161+
"default": "ABTest response = client.getABTest(42);"
162162
},
163163
"listABTests": {
164-
"listABTests with minimal parameters": "client.listABTests();",
165-
"listABTests with parameters": "client.listABTests(0, 21, \"cts_e2e ab\", \"t\");"
164+
"listABTests with minimal parameters": "ListABTestsResponse response = client.listABTests();",
165+
"listABTests with parameters": "ListABTestsResponse response = client.listABTests(0, 21, \"cts_e2e ab\", \"t\");"
166166
},
167167
"scheduleABTest": {
168-
"default": "client.scheduleABTest(\n new ScheduleABTestsRequest()\n .setEndAt(\"2022-12-31T00:00:00.000Z\")\n .setScheduledAt(\"2022-11-31T00:00:00.000Z\")\n .setName(\"myABTest\")\n .setVariants(\n Arrays.asList(\n new AbTestsVariant().setIndex(\"AB_TEST_1\").setTrafficPercentage(30),\n new AbTestsVariant().setIndex(\"AB_TEST_2\").setTrafficPercentage(50)\n )\n )\n);"
168+
"default": "ScheduleABTestResponse response = client.scheduleABTest(\n new ScheduleABTestsRequest()\n .setEndAt(\"2022-12-31T00:00:00.000Z\")\n .setScheduledAt(\"2022-11-31T00:00:00.000Z\")\n .setName(\"myABTest\")\n .setVariants(\n Arrays.asList(\n new AbTestsVariant().setIndex(\"AB_TEST_1\").setTrafficPercentage(30),\n new AbTestsVariant().setIndex(\"AB_TEST_2\").setTrafficPercentage(50)\n )\n )\n);"
169169
},
170170
"setClientApiKey": {
171171
"default": "client.setClientApiKey(\"updated-api-key\");"
172172
},
173173
"stopABTest": {
174-
"default": "client.stopABTest(42);"
174+
"default": "ABTestResponse response = client.stopABTest(42);"
175175
},
176176
"init": {
177177
"default": "AbtestingClient client = new AbtestingClient(\"ALGOLIA_APPLICATION_ID\", \"ALGOLIA_API_KEY\", \"ALGOLIA_APPLICATION_REGION\");"

0 commit comments

Comments
 (0)