18 lines
367 B
Rust
18 lines
367 B
Rust
|
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)
|
||
|
}
|
||
|
}
|