pub mod generated {
pub mod account {
include!("generated/account.rs");
}
pub mod family {
include!("generated/family.rs");
}
pub mod solana_spl {
include!("generated/solana_spl.rs");
}
pub mod solana_spl_creator {
include!("generated/solana_spl_creator.rs");
}
pub mod solana_spl_metadata {
include!("generated/solana_spl_metadata.rs");
}
pub mod serum_market {
include!("generated/serum_market.rs");
}
pub mod solana_spl_holder {
include!("generated/solana_spl_holder.rs");
}
pub mod refresh_token {
include!("generated/refresh_token.rs");
}
}
pub mod streaming;
pub mod clients;
pub use clients::{
account_client::AccountClient,
solana_spl_client::SolanaSplClient,
serum_market_client::SerumMarketClient,
solana_spl_creator_client::SolanaSplCreatorClient,
refresh_token_client::RefreshTokenClient,
};
#[cfg(test)]
mod tests {
use crate::AccountClient;
use dotenv::dotenv;
#[tokio::test]
async fn test_account_client_get() {
dotenv().ok();
let api_key = std::env::var("DB_GATEWAY_API_KEY").expect("DB_GATEWAY_API_KEY must be set for testing.");
let mut account_client = AccountClient::connect(
"ny.db-gateway.gimpey.com",
api_key.to_string(),
true
).await.expect("Failed to connect.");
let response = account_client.get_account(
"".to_string(),
"gimpey@gimpey.com".to_string(),
"".to_string(),
).await.expect("Failed to get account.");
println!("{:?}", response);
}
}