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