Skip to content

Commit

Permalink
Added farm link reporting routes
Browse files Browse the repository at this point in the history
  • Loading branch information
kfitzgerald committed Jan 16, 2020
1 parent 85b0e8b commit 7cbda17
Show file tree
Hide file tree
Showing 6 changed files with 115 additions and 7 deletions.
56 changes: 55 additions & 1 deletion dist/client.js
Expand Up @@ -82,7 +82,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '3.4.0';
Client.Version = '3.5.0';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -2564,6 +2564,60 @@ Client.resourceBinders.push(function(Client) {

};

/**
* Reporting
* @namespace Client.farm.reporting
*/
Client.farm.reporting = {

/**
* Returns a histogram of link 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#
*/
link_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.link_date_histogram',
method: 'GET',
path: '/api/reporting/links/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#
*/
link_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.link_top_n',
method: 'GET',
path: '/api/reporting/links/top-n',
query: query
}, callback);
}

};

/**
* Vendors
* @namespace Client.farm.vendors
Expand Down
56 changes: 55 additions & 1 deletion dist/okanjo-sdk.js
Expand Up @@ -1904,7 +1904,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '3.4.0';
Client.Version = '3.5.0';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -4386,6 +4386,60 @@ Client.resourceBinders.push(function(Client) {

};

/**
* Reporting
* @namespace Client.farm.reporting
*/
Client.farm.reporting = {

/**
* Returns a histogram of link 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#
*/
link_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.link_date_histogram',
method: 'GET',
path: '/api/reporting/links/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#
*/
link_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.link_top_n',
method: 'GET',
path: '/api/reporting/links/top-n',
query: query
}, callback);
}

};

/**
* Vendors
* @namespace Client.farm.vendors
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.4.0",
"version": "3.5.0",
"description": "Integrate your application with the Okanjo API.",
"main": "dist/client.js",
"scripts": {
Expand Down

0 comments on commit 7cbda17

Please sign in to comment.