MunifTanjim / node-bitbucket

Bitbucket API client for Browser and Node.js
https://bitbucketjs.netlify.app
MIT License
106 stars 28 forks source link

Add `pagelen` parameter to repositories.list API #10

Closed sturman closed 5 years ago

sturman commented 5 years ago

Is there any method how can I specify additional parameter for repositories.list method? I need to add pagelen parameter e.g. pagelen=50. Please add such possibility to API. Thanks

MunifTanjim commented 5 years ago

Does Bitbucket API accepts the pagelen parameter?

ref: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D#get

sturman commented 5 years ago

There is nothing about that parameter in documentation but it's actually works. You may test it with the following requests https://api.bitbucket.org/2.0/repositories/romanisko https://api.bitbucket.org/2.0/repositories/romanisko?pagelen=1

As you can see, there is "next": "https://api.bitbucket.org/2.0/repositories/romanisko?pagelen=1&page=2" and only one repository in JSON response for second request.

MunifTanjim commented 5 years ago

available from bitbucket@1.5.0 🎉