File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { OmahaCollection } from '../client/OmahaCollection';
2
2
import { Repository } from '../entities/Repository' ;
3
3
import { DeleteObjectResponse } from './generic/DeleteObjectResponse' ;
4
4
import { CreateRepositoryRequest } from './repository/CreateRepositoryRequest' ;
5
+ import { RepositoryOverview } from './repository/RepositoryOverview' ;
5
6
import { RepositoryWithCollaboration } from './repository/RepositoryWithCollaboration' ;
6
7
import { UpdateRepositoryRequest } from './repository/UpdateRepositoryRequest' ;
7
8
import { RepositoryTokensCollection } from './RepositoryTokensCollection' ;
@@ -22,6 +23,15 @@ export class RepositoryCollection extends OmahaCollection {
22
23
return this . client . get < RepositoryWithCollaboration [ ] > ( '/v1/repositories' ) ;
23
24
}
24
25
26
+ /**
27
+ * Gets a list of all repositories that the current token has access to, along with the collaboration, latest
28
+ * release, and the last year's worth of weekly download statistics for each.
29
+ * @scope None, but an account-based token is required.
30
+ */
31
+ public async overview ( ) {
32
+ return this . client . get < RepositoryOverview [ ] > ( '/v1/repositories/overview' ) ;
33
+ }
34
+
25
35
/**
26
36
* Gets a specific repository that the current token has access to.
27
37
*/
Original file line number Diff line number Diff line change
1
+ import { Collaboration } from '../../entities/Collaboration' ;
2
+ import { Release } from '../../entities/Release' ;
3
+ import { Repository } from '../../entities/Repository' ;
4
+ import { WeeklyDownloadCount } from '../downloads/WeeklyDownloadCount' ;
5
+
6
+ export interface RepositoryOverview {
7
+
8
+ /**
9
+ * The repository.
10
+ */
11
+ repository : Repository ;
12
+
13
+ /**
14
+ * The user's collaboration for this repository.
15
+ */
16
+ collaboration : Collaboration ;
17
+
18
+ /**
19
+ * The greatest published release for the repository or `undefined` if there aren't any published releases.
20
+ */
21
+ release ?: Release ;
22
+
23
+ /**
24
+ * The last year's worth of weekly download statistics for this repository.
25
+ */
26
+ downloads : WeeklyDownloadCount [ ] ;
27
+
28
+ }
Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ export * from './collections/repository/tokens/UpdateRepositoryTokenRequest';
84
84
export * from './collections/repository/tokens/UpdateRepositoryTokenResponse' ;
85
85
export * from './collections/repository/CreateRepositoryRequest' ;
86
86
export * from './collections/repository/RepositoryWithCollaboration' ;
87
+ export * from './collections/repository/RepositoryOverview' ;
87
88
export * from './collections/repository/UpdateRepositoryRequest' ;
88
89
89
90
export * from './collections/tags/CreateTagRequest' ;
You can’t perform that action at this time.
0 commit comments