use std::sync::Arc;
use crate::client::HttpCore;
use crate::error::Result;
use crate::types::*;
#[derive(Debug, Clone)]
pub struct Token {
pub(crate) core: Arc<HttpCore>,
}
impl Token {
pub async fn get(&self, mint: &str) -> Result<TokenResponse> {
self.core.get(&format!("/token/{}", mint), &()).await
}
pub async fn batch(&self, mints: Vec<String>) -> Result<TokenBatchResponse> {
self.core
.post_json("/token/batch", &MintBatchRequest { mints })
.await
}
pub async fn batch_buyer_quality(
&self,
mints: Vec<String>,
) -> Result<AlphaBuyerQualityBatchResponse> {
self.core
.post_json("/tokens/batch/buyer-quality", &MintBatchRequest { mints })
.await
}
}