1
1
use reqwest:: Client ;
2
- use rust_team_data:: v1:: { BASE_URL , People , Teams , ZulipMapping } ;
2
+ use rust_team_data:: v1:: { BASE_URL , People , Repos , Teams , ZulipMapping } ;
3
3
use serde:: de:: DeserializeOwned ;
4
4
use std:: sync:: Arc ;
5
5
use std:: time:: { Duration , Instant } ;
@@ -10,6 +10,7 @@ pub struct TeamClient {
10
10
base_url : String ,
11
11
client : Client ,
12
12
teams : CachedTeamItem < Teams > ,
13
+ repos : CachedTeamItem < Repos > ,
13
14
people : CachedTeamItem < People > ,
14
15
zulip_mapping : CachedTeamItem < ZulipMapping > ,
15
16
}
@@ -25,6 +26,7 @@ impl TeamClient {
25
26
base_url,
26
27
client : Client :: new ( ) ,
27
28
teams : CachedTeamItem :: new ( "/teams.json" ) ,
29
+ repos : CachedTeamItem :: new ( "/repos.json" ) ,
28
30
people : CachedTeamItem :: new ( "/people.json" ) ,
29
31
zulip_mapping : CachedTeamItem :: new ( "/zulip-map.json" ) ,
30
32
}
@@ -99,6 +101,10 @@ impl TeamClient {
99
101
self . teams . get ( & self . client , & self . base_url ) . await
100
102
}
101
103
104
+ pub async fn repos ( & self ) -> anyhow:: Result < Repos > {
105
+ self . repos . get ( & self . client , & self . base_url ) . await
106
+ }
107
+
102
108
pub async fn people ( & self ) -> anyhow:: Result < People > {
103
109
self . people . get ( & self . client , & self . base_url ) . await
104
110
}
0 commit comments