Skip to content

Commit

Permalink
Update documentation for ManagementClient.getLogs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yevhenii authored and Yevhenii committed Jul 3, 2018
1 parent 66cc535 commit ff6b5eb
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 7 deletions.
25 changes: 22 additions & 3 deletions src/management/LogsManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,31 @@ var LogsManager = function(options) {
* @method getAll
* @memberOf module:management.LogsManager.prototype
*
* @example
* management.logs.getAll(function (err, logs) {
* @example <caption>
* This method takes an optional object as first argument that may be used to
* 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.
* var params = {
* per_page: 10,
* page: 2
* };
*
* management.logs.getAll(params, function (err, logs) {
* console.log(logs.length);
* });
*
* @param {Function} [cb] Callback function.
* @param {Object} [params] Logs params.
* @param {String} [params.q] Search Criteria using Query String Syntax
* @param {Number} [params.page] Page number. Zero based
* @param {Number} [params.per_page] The amount of entries per page
* @param {String} [params.sort] The field to use for sorting.
* @param {String} [params.fields] A comma separated list of fields to include or exclude
* @param {Boolean} [params.include_fields] true if the fields specified are to be included in the result, false otherwise.
* @param {Boolean} [params.include_totals] true if a query summary must be included in the result, false otherwise. Default false
* @param {Function} [cb] Callback function.
*
* @return {Promise|undefined}
*/
Expand Down
26 changes: 22 additions & 4 deletions src/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1551,13 +1551,31 @@ utils.wrapPropertyMethod(ManagementClient, 'getLog', 'logs.get');
* @method getLogs
* @memberOf module:management.ManagementClient.prototype
*
* @example
* management.getLogs(function (err, logs) {
* @example <caption>
* This method takes an optional object as first argument that may be used to
* 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.
* var params = {
* per_page: 10,
* page: 2
* };
*
* management.getLogs(params, function (err, logs) {
* console.log(logs.length);
* });
*
* @param {Object} data Log data object.
* @param {Function} [cb] Callback function.
* @param {Object} [params] Logs params.
* @param {String} [params.q] Search Criteria using Query String Syntax
* @param {Number} [params.page] Page number. Zero based
* @param {Number} [params.per_page] The amount of entries per page
* @param {String} [params.sort] The field to use for sorting.
* @param {String} [params.fields] A comma separated list of fields to include or exclude
* @param {Boolean} [params.include_fields] true if the fields specified are to be included in the result, false otherwise.
* @param {Boolean} [params.include_totals] true if a query summary must be included in the result, false otherwise. Default false
* @param {Function} [cb] Callback function.
*
* @return {Promise|undefined}
*/
Expand Down

0 comments on commit ff6b5eb

Please sign in to comment.