Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"dark": "#1A003B"
}
},
"seo": {
"metatags": {
"canonical": "https://meilisearch.com/docs"
}
},
"appearance": {
"default": "dark"
},
Expand Down
7 changes: 7 additions & 0 deletions snippets/samples/code_samples_compact_index_1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<CodeGroup>

```bash cURL
curl \
-X POST 'MEILISEARCH_URL/indexes/INDEX_UID/compact'
```
</CodeGroup>
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_webhooks_delete_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ client.deleteWebhook(WEBHOOK_UUID)
```go Go
client.DeleteWebhook("WEBHOOK_UUID");
```

```rust Rust
client.delete_webhook("WEBHOOK_UUID").await.unwrap();
```
</CodeGroup>
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_webhooks_get_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ client.getWebhooks()
```go Go
client.ListWebhooks();
```

```rust Rust
let webhooks = client.get_webhooks().await.unwrap();
```
</CodeGroup>
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_webhooks_get_single_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,8 @@ client.getWebhook(WEBHOOK_UUID)
```go Go
client.GetWebhook("WEBHOOK_UUID");
```

```rust Rust
let webhook = client.get_webhook("WEBHOOK_UUID").await.unwrap();
```
</CodeGroup>
9 changes: 9 additions & 0 deletions snippets/samples/code_samples_webhooks_patch_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,13 @@ client.UpdateWebhook("WEBHOOK_UUID", &meilisearch.UpdateWebhookRequest{
},
});
```

```rust Rust
let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();
update.remove_header("referer");
let webhook = client
.update_webhook("WEBHOOK_UUID", &update)
.await
.unwrap();
```
</CodeGroup>
8 changes: 8 additions & 0 deletions snippets/samples/code_samples_webhooks_post_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ client.AddWebhook(&meilisearch.AddWebhookRequest{
},
});
```

```rust Rust
let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new("WEBHOOK_TARGET_URL");
payload
.insert_header("authorization", "SECURITY_KEY")
.insert_header("referer", "https://example.com");
let webhook = client.create_webhook(&payload).await.unwrap();
```
</CodeGroup>