Skip to content

Commit

Permalink
* Updated vendor.list route to include query arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
kfitzgerald committed Jul 16, 2019
1 parent 9fdf5ab commit 8a35053
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 deletions.
14 changes: 11 additions & 3 deletions dist/client.js
Expand Up @@ -82,7 +82,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '2.3.0';
Client.Version = '2.3.1';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -2163,19 +2163,27 @@ Client.resourceBinders.push(function(Client) {
/**
* Returns a list of vendors.
* @param {string} instance_id – Instance Id
* @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.vendors#
*/
list: function(instance_id, callback) {
list: function(instance_id, query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'vendor.list',
method: 'GET',
path: '/api/{instance_id}/vendors',
pathParams: {
instance_id: instance_id
}
},
query: query
}, callback);
},

Expand Down
14 changes: 11 additions & 3 deletions dist/okanjo-sdk.js
Expand Up @@ -1742,7 +1742,7 @@ function Client(config) {
/**
* SDK Version
*/
Client.Version = '2.3.0';
Client.Version = '2.3.1';

/**
* Expose the Provider base class
Expand Down Expand Up @@ -3823,19 +3823,27 @@ Client.resourceBinders.push(function(Client) {
/**
* Returns a list of vendors.
* @param {string} instance_id – Instance Id
* @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.vendors#
*/
list: function(instance_id, callback) {
list: function(instance_id, query, callback) {
// Shift optional arguments, if necessary
if (typeof query === "function") {
callback = query;
query = undefined;
}

return Client._makeRequest({
api: 'farm',
action: 'vendor.list',
method: 'GET',
path: '/api/{instance_id}/vendors',
pathParams: {
instance_id: instance_id
}
},
query: query
}, callback);
},

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.json
@@ -1,6 +1,6 @@
{
"name": "okanjo",
"version": "2.3.0",
"version": "2.3.1",
"description": "Integrate your application with the Okanjo API.",
"main": "dist/client.js",
"scripts": {
Expand Down

0 comments on commit 8a35053

Please sign in to comment.