@@ -2555,7 +2555,13 @@ paths:
25552555
25562556 var response = await client.SaveObjectAsync(
25572557 "<YOUR_INDEX_NAME>",
2558- new Dictionary<string, string> { { "objectID", "id" }, { "test", "val" } }
2558+ new Dictionary<string, string>
2559+ {
2560+ { "name", "Black T-shirt" },
2561+ { "color", "#000000||black" },
2562+ { "availableIn", "https://source.unsplash.com/100x100/?paris||Paris" },
2563+ { "objectID", "myID" },
2564+ }
25592565 );
25602566
25612567 // >LOG
@@ -2570,8 +2576,10 @@ paths:
25702576 final response = await client.saveObject(
25712577 indexName: "<YOUR_INDEX_NAME>",
25722578 body: {
2573- 'objectID': "id",
2574- 'test': "val",
2579+ 'name': "Black T-shirt",
2580+ 'color': "#000000||black",
2581+ 'availableIn': "https://source.unsplash.com/100x100/?paris||Paris",
2582+ 'objectID': "myID",
25752583 },
25762584 );
25772585 // >LOG
@@ -2592,7 +2600,7 @@ paths:
25922600 // Call the API
25932601
25942602 response, err := client.SaveObject(client.NewApiSaveObjectRequest(
2595- "<YOUR_INDEX_NAME>", map[string]any{"objectID ": "id ", "test ": "val "}))
2603+ "<YOUR_INDEX_NAME>", map[string]any{"name ": "Black T-shirt ", "color ": "#000000||black", "availableIn": "https://source.unsplash.com/100x100/?paris||Paris", "objectID": "myID "}))
25962604 if err != nil {
25972605 // handle the eventual error
25982606 panic(err)
@@ -2619,8 +2627,10 @@ paths:
26192627 "<YOUR_INDEX_NAME>",
26202628 new HashMap() {
26212629 {
2622- put("objectID", "id");
2623- put("test", "val");
2630+ put("name", "Black T-shirt");
2631+ put("color", "#000000||black");
2632+ put("availableIn", "https://source.unsplash.com/100x100/?paris||Paris");
2633+ put("objectID", "myID");
26242634 }
26252635 }
26262636 );
@@ -2639,8 +2649,15 @@ paths:
26392649
26402650 // Call the API
26412651
2642- const response = await client.saveObject({ indexName:
2643- '<YOUR_INDEX_NAME>', body: { objectID: 'id', test: 'val' } });
2652+ const response = await client.saveObject({
2653+ indexName: '<YOUR_INDEX_NAME>',
2654+ body: {
2655+ name: 'Black T-shirt',
2656+ color: '#000000||black',
2657+ availableIn: 'https://source.unsplash.com/100x100/?paris||Paris',
2658+ objectID: 'myID',
2659+ },
2660+ });
26442661
26452662
26462663 // >LOG
@@ -2663,12 +2680,20 @@ paths:
26632680 indexName = "<YOUR_INDEX_NAME>",
26642681 body = buildJsonObject {
26652682 put(
2666- "objectID",
2667- JsonPrimitive("id"),
2683+ "name",
2684+ JsonPrimitive("Black T-shirt"),
2685+ )
2686+ put(
2687+ "color",
2688+ JsonPrimitive("#000000||black"),
2689+ )
2690+ put(
2691+ "availableIn",
2692+ JsonPrimitive("https://source.unsplash.com/100x100/?paris||Paris"),
26682693 )
26692694 put(
2670- "test ",
2671- JsonPrimitive("val "),
2695+ "objectID ",
2696+ JsonPrimitive("myID "),
26722697 )
26732698 },
26742699 )
@@ -2692,8 +2717,10 @@ paths:
26922717
26932718 $response = $client->saveObject(
26942719 '<YOUR_INDEX_NAME>',
2695- ['objectID' => 'id',
2696- 'test' => 'val',
2720+ ['name' => 'Black T-shirt',
2721+ 'color' => '#000000||black',
2722+ 'availableIn' => 'https://source.unsplash.com/100x100/?paris||Paris',
2723+ 'objectID' => 'myID',
26972724 ],
26982725 );
26992726
@@ -2720,8 +2747,10 @@ paths:
27202747 response = client.save_object(
27212748 index_name="<YOUR_INDEX_NAME>",
27222749 body={
2723- "objectID": "id",
2724- "test": "val",
2750+ "name": "Black T-shirt",
2751+ "color": "#000000||black",
2752+ "availableIn": "https://source.unsplash.com/100x100/?paris||Paris",
2753+ "objectID": "myID",
27252754 },
27262755 )
27272756
@@ -2742,8 +2771,15 @@ paths:
27422771
27432772 # Call the API
27442773
2745- response = client.save_object("<YOUR_INDEX_NAME>", {objectID: "id",
2746- test: "val"})
2774+ response = client.save_object(
2775+ "<YOUR_INDEX_NAME>",
2776+ {
2777+ name: "Black T-shirt",
2778+ color: "#000000||black",
2779+ availableIn: "https://source.unsplash.com/100x100/?paris||Paris",
2780+ objectID: "myID"
2781+ }
2782+ )
27472783
27482784
27492785 # >LOG
@@ -2769,7 +2805,14 @@ paths:
27692805
27702806 val response = client.saveObject(
27712807 indexName = "<YOUR_INDEX_NAME>",
2772- body = JObject(List(JField("objectID", JString("id")), JField("test", JString("val"))))
2808+ body = JObject(
2809+ List(
2810+ JField("name", JString("Black T-shirt")),
2811+ JField("color", JString("#000000||black")),
2812+ JField("availableIn", JString("https://source.unsplash.com/100x100/?paris||Paris")),
2813+ JField("objectID", JString("myID"))
2814+ )
2815+ )
27732816 )
27742817
27752818
@@ -2791,7 +2834,12 @@ paths:
27912834
27922835 let response = try await client.saveObject(
27932836 indexName: "<YOUR_INDEX_NAME>",
2794- body: ["objectID": "id", "test": "val"]
2837+ body: [
2838+ "name": "Black T-shirt",
2839+ "color": "#000000||black",
2840+ "availableIn": "https://source.unsplash.com/100x100/?paris||Paris",
2841+ "objectID": "myID",
2842+ ]
27952843 )
27962844
27972845 // >LOG
0 commit comments