Comparing version 0.3.2 to 0.3.3
@@ -169,10 +169,10 @@ var base64 = require('base64-js'), | ||
collection: function(options, pagination, cb) { | ||
if (cb === undefined) { cb = pagination; pagination = {}} | ||
collection: function(options, meta, cb) { | ||
if (cb === undefined) { cb = meta; meta = {}} | ||
var params = []; | ||
for (var key in options.params || {}) { | ||
params.push(key + "=" + options.params[key]); | ||
for (var key in meta.params || {}) { | ||
params.push(key + "=" + meta.params[key]); | ||
} | ||
if (pagination.page) { params.push(["page", pagination.page].join("=")) } | ||
if (pagination.per_page) { params.push(["per_page", pagination.per_page].join("=")) } | ||
if (meta.page) { params.push(["page", meta.page].join("=")) } | ||
if (meta.per_page) { params.push(["per_page", meta.per_page].join("=")) } | ||
this.withAuthorization(cb, function() { | ||
@@ -179,0 +179,0 @@ this.request({ |
@@ -5,3 +5,3 @@ { | ||
"description": "Netlify API client", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"bugs": { | ||
@@ -8,0 +8,0 @@ "url": "https://github.com/netlify/netlify-js/issues" |
772500