File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
src/main/scala/com/codacy/client/bitbucket/v2 Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -87,3 +87,11 @@ object RepositoryUrlType extends Enumeration {
87
87
}
88
88
89
89
case class RepositoryUrl (urlType : RepositoryUrlType .Value , link : String )
90
+
91
+ sealed trait OwnerInfo {
92
+ def value : String
93
+ }
94
+
95
+ case class AccountId (value : String ) extends OwnerInfo
96
+
97
+ case class TeamUsername (value : String ) extends OwnerInfo
Original file line number Diff line number Diff line change 1
1
package com .codacy .client .bitbucket .v2 .service
2
2
3
- import com .codacy .client .bitbucket .v2 .{DeployKey , Repository }
3
+ import com .codacy .client .bitbucket .v2 .{DeployKey , OwnerInfo , Repository }
4
4
import com .codacy .client .bitbucket .client .{BitbucketClient , Request , RequestResponse }
5
5
import play .api .libs .json .Json
6
6
@@ -10,8 +10,10 @@ class RepositoryServices(client: BitbucketClient) {
10
10
* Gets the list of the user's repositories. Private repositories only appear on this list
11
11
* if the caller is authenticated and is authorized to view the repository.
12
12
*/
13
- def getRepositories (owner : String ): RequestResponse [Seq [Repository ]] = {
14
- client.executePaginated(Request (s " https://bitbucket.org/api/2.0/repositories/ $owner" , classOf [Seq [Repository ]]))
13
+ def getRepositories (ownerInfo : OwnerInfo ): RequestResponse [Seq [Repository ]] = {
14
+ client.executePaginated(
15
+ Request (s " https://bitbucket.org/api/2.0/repositories/ ${ownerInfo.value}" , classOf [Seq [Repository ]])
16
+ )
15
17
}
16
18
17
19
def createKey (
You can’t perform that action at this time.
0 commit comments