19 lines
627 B
Rust
19 lines
627 B
Rust
// SPDX-FileCopyrightText: 2022 Matteo Settenvini <matteo.settenvini@montecristosoftware.eu>
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
use {crate::api_client::ApiClient, crate::recipe, anyhow::Result};
|
|
|
|
pub async fn with(api_client: &ApiClient) -> Result<()> {
|
|
let recipes = api_client
|
|
.rest(|client| async {
|
|
let response = client
|
|
.get(api_client.base_url().join("apps/cookbook/api/recipes")?)
|
|
.send()
|
|
.await;
|
|
Ok(response?)
|
|
})
|
|
.await?;
|
|
println!("{:#?}", recipes.json::<Vec<recipe::Metadata>>().await?);
|
|
todo!();
|
|
}
|