Skip to content

Commit

Permalink
Merge pull request #268 from auth0/feature-pagination-docs
Browse files Browse the repository at this point in the history
Adding pagination docs for clients/connections
  • Loading branch information
luisrudge authored May 29, 2018
2 parents fbb9bdd + 85b3745 commit c4d838a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
18 changes: 16 additions & 2 deletions src/management/ClientsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,26 @@ utils.wrapPropertyMethod(ClientsManager, 'create', 'resource.create');
* @method getAll
* @memberOf module:management.ClientsManager.prototype
*
* @example
* @example <caption>
* This method takes an optional object as first argument that may be used to
* specify pagination settings. If pagination options are not present,
* the first page of a limited number of results will be returned.
* </caption>
*
* // Pagination settings.
* var params = {
* per_page: 10,
* page: 2
* };
*
* management.clients.getAll(function (err, clients) {
* console.log(clients.length);
* });
*
* @param {Function} [cb] Callback function.
* @param {Object} [params] Clients params.
* @param {Number} [params.per_page] Number of clients per page.
* @param {Number} [params.page] Page number.
* @param {Function} [cb] Callback function.
*
* @return {Promise|undefined}
*/
Expand Down
18 changes: 16 additions & 2 deletions src/management/ConnectionsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,26 @@ utils.wrapPropertyMethod(ConnectionsManager, 'create', 'resource.create');
* @method getAll
* @memberOf module:management.ConnectionsManager.prototype
*
* @example
* @example <caption>
* This method takes an optional object as first argument that may be used to
* specify pagination settings. If pagination options are not present,
* the first page of a limited number of results will be returned.
* </caption>
*
* // Pagination settings.
* var params = {
* per_page: 10,
* page: 2
* };
*
* management.connections.getAll(function (err, connections) {
* console.log(connections.length);
* });
*
* @param {Function} [cb] Callback function.
* @param {Object} [params] Connections params.
* @param {Number} [params.per_page] Number of connections per page.
* @param {Number} [params.page] Page number.
* @param {Function} [cb] Callback function.
*
* @return {Promise|undefined}
*/
Expand Down
3 changes: 2 additions & 1 deletion src/management/UsersManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ UsersManager.prototype.create = function(data, cb) {
*
* @example <caption>
* This method takes an optional object as first argument that may be used to
* specify pagination settings and the search query.
* specify pagination settings and the search query. If pagination options are
* not present, the first page of a limited number of results will be returned.
* </caption>
*
* // Pagination settings.
Expand Down

0 comments on commit c4d838a

Please sign in to comment.