use std::sync::Arc;
use crate::client::HttpCore;
use crate::error::Result;
use crate::types::*;
#[derive(Debug, Clone)]
pub struct Deployer {
pub(crate) core: Arc<HttpCore>,
}
impl Deployer {
pub async fn stats(&self) -> Result<DeployerStats> {
self.core.get("/deployer-hunter/stats", &()).await
}
pub async fn leaderboard(
&self,
params: &DeployerLeaderboardParams,
) -> Result<DeployerLeaderboardResponse> {
self.core
.get("/deployer-hunter/leaderboard", params)
.await
}
pub async fn profile(&self, wallet: &str) -> Result<DeployerProfile> {
self.core
.get(&format!("/deployer-hunter/{}", wallet), &())
.await
}
pub async fn tokens(
&self,
wallet: &str,
params: &DeployerTokensParams,
) -> Result<DeployerTokensResponse> {
self.core
.get(
&format!("/deployer-hunter/{}/tokens", wallet),
params,
)
.await
}
pub async fn alerts(
&self,
params: &DeployerAlertsParams,
) -> Result<DeployerAlertsResponse> {
self.core.get("/deployer-hunter/alerts", params).await
}
pub async fn alert_stats(
&self,
params: &DeployerAlertStatsParams,
) -> Result<DeployerAlertStats> {
self.core
.get("/deployer-hunter/alert-stats", params)
.await
}
pub async fn best_tokens(
&self,
params: &BestTokensParams,
) -> Result<BestTokensResponse> {
self.core
.get("/deployer-hunter/best-tokens", params)
.await
}
pub async fn recent_bonds(
&self,
params: &RecentBondsParams,
) -> Result<RecentBondsResponse> {
self.core
.get("/deployer-hunter/recent-bonds", params)
.await
}
pub async fn trajectory(&self, wallet: &str) -> Result<DeployerTrajectoryResponse> {
self.core
.get(
&format!("/deployer-hunter/{}/trajectory", wallet),
&(),
)
.await
}
}