Skip to content

Commit bdd74f9

Browse files
ellnixMubelotix
authored andcommitted
Add network route code samples
1 parent e4698df commit bdd74f9

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

.code-samples.meilisearch.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,3 +1823,23 @@ reset_localized_attribute_settings_1: |-
18231823
.reset_localized_attributes()
18241824
.await
18251825
.unwrap();
1826+
get_network_1: |-
1827+
let network: Network = client.get_network().await.unwrap();
1828+
update_network_1: |-
1829+
client.update_network(
1830+
NetworkUpdate::new()
1831+
.with_self("ms-00")
1832+
.with_remotes(&[
1833+
Remote {
1834+
name: "ms-00".to_string(),
1835+
url: "http://INSTANCE_URL".to_string(),
1836+
search_api_key: Some("INSTANCE_API_KEY".to_string()),
1837+
},
1838+
Remote {
1839+
name: "ms-01".to_string(),
1840+
url: "http://ANOTHER_INSTANCE_URL".to_string(),
1841+
search_api_key: Some("ANOTHER_INSTANCE_API_KEY".to_string()),
1842+
},
1843+
]),
1844+
)
1845+
.await.unwrap();

0 commit comments

Comments
 (0)