Skip to content

Commit

Permalink
Added farm commission reporting routes
Browse files Browse the repository at this point in the history
  • Loading branch information
kfitzgerald committed Mar 10, 2020
1 parent 7cbda17 commit cbc396a
Show file tree
Hide file tree
Showing 6 changed files with 99 additions and 7 deletions.
48 changes: 47 additions & 1 deletion dist/client.js
Expand Up @@ -82,7 +82,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '3.5.0';
Client.Version = '3.6.0';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -2570,6 +2570,52 @@ Client.resourceBinders.push(function(Client) {
*/
Client.farm.reporting = {

/**
* Returns a histogram of commission metrics for time-series visualizations
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.reportings#
*/
commission_date_histogram: function(query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'reporting.commission_date_histogram',
method: 'GET',
path: '/api/reporting/commissions/date-histogram',
query: query
}, callback);
},

/**
* Returns the top N results per aggregation group
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.reportings#
*/
commission_top_n: function(query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'reporting.commission_top_n',
method: 'GET',
path: '/api/reporting/commissions/top-n',
query: query
}, callback);
},

/**
* Returns a histogram of link metrics for time-series visualizations
* @param {object} [query] - Filter arguments
Expand Down
48 changes: 47 additions & 1 deletion dist/okanjo-sdk.js
Expand Up @@ -1904,7 +1904,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '3.5.0';
Client.Version = '3.6.0';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -4392,6 +4392,52 @@ Client.resourceBinders.push(function(Client) {
*/
Client.farm.reporting = {

/**
* Returns a histogram of commission metrics for time-series visualizations
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.reportings#
*/
commission_date_histogram: function(query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'reporting.commission_date_histogram',
method: 'GET',
path: '/api/reporting/commissions/date-histogram',
query: query
}, callback);
},

/**
* Returns the top N results per aggregation group
* @param {object} [query] - Filter arguments
* @param {requestCallback} [callback] – Optional callback. When present, the request is executed
* @return {Query} - Compiled query ready for execution
* @memberof Client.reportings#
*/
commission_top_n: function(query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'reporting.commission_top_n',
method: 'GET',
path: '/api/reporting/commissions/top-n',
query: query
}, callback);
},

/**
* Returns a histogram of link metrics for time-series visualizations
* @param {object} [query] - Filter arguments
Expand Down
4 changes: 2 additions & 2 deletions dist/okanjo-sdk.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/okanjo-sdk.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "okanjo",
"version": "3.5.0",
"version": "3.6.0",
"description": "Integrate your application with the Okanjo API.",
"main": "dist/client.js",
"scripts": {
Expand Down

0 comments on commit cbc396a

Please sign in to comment.