diff options
Diffstat (limited to 'lib/bitbucket_server/client.rb')
-rw-r--r-- | lib/bitbucket_server/client.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/bitbucket_server/client.rb b/lib/bitbucket_server/client.rb index 15e59f93141..83e8808db07 100644 --- a/lib/bitbucket_server/client.rb +++ b/lib/bitbucket_server/client.rb @@ -35,9 +35,9 @@ module BitbucketServer BitbucketServer::Representation::Repo.new(parsed_response) end - def repos + def repos(page_offset: 0, limit: nil) path = "/repos" - get_collection(path, :repo) + get_collection(path, :repo, page_offset: page_offset, limit: limit) end def create_branch(project_key, repo, branch_name, sha) @@ -61,8 +61,8 @@ module BitbucketServer private - def get_collection(path, type) - paginator = BitbucketServer::Paginator.new(connection, Addressable::URI.escape(path), type) + def get_collection(path, type, page_offset: 0, limit: nil) + paginator = BitbucketServer::Paginator.new(connection, Addressable::URI.escape(path), type, page_offset: page_offset, limit: limit) BitbucketServer::Collection.new(paginator) rescue *SERVER_ERRORS => e raise ServerError, e |