Twingly Search API Node
A Node.js library for Twingly's Search API (previously known as Analytics API). Twingly is a blog search service that provides a searchable API known as Twingly Search API.
npm install --save twingly-search
var Client = Client;var client = ;var query = client;querysearchQuery = 'github page-size:10 lang:sv';query;
twingly-search library talks to a commercial blog search API and requires an API key. Best practice is to set the
TWINGLY_SEARCH_KEY environment variable to the obtained key.
Client can be passed a key at initialization if your setup does not allow environment variables.
The library is documented with jsdoc. To generate the documentation run
npm run doc
Example code can be found in examples/.
To learn more about the capabilities of the API, please read the Twingly Search API documentation.
To run all tests simply execute
Run with test order (per file) randomized by rocha
npm run random
To run a particular test case
npm test test/test_query
npm test -- --grep parser
Bump the version in client.js and commit.
Make sure you are logged in as twingly:
Bump the version:
npm version [<newversion> | major | minor | patch]
Example (current version is
npm version major
npm version will bump the
1.0.0, make a commit with that change, tag that commit
v1.0.0 and push the commit and tag.
Publish the latest version to the registry:
npm publish .
The MIT License (MIT)
Copyright (c) 2016 Twingly AB
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.