mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
add tests on the index resource
This commit is contained in:
parent
e664f09045
commit
32364e9919
4 changed files with 279 additions and 0 deletions
|
@ -95,10 +95,18 @@ impl Server {
|
|||
self.index_with_encoder(uid, Encoder::Plain)
|
||||
}
|
||||
|
||||
pub async fn create_index(&self, body: Value) -> (Value, StatusCode) {
|
||||
self.service.post("/indexes", body).await
|
||||
}
|
||||
|
||||
pub fn index_with_encoder(&self, uid: impl AsRef<str>, encoder: Encoder) -> Index<'_> {
|
||||
Index { uid: uid.as_ref().to_string(), service: &self.service, encoder }
|
||||
}
|
||||
|
||||
pub async fn list_indexes_raw(&self, parameters: &str) -> (Value, StatusCode) {
|
||||
self.service.get(format!("/indexes{parameters}")).await
|
||||
}
|
||||
|
||||
pub async fn list_indexes(
|
||||
&self,
|
||||
offset: Option<usize>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue