planet-client
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -67,3 +67,6 @@ /** | ||
return request.get(config).then(function(res) { | ||
return new Page(res.body, search, options); | ||
return new Page(res.body, function(pageQuery, opts) { | ||
pageQuery.type = type; | ||
return search(pageQuery, opts); | ||
}, options); | ||
}); | ||
@@ -70,0 +73,0 @@ } |
{ | ||
"name": "planet-client", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "A client for Planet's imagery API", | ||
@@ -38,6 +38,6 @@ "repository": { | ||
"browserify": "^11.2.0", | ||
"chai": "^3.0.0", | ||
"chai": "^3.3.0", | ||
"coveralls": "^2.11.3", | ||
"eslint": "^1.6.0", | ||
"eslint-config-planet": "^3.1.0", | ||
"eslint-config-planet": "^4.0.0", | ||
"gh-pages": "^0.4.0", | ||
@@ -47,3 +47,3 @@ "handlebars": "^4.0.3", | ||
"jsdoc-json": "^2.0.0", | ||
"karma": "^0.13.10", | ||
"karma": "^0.13.11", | ||
"karma-browserify": "^4.4.0", | ||
@@ -71,4 +71,4 @@ "karma-chrome-launcher": "^0.2.1", | ||
"prompt": "^0.2.14", | ||
"yargs": "^3.14.0" | ||
"yargs": "^3.27.0" | ||
} | ||
} |
@@ -171,4 +171,36 @@ /* eslint-env mocha */ | ||
it('maintains the provider when paging', function(done) { | ||
var calls = []; | ||
var provider = 'landsat'; | ||
request.get = function(config) { | ||
calls.push(config); | ||
return Promise.resolve({ | ||
body: { | ||
features: [scene], | ||
links: { | ||
next: 'http://example.com/foo/' | ||
} | ||
} | ||
}); | ||
}; | ||
var query = { | ||
'acquired.lte': new Date().toISOString(), | ||
type: provider | ||
}; | ||
var promise = scenes.search(query); | ||
promise.then(function(page) { | ||
page.next().then(function(nextPage) { | ||
assert.lengthOf(calls, 2); | ||
assert.equal(calls[1].url, urls.join(SCENES, provider, '')); | ||
done(); | ||
}).catch(done); | ||
}).catch(done); | ||
}); | ||
}); | ||
}); |
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
148721
4195
Updatedyargs@^3.27.0