Rustbot/src/internals/tsclient.rs

18 lines
367 B
Rust
Raw Normal View History

2024-03-25 23:46:04 -04:00
use tokenservice_client::{TokenService, TokenServiceApi};
pub struct TSClient {
client: TokenService
}
impl TSClient {
pub fn new() -> Self {
TSClient {
client: TokenService::new("pgbot")
}
}
pub async fn get(&self) -> Result<TokenServiceApi, Box<dyn std::error::Error>> {
let api = self.client.connect().await.unwrap();
Ok(api)
}
}