Merge pull request #6 from UncleSamulus/master
Update dependencies and fix tests to suit to newly xeno-canto collected recordings
This commit is contained in:
commit
dd06a20d58
|
@ -14,4 +14,4 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
15
README.md
15
README.md
|
@ -82,8 +82,8 @@ orthonyxPaupuaTari.search(query, function(self){
|
|||
// inspect the response object
|
||||
console.log(self.entity);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
**Advanced search parameters**
|
||||
|
||||
* name [string] commong english name, scientific name, or family latin name
|
||||
|
@ -99,19 +99,16 @@ orthonyxPaupuaTari.search(query, function(self){
|
|||
* quality: [string]
|
||||
* qualitylt: [string] quality less than
|
||||
* area: [string]
|
||||
```
|
||||
## References
|
||||
- [xeno-canto.org](http://xeno-canto.org/)
|
||||
|
||||
## Reference
|
||||
####[xeno-canto.org](http://xeno-canto.org/)
|
||||
|
||||
|
||||
### Release History
|
||||
## Release History
|
||||
* 07/02/2018 - v0.0.4 Fixing communication with xeno-canto api - Thanks @camilokorea
|
||||
* 07/03/14 - v0.0.3 Adjust API endpoint - Thanks @rowanoulton
|
||||
* 0.0.2 Implements advanced searches.
|
||||
* 12/11/13 xeno-canto inception, basic search 0.0.1
|
||||
|
||||
## License
|
||||
|
||||
### License
|
||||
Copyright (c) 2013 Patrick De Marta
|
||||
Copyright (c) 2013 Patrick De Marta
|
||||
Licensed under the [GNU GPL license](http://www.gnu.org/licenses/) .
|
||||
|
|
File diff suppressed because it is too large
Load Diff
45
package.json
45
package.json
|
@ -1,12 +1,8 @@
|
|||
{
|
||||
"name": "xeno-canto",
|
||||
"description": "Node.js API for xeno-canto database webservices",
|
||||
"version": "0.0.4",
|
||||
"homepage": "",
|
||||
"author": {
|
||||
"name": "tripitakit",
|
||||
"email": "patrick.demarta@gmail.com"
|
||||
},
|
||||
"version": "0.0.5",
|
||||
"homepage": "https://github.com/UncleSamulus/xeno-canto",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/tripitakit/xeno-canto"
|
||||
|
@ -21,22 +17,31 @@
|
|||
}
|
||||
],
|
||||
"main": "lib/xeno-canto",
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "grunt nodeunit"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt-contrib-jshint": "~0.6.4",
|
||||
"grunt-contrib-nodeunit": "~0.2.0",
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
"grunt": "~0.4.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"request": "~2.83.0"
|
||||
"request": "^2.88.2"
|
||||
},
|
||||
"directories" : ["lib", "test"],
|
||||
"keywords": ["bird","sound","database","webservice","api",
|
||||
"science", "biology", "zoology", "bioinformatics"]
|
||||
}
|
||||
"devDependencies": {
|
||||
"grunt": "^1.5.3",
|
||||
"grunt-contrib-jshint": "^3.2.0",
|
||||
"grunt-contrib-nodeunit": "^4.0.0",
|
||||
"grunt-contrib-watch": "^1.1.0"
|
||||
},
|
||||
"directories": [
|
||||
"lib",
|
||||
"test"
|
||||
],
|
||||
"keywords": [
|
||||
"bird",
|
||||
"sound",
|
||||
"database",
|
||||
"webservice",
|
||||
"api",
|
||||
"science",
|
||||
"biology",
|
||||
"zoology",
|
||||
"bioinformatics"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -2,61 +2,39 @@
|
|||
|
||||
var XenoCanto = require('../lib/xeno-canto.js');
|
||||
|
||||
/*
|
||||
======== A Handy Little Nodeunit Reference ========
|
||||
https://github.com/caolan/nodeunit
|
||||
|
||||
Test methods:
|
||||
test.expect(numAssertions)
|
||||
test.done()
|
||||
Test assertions:
|
||||
test.ok(value, [message])
|
||||
test.equal(actual, expected, [message])
|
||||
test.notEqual(actual, expected, [message])
|
||||
test.deepEqual(actual, expected, [message])
|
||||
test.notDeepEqual(actual, expected, [message])
|
||||
test.strictEqual(actual, expected, [message])
|
||||
test.notStrictEqual(actual, expected, [message])
|
||||
test.throws(block, [error], [message])
|
||||
test.doesNotThrow(block, [error], [message])
|
||||
test.ifError(value)
|
||||
*/
|
||||
console.debug("WARNING: The hardcoded values used in this test may change, from xeno-canto database, please double check the current recording count for each query");
|
||||
|
||||
exports['xeno-canto-api'] = {
|
||||
setUp: function(done) {
|
||||
done();
|
||||
},
|
||||
|
||||
'search bearded bellbird returns 28 recordings': function(test) {
|
||||
'search bearded bellbird returns 74 recordings': function(test) {
|
||||
test.expect(4);
|
||||
var xeno_canto = new XenoCanto();
|
||||
xeno_canto.search("bearded bellbird", function(self){
|
||||
test.ok(!!self);
|
||||
test.equal(typeof(self), 'object');
|
||||
test.equal(typeof(self.entity), 'object');
|
||||
test.equal(self.entity.numRecordings, 28);
|
||||
test.equal(self.entity.numRecordings, 74);
|
||||
test.done();
|
||||
});
|
||||
},
|
||||
|
||||
'advanced search bearded bellbird cnt:spain': function(test) {
|
||||
'advanced search bearded bellbird cnt:Venezuela (27)': function(test) {
|
||||
test.expect(4);
|
||||
var xeno_canto = new XenoCanto();
|
||||
var query = {
|
||||
name:'orthonyx',
|
||||
country: 'papua',
|
||||
location: 'tari'
|
||||
name:'bearded bellbird',
|
||||
country: 'Venezuela',
|
||||
};
|
||||
|
||||
xeno_canto.search(query, function(self){
|
||||
test.ok(!!self);
|
||||
test.equal(typeof(self), 'object');
|
||||
test.equal(typeof(self.entity), 'object');
|
||||
test.equal(self.entity.numRecordings, 3);
|
||||
test.equal(self.entity.numRecordings, 27);
|
||||
test.done();
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue