|
199 | 199 | "call partialUpdateObjects with createIfNotExists=true": "var response = await client.PartialUpdateObjectsAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary<string, string> { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n },\n true\n);", |
200 | 200 | "call partialUpdateObjects with createIfNotExists=false": "var response = await client.PartialUpdateObjectsAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"3\" }, { \"name\", \"Cyril\" } },\n new Dictionary<string, string> { { \"objectID\", \"4\" }, { \"name\", \"David\" } },\n },\n false\n);" |
201 | 201 | }, |
| 202 | + "partialUpdateObjectsWithTransformation": { |
| 203 | + "default": "var response = await client.PartialUpdateObjectsWithTransformationAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary<string, string> { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n },\n true,\n true\n);" |
| 204 | + }, |
202 | 205 | "removeUserId": { |
203 | 206 | "default": "var response = await client.RemoveUserIdAsync(\"uniqueID\");" |
204 | 207 | }, |
|
207 | 210 | "call replaceAllObjects with partial scopes": "var response = await client.ReplaceAllObjectsAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary<string, string> { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n },\n 77,\n new List<ScopeType> { Enum.Parse<ScopeType>(\"Settings\"), Enum.Parse<ScopeType>(\"Synonyms\") }\n);", |
208 | 211 | "replaceAllObjects should cleanup on failure": "var response = await client.ReplaceAllObjectsAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"fine\" }, { \"body\", \"small obj\" } },\n new Dictionary<string, string>\n {\n { \"objectID\", \"toolarge\" },\n { \"body\", \"something bigger than 10KB\" },\n },\n }\n);" |
209 | 212 | }, |
| 213 | + "replaceAllObjectsWithTransformation": { |
| 214 | + "default": "var response = await client.ReplaceAllObjectsWithTransformationAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary<string, string> { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n new Dictionary<string, string> { { \"objectID\", \"3\" }, { \"name\", \"Cyril\" } },\n new Dictionary<string, string> { { \"objectID\", \"4\" }, { \"name\", \"David\" } },\n new Dictionary<string, string> { { \"objectID\", \"5\" }, { \"name\", \"Eva\" } },\n new Dictionary<string, string> { { \"objectID\", \"6\" }, { \"name\", \"Fiona\" } },\n new Dictionary<string, string> { { \"objectID\", \"7\" }, { \"name\", \"Gael\" } },\n new Dictionary<string, string> { { \"objectID\", \"8\" }, { \"name\", \"Hugo\" } },\n new Dictionary<string, string> { { \"objectID\", \"9\" }, { \"name\", \"Igor\" } },\n new Dictionary<string, string> { { \"objectID\", \"10\" }, { \"name\", \"Julia\" } },\n },\n 3\n);" |
| 215 | + }, |
210 | 216 | "replaceSources": { |
211 | 217 | "default": "var response = await client.ReplaceSourcesAsync(\n new List<Source>\n {\n new Source { VarSource = \"theSource\", Description = \"theDescription\" },\n }\n);" |
212 | 218 | }, |
|
222 | 228 | "saveObjectsPlaylist": "var response = await client.SaveObjectsAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string>\n {\n { \"objectID\", \"1\" },\n { \"visibility\", \"public\" },\n { \"name\", \"Hot 100 Billboard Charts\" },\n { \"playlistId\", \"d3e8e8f3-0a4f-4b7d-9b6b-7e8f4e8e3a0f\" },\n { \"createdAt\", \"1500240452\" },\n },\n }\n);", |
223 | 229 | "saveObjectsPublicUser": "var response = await client.SaveObjectsAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string>\n {\n { \"objectID\", \"1\" },\n { \"visibility\", \"public\" },\n { \"name\", \"Hot 100 Billboard Charts\" },\n { \"playlistId\", \"d3e8e8f3-0a4f-4b7d-9b6b-7e8f4e8e3a0f\" },\n { \"createdAt\", \"1500240452\" },\n },\n },\n false,\n 1000,\n new RequestOptionBuilder().AddExtraHeader(\"X-Algolia-User-ID\", \"*\").Build()\n);" |
224 | 230 | }, |
| 231 | + "saveObjectsWithTransformation": { |
| 232 | + "default": "var response = await client.SaveObjectsWithTransformationAsync(\n \"<YOUR_INDEX_NAME>\",\n new List<Object>\n {\n new Dictionary<string, string> { { \"objectID\", \"1\" }, { \"name\", \"Adam\" } },\n new Dictionary<string, string> { { \"objectID\", \"2\" }, { \"name\", \"Benoit\" } },\n },\n true\n);" |
| 233 | + }, |
225 | 234 | "saveRule": { |
226 | 235 | "saveRule with minimal parameters": "var response = await client.SaveRuleAsync(\n \"<YOUR_INDEX_NAME>\",\n \"id1\",\n new Rule\n {\n ObjectID = \"id1\",\n Conditions = new List<Condition>\n {\n new Condition { Pattern = \"apple\", Anchoring = Enum.Parse<Anchoring>(\"Contains\") },\n },\n Consequence = new Consequence\n {\n Params = new ConsequenceParams { Filters = \"brand:xiaomi\" },\n },\n }\n);", |
227 | 236 | "saveRule with all parameters": "var response = await client.SaveRuleAsync(\n \"<YOUR_INDEX_NAME>\",\n \"id1\",\n new Rule\n {\n ObjectID = \"id1\",\n Conditions = new List<Condition>\n {\n new Condition\n {\n Pattern = \"apple\",\n Anchoring = Enum.Parse<Anchoring>(\"Contains\"),\n Alternatives = false,\n Context = \"search\",\n },\n },\n Consequence = new Consequence\n {\n Params = new ConsequenceParams\n {\n Filters = \"brand:apple\",\n Query = new ConsequenceQuery(\n new ConsequenceQueryObject\n {\n Remove = new List<string> { \"algolia\" },\n Edits = new List<Edit>\n {\n new Edit\n {\n Type = Enum.Parse<EditType>(\"Remove\"),\n Delete = \"abc\",\n Insert = \"cde\",\n },\n new Edit\n {\n Type = Enum.Parse<EditType>(\"Replace\"),\n Delete = \"abc\",\n Insert = \"cde\",\n },\n },\n }\n ),\n },\n Hide = new List<ConsequenceHide> { new ConsequenceHide { ObjectID = \"321\" } },\n FilterPromotes = false,\n UserData = new Dictionary<string, string> { { \"algolia\", \"aloglia\" } },\n Promote = new List<Promote>\n {\n new Promote(new PromoteObjectID { ObjectID = \"abc\", Position = 3 }),\n new Promote(\n new PromoteObjectIDs\n {\n ObjectIDs = new List<string> { \"abc\", \"def\" },\n Position = 1,\n }\n ),\n },\n },\n Description = \"test\",\n Enabled = true,\n Validity = new List<TimeRange>\n {\n new TimeRange { From = 1656670273L, Until = 1656670277L },\n },\n },\n true\n);", |
|
0 commit comments