Skip to content

Commit ce7d22f

Browse files
committed
Add network route code samples
1 parent 7055f25 commit ce7d22f

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
@@ -1770,3 +1770,23 @@ reset_localized_attribute_settings_1: |-
17701770
.reset_localized_attributes()
17711771
.await
17721772
.unwrap();
1773+
get_network_1: |-
1774+
let network: Network = client.get_network().await.unwrap();
1775+
update_network_1: |-
1776+
client.update_network(
1777+
NetworkUpdate::new()
1778+
.with_self("ms-00")
1779+
.with_remotes(&[
1780+
Remote {
1781+
name: "ms-00".to_string(),
1782+
url: "http://INSTANCE_URL".to_string(),
1783+
search_api_key: Some("INSTANCE_API_KEY".to_string()),
1784+
},
1785+
Remote {
1786+
name: "ms-01".to_string(),
1787+
url: "http://ANOTHER_INSTANCE_URL".to_string(),
1788+
search_api_key: Some("ANOTHER_INSTANCE_API_KEY".to_string()),
1789+
},
1790+
]),
1791+
)
1792+
.await.unwrap();

0 commit comments

Comments
 (0)