use serde_json::Value;
use crate::client::{encode_path_segment, Client};
use crate::error::Error;
#[derive(Debug, Clone, Copy)]
pub struct Accounts<'a> {
pub(crate) client: &'a Client,
}
impl Accounts<'_> {
pub async fn list(&self) -> Result<Value, Error> {
self.client.get("/accounts", Vec::new()).await
}
pub async fn get(&self, id: &str) -> Result<Value, Error> {
self.client
.get(&format!("/accounts/{}", encode_path_segment(id)), Vec::new())
.await
}
}