From 8c20718ff3d670eb711981f10a1b108915b13d09 Mon Sep 17 00:00:00 2001 From: Ovyerus Date: Tue, 24 Oct 2017 17:59:50 +1100 Subject: [PATCH] 1.4.0 --- API.md | 24 +++++++++++++----------- package.json | 5 +---- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/API.md b/API.md index e1883997..18842993 100644 --- a/API.md +++ b/API.md @@ -12,18 +12,18 @@ Query handler for SauceNAO. | --- | --- | --- | | key | String | API key | | numRes | Number | Amount of responses returned from the API. | +| dbMask | Number | Bit mask for selecting specific indexes to ENABLE. | +| dbMaskI | Number | Bit mask for selecting specific indexes to DISABLE. | | shortLimiter | Ratelimiter | Ratelimiter object that takes care of the short period, usually 30 seconds. | | longLimiter | Ratelimiter | Ratelimiter object that takes care of the long period, usually 24 hours. | -| dbMask | ``Number`` | dbMask Mask for selecting specific indexes to ENABLE. dbmask=8191 will search all of the first 14 indexes. If intending to search all databases, the db=999 option is more appropriate.| -| dbMaskI | ``Number`` | dbMaskI Mask for selecting specific indexes to DISABLE. dbmaski=8191 would search only indexes higher than the first 14. This is ideal when attempting to disable only certain indexes, while allowing future indexes to be included by default.| -| testMode | ``Number`` | Causes each index which has a match to output at most 1 for testing. Works best with a numres greater than the number of indexes searched. | - * [Handler](#Handler) * [new Handler(key, [options])](#new_Handler_new) - * [.getSauce(file)](#Handler+getSauce) ⇒ Promise.<Array.<Object>> - * [.getSource(file)](#Handler+getSource) ⇒ Promise.<Array.<Object>> + * _instance_ + * [.getSauce(file)](#Handler+getSauce) ⇒ Promise.<Array.<Object>> + * _static_ + * [.getSauce(file)](#Handler.getSauce) ⇒ Promise.<Array.<Object>> @@ -35,6 +35,9 @@ Query handler for SauceNAO. | [options] | Object | | Optional options | | [options.numRes] | Number | 5 | Number of results to get from SauceNAO. | | [options.getRating] | Boolean | false | Whether to retrieve the rating of a source or not. | +| [options.testMode] | Boolean | false | Whether to enable "test mode", which causes each index that has a match to output 1 result at most. | +| [options.dbMask] | Array.<Number> | | Array of all the indexes to ENABLE results for. | +| [options.dbMaskI] | Array.<Number> | | Array of all the indexes to DISABLE results for. | @@ -52,14 +55,13 @@ Searches for potential sources of an image. ```js client.getSauce('http://cfile29.uf.tistory.com/image/277D9B3453F9D9283659F4').then(console.log); ``` - + -### handler.getSource(file) ⇒ Promise.<Array.<Object>> -An alias of Sagiri#getSauce +### Handler.getSauce(file) ⇒ Promise.<Array.<Object>> +An alias of Handler#getSauce, for those who are more mentally sane. -**Kind**: instance method of [Handler](#Handler) +**Kind**: static method of [Handler](#Handler) **Returns**: Promise.<Array.<Object>> - An array of all the results from the API, with parsed data. -**See**: Sagiri#getSauce | Param | Type | Description | | --- | --- | --- | diff --git a/package.json b/package.json index a533f8ee..000b395e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sagiri", - "version": "1.3.1", + "version": "1.4.0", "description": "A simple, lightweight and actually good JS wrapper for the SauceNAO API.", "main": "index.js", "repository": { @@ -29,8 +29,5 @@ }, "devDependencies": { "eslint": "^4.7.2" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" } }