23 lines
568 B
Rust
23 lines
568 B
Rust
|
//
|
||
|
use crate::api_result::APIResult;
|
||
|
use crate::trello::types::board::TrelloBoard;
|
||
|
use crate::trello::TrelloConfig;
|
||
|
use crate::FullCtx;
|
||
|
|
||
|
pub(crate) struct TrelloClient<'ctx> {
|
||
|
ctx: &'ctx FullCtx,
|
||
|
}
|
||
|
|
||
|
impl<'ctx> TrelloClient<'ctx> {
|
||
|
pub(crate) async fn boards(&self, cfg: &TrelloConfig) -> APIResult<Vec<TrelloBoard>> {
|
||
|
super::api::members::get_boards_that_member_belongs_to(cfg, &self.ctx.net, &self.ctx.prt)
|
||
|
.await
|
||
|
}
|
||
|
}
|
||
|
|
||
|
impl TrelloClient<'_> {
|
||
|
pub(crate) fn new(ctx: &FullCtx) -> TrelloClient {
|
||
|
TrelloClient { ctx }
|
||
|
}
|
||
|
}
|