1
1
use serde:: { Deserialize , Serialize } ;
2
2
use time:: OffsetDateTime ;
3
3
4
- use crate :: { client :: Client , errors :: Error } ;
4
+ use crate :: { Client , Error } ;
5
5
6
6
/// Represents a [meilisearch key](https://www.meilisearch.com/docs/reference/api/keys#returned-fields).
7
7
///
@@ -33,7 +33,7 @@ impl Key {
33
33
/// # Example
34
34
///
35
35
/// ```
36
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client};
36
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client};
37
37
/// #
38
38
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
39
39
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -61,7 +61,7 @@ impl Key {
61
61
/// # Example
62
62
///
63
63
/// ```
64
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client};
64
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client};
65
65
/// #
66
66
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
67
67
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -92,7 +92,7 @@ impl Key {
92
92
/// # Example
93
93
///
94
94
/// ```
95
- /// # use meilisearch_sdk::{key:: KeyBuilder, client:: Client};
95
+ /// # use meilisearch_sdk::{KeyBuilder, Client};
96
96
/// #
97
97
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
98
98
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -132,7 +132,7 @@ impl Key {
132
132
/// # Example
133
133
///
134
134
/// ```
135
- /// # use meilisearch_sdk::{key:: KeyBuilder, client:: Client};
135
+ /// # use meilisearch_sdk::{KeyBuilder, Client};
136
136
/// #
137
137
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
138
138
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -185,7 +185,7 @@ impl KeyUpdater {
185
185
/// # Example
186
186
///
187
187
/// ```
188
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client, key:: KeyUpdater};
188
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client, KeyUpdater};
189
189
/// #
190
190
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
191
191
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -218,7 +218,7 @@ impl KeyUpdater {
218
218
/// # Example
219
219
///
220
220
/// ```
221
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client, key:: KeyUpdater};
221
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client, KeyUpdater};
222
222
/// #
223
223
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
224
224
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -251,7 +251,7 @@ impl KeyUpdater {
251
251
/// # Example
252
252
///
253
253
/// ```
254
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: KeyUpdater, client:: Client};
254
+ /// # use meilisearch_sdk::{KeyBuilder, KeyUpdater, Client};
255
255
/// #
256
256
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
257
257
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -327,7 +327,7 @@ impl KeysQuery {
327
327
/// # Example
328
328
///
329
329
/// ```
330
- /// # use meilisearch_sdk::{key:: KeysQuery, key:: Action, client:: Client};
330
+ /// # use meilisearch_sdk::{KeysQuery, Action, Client};
331
331
/// #
332
332
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
333
333
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -351,7 +351,7 @@ impl KeysQuery {
351
351
/// # Example
352
352
///
353
353
/// ```
354
- /// # use meilisearch_sdk::{key:: KeysQuery, key:: Action, client:: Client};
354
+ /// # use meilisearch_sdk::{KeysQuery, Action, Client};
355
355
/// #
356
356
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
357
357
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -375,7 +375,7 @@ impl KeysQuery {
375
375
/// # Example
376
376
///
377
377
/// ```
378
- /// # use meilisearch_sdk::{key:: KeysQuery, key:: Action, client:: Client};
378
+ /// # use meilisearch_sdk::{KeysQuery, Action, Client};
379
379
/// #
380
380
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
381
381
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -401,7 +401,7 @@ impl KeysQuery {
401
401
/// # Example
402
402
///
403
403
/// ```
404
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client};
404
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client};
405
405
/// #
406
406
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
407
407
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -438,7 +438,7 @@ impl KeyBuilder {
438
438
/// # Example
439
439
///
440
440
/// ```
441
- /// # use meilisearch_sdk::{key:: KeyBuilder} ;
441
+ /// # use meilisearch_sdk::KeyBuilder;
442
442
/// let builder = KeyBuilder::new();
443
443
/// ```
444
444
pub fn new ( ) -> KeyBuilder {
@@ -450,7 +450,7 @@ impl KeyBuilder {
450
450
/// # Example
451
451
///
452
452
/// ```
453
- /// # use meilisearch_sdk::key:: {KeyBuilder, Action};
453
+ /// # use meilisearch_sdk::{KeyBuilder, Action};
454
454
/// let mut builder = KeyBuilder::new();
455
455
/// builder.with_actions(vec![Action::Search, Action::DocumentsAdd]);
456
456
/// ```
@@ -464,7 +464,7 @@ impl KeyBuilder {
464
464
/// # Example
465
465
///
466
466
/// ```
467
- /// # use meilisearch_sdk::key:: {KeyBuilder, Action};
467
+ /// # use meilisearch_sdk::{KeyBuilder, Action};
468
468
/// let mut builder = KeyBuilder::new();
469
469
/// builder.with_action(Action::DocumentsAdd);
470
470
/// ```
@@ -478,7 +478,7 @@ impl KeyBuilder {
478
478
/// # Example
479
479
///
480
480
/// ```
481
- /// # use meilisearch_sdk::{key:: KeyBuilder} ;
481
+ /// # use meilisearch_sdk::KeyBuilder;
482
482
/// # use time::{OffsetDateTime, Duration};
483
483
/// let mut builder = KeyBuilder::new();
484
484
/// // create a key that expires in two weeks from now
@@ -494,7 +494,7 @@ impl KeyBuilder {
494
494
/// # Example
495
495
///
496
496
/// ```
497
- /// # use meilisearch_sdk::{key:: KeyBuilder, client:: Client};
497
+ /// # use meilisearch_sdk::{KeyBuilder, Client};
498
498
/// #
499
499
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
500
500
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -527,7 +527,7 @@ impl KeyBuilder {
527
527
/// # Example
528
528
///
529
529
/// ```
530
- /// # use meilisearch_sdk::{key:: KeyBuilder} ;
530
+ /// # use meilisearch_sdk::KeyBuilder;
531
531
/// let mut builder = KeyBuilder::new();
532
532
/// builder.with_index("test");
533
533
/// ```
@@ -541,7 +541,7 @@ impl KeyBuilder {
541
541
/// # Example
542
542
///
543
543
/// ```
544
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client};
544
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client};
545
545
/// #
546
546
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
547
547
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -567,7 +567,7 @@ impl KeyBuilder {
567
567
/// # Example
568
568
///
569
569
/// ```
570
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client};
570
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client};
571
571
/// #
572
572
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
573
573
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -593,7 +593,7 @@ impl KeyBuilder {
593
593
/// # Example
594
594
///
595
595
/// ```
596
- /// # use meilisearch_sdk::{key:: KeyBuilder, key:: Action, client:: Client};
596
+ /// # use meilisearch_sdk::{KeyBuilder, Action, Client};
597
597
/// #
598
598
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
599
599
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
@@ -619,7 +619,7 @@ impl KeyBuilder {
619
619
/// # Example
620
620
///
621
621
/// ```
622
- /// # use meilisearch_sdk::{key:: KeyBuilder, client:: Client};
622
+ /// # use meilisearch_sdk::{KeyBuilder, Client};
623
623
/// #
624
624
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
625
625
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
0 commit comments