yodata-client-js
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -19,3 +19,3 @@ { | ||
}, | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"main": "yodata.client.js", | ||
@@ -22,0 +22,0 @@ "private": false, |
@@ -49,3 +49,3 @@ ## Yodata JavaScript Client | ||
client.find('yodata.task', options , function(err, results) { | ||
ydClientUi.api.find('yodata.task', options , function(err, results) { | ||
if (err) { | ||
@@ -52,0 +52,0 @@ //an error occurred |
@@ -158,7 +158,8 @@ (function(){ | ||
client.prototype.findById = function(modelId, objectId, callback) { | ||
this.executeApiCall(urlForModel(modelId) + 'findById/' + objectId, 'GET', null, callback); | ||
var validParams = ['populate']; | ||
this.executeApiCall(addOptionsToQueryString(urlForModel(modelId)) + 'findById/' + objectId, 'GET', null, callback); | ||
} | ||
client.prototype.find = function(modelId, options, callback) { | ||
var validParams = ['criteria', 'limit', 'offset', 'sort', 'fields']; | ||
var validParams = ['criteria', 'limit', 'offset', 'sort', 'fields', 'populate']; | ||
var url = addOptionsToQueryString(urlForModel(modelId) + 'find/', options, validParams); | ||
@@ -224,2 +225,6 @@ this.executeApiCall(url, 'GET', null, callback); | ||
if (validParams.indexOf('populate') !== -1 && options.populate) { | ||
url += appendQueryParam(url, 'populate', encodeURIComponent(JSON.stringify(options.populate))); | ||
} | ||
return url; | ||
@@ -226,0 +231,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16293
225