Skip to content

Commit 1872b0e

Browse files
committed
Changing query string separator
1 parent 59fda8f commit 1872b0e

File tree

7 files changed

+26
-20
lines changed

7 files changed

+26
-20
lines changed

History.txt

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
=== 1.28.0 / 2023-12-18
2+
3+
* Changing query string separator.
4+
15
=== 1.27.0 / 2023-04-27
26

37
* Allowing the delete method to include query strings.

docs/index.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ method of the corresponding class. Let's see an example of model retrieval:
763763
var model = new bigml.Model();
764764
model.get('model/51b3c45a37203f16230000b5',
765765
true,
766-
'only_model=true;limit=-1',
766+
'only_model=true&limit=-1',
767767
function (error, resource) {
768768
if (!error && resource) {
769769
console.log(resource);
@@ -1181,7 +1181,7 @@ method can be immediately called in a synchronous way.
11811181
var model = new bigml.Model();
11821182
model.get('model/51b3c45a37203f16230000b5',
11831183
true,
1184-
'only_model=true;limit=-1',
1184+
'only_model=true&limit=-1',
11851185
function (error, resource) {
11861186
if (!error && resource) {
11871187
var localModel = new bigml.LocalModel(resource);
@@ -1589,7 +1589,7 @@ method can be immediately called in a synchronous way.
15891589
var bigml = require('bigml');
15901590
var logisticRegression = new bigml.LogisticRegression();
15911591
logisticRegression.get('logisticregression/51b3c45a37203f16230000b5', true,
1592-
'only_model=true;limit=-1',
1592+
'only_model=true&limit=-1',
15931593
function (error, resource) {
15941594
if (!error && resource) {
15951595
var localLogisticRegression = new bigml.LocalLogisticRegression(
@@ -1714,7 +1714,7 @@ method can be immediately called in a synchronous way.
17141714
var bigml = require('bigml');
17151715
var deepnet = new bigml.Deepnet();
17161716
deepnet.get('deepnet/51b3c45a37203f16230000b5', true,
1717-
'only_model=true;limit=-1',
1717+
'only_model=true&limit=-1',
17181718
function (error, resource) {
17191719
if (!error && resource) {
17201720
var localDeepnet = new bigml.LocalDeepnet(
@@ -1838,7 +1838,7 @@ method can be immediately called in a synchronous way.
18381838
var bigml = require('bigml');
18391839
var fusion = new bigml.Fusion();
18401840
fusion.get('fusion/51b3c45a37203f16230000b5', true,
1841-
'only_model=true;limit=-1',
1841+
'only_model=true&limit=-1',
18421842
function (error, resource) {
18431843
if (!error && resource) {
18441844
var localFusion = new bigml.LocalFusion(
@@ -1950,7 +1950,7 @@ method can be immediately called in a synchronous way.
19501950
var bigml = require('bigml');
19511951
var pca = new bigml.PCA();
19521952
pca.get('pca/51b3c45a37203f16230000b5', true,
1953-
'only_model=true;limit=-1',
1953+
'only_model=true&limit=-1',
19541954
function (error, resource) {
19551955
if (!error && resource) {
19561956
var localPCA = new bigml.LocalPCA(
@@ -2030,7 +2030,7 @@ method can be immediately called in a synchronous way.
20302030
var bigml = require('bigml');
20312031
var linearRegression = new bigml.LinearRegression();
20322032
linearRegression.get('linearregression/51b3c45a37203f16230000b5', true,
2033-
'only_model=true;limit=-1',
2033+
'only_model=true&limit=-1',
20342034
function (error, resource) {
20352035
if (!error && resource) {
20362036
var localLinearRegression = new bigml.LocalLinearRegression(
@@ -2144,7 +2144,7 @@ method can be immediately called in a synchronous way.
21442144
var bigml = require('bigml');
21452145
var cluster = new bigml.Cluster();
21462146
cluster.get('cluster/51b3c45a37203f16230000b5', true,
2147-
'only_model=true;limit=-1',
2147+
'only_model=true&limit=-1',
21482148
function (error, resource) {
21492149
if (!error && resource) {
21502150
var localCluster = new bigml.LocalCluster(resource);
@@ -2233,7 +2233,7 @@ method can be immediately called in a synchronous way.
22332233
var bigml = require('bigml');
22342234
var anomaly = new bigml.Anomaly();
22352235
anomaly.get('anomaly/51b3c45a37203f16230030b5', true,
2236-
'only_model=true;limit=-1',
2236+
'only_model=true&limit=-1',
22372237
function (error, resource) {
22382238
if (!error && resource) {
22392239
var localAnomaly = new bigml.LocalAnomaly(resource);
@@ -2393,7 +2393,7 @@ method can be immediately called to predict in a synchronous way.
23932393
var bigml = require('bigml');
23942394
var association = new bigml.Association();
23952395
association.get('association/51b3c45a37203f16230530b5', true,
2396-
'only_model=true;limit=-1',
2396+
'only_model=true&limit=-1',
23972397
function (error, resource) {
23982398
if (!error && resource) {
23992399
var localAssociation = new bigml.LocalAssociation(resource);
@@ -2467,7 +2467,7 @@ in a synchronous way.
24672467
var bigml = require('bigml');
24682468
var topicModel = new bigml.TopicModel();
24692469
topicModel.get('topicmodel/51b3c45a47203f16230000b5', true,
2470-
'only_model=true;limit=-1',
2470+
'only_model=true&limit=-1',
24712471
function (error, resource) {
24722472
if (!error && resource) {
24732473
var localTopicModel = new bigml.LocalTopicModel(resource);
@@ -2584,7 +2584,7 @@ method can be immediately called in a synchronous way.
25842584
var bigml = require('bigml');
25852585
var timeSeries = new bigml.TimeSeries();
25862586
timeSeries.get('timeseries/51b3c45a37203f16230000b5', true,
2587-
'only_model=true;limit=-1',
2587+
'only_model=true&limit=-1',
25882588
function (error, resource) {
25892589
if (!error && resource) {
25902590
var localTimeSeries = new bigml.LocalTimeSeries(

lib/BigML.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ function getUrl(context) {
4646
function credentials(connection, organization) {
4747
var auth = connection.auth;
4848
if (organization && connection.organization) {
49-
auth += ";organization=" + connection.organization;
49+
auth += "&organization=" + connection.organization;
5050
} else if (connection.project) {
51-
auth += ";project=" + connection.project;
51+
auth += "&project=" + connection.project;
5252
}
5353
return auth;
5454
}
@@ -72,7 +72,7 @@ function BigML(username, apiKey, context) {
7272
this.username = username || process.env.BIGML_USERNAME;
7373
this.apiKey = apiKey || process.env.BIGML_API_KEY;
7474
this.url = getUrl(context)
75-
this.auth = "?username=" + this.username + ";api_key=" + this.apiKey;
75+
this.auth = "?username=" + this.username + "&api_key=" + this.apiKey;
7676
this.project = undefined;
7777
this.organization = undefined;
7878
this.resourceUrls = {};
@@ -141,7 +141,7 @@ BigML.prototype.request = function (options, retry, cb) {
141141
}
142142
}
143143
if (options.query) {
144-
uri += ';' + options.query;
144+
uri += '&' + options.query;
145145
}
146146
reqOptions = {
147147
method : options.method || 'GET',

lib/LocalEnsemble.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function LocalEnsemble(ensembleOrModels, connection, maxModels,
214214
*/
215215
var model, query, modelObject;
216216
model = new Model(self.connection);
217-
query = 'ensemble_id=' + self.resourceId.id + ';full=yes';
217+
query = 'ensemble_id=' + self.resourceId.id + '&full=yes';
218218

219219
function createSplit(error, resources) {
220220
if (error) {

lib/LocalModel.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ function LocalModel(resource, connection, fields) {
107107
if (fields.hasOwnProperty(field)) {
108108
if (!resource.model.fields.hasOwnProperty(field)) {
109109
throw new Error('Some fields are missing to generate a ' +
110-
'local model.\nPlease provide a model ' +
110+
'local model (could not find ' + field +
111+
' field used by the model in the `fields`' +
112+
' list).\nPlease provide a model ' +
111113
'with the complete list of fields');
112114
}
113115
fieldInfo = resource.model.fields[field];

lib/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ define("PUBLIC_PREFIX", "public/");
201201
define("ID_SHARED_PATTERN", /^[a-zA-Z0-9]{24,30}$/);
202202
define("SHARED_PREFIX", "shared/");
203203
// Query string for model retrieval
204-
define("ONLY_MODEL", 'only_model=true;limit=-1;');
204+
define("ONLY_MODEL", 'only_model=true&limit=-1&');
205205
// Default retries parameters
206206
define("DEFAULT_BIGML_RETRIES", 10);
207207
define("DEFAULT_BIGML_WAIT", 1000);

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"bindings",
88
"BigML"
99
],
10-
"version": "1.27.0",
10+
"version": "1.28.0",
1111
"author": {
1212
"name": "BigML",
1313
"email": "[email protected]"

0 commit comments

Comments
 (0)