New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hnsearch

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hnsearch

Wrapper around HNSearch REST API

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

build status

node-hnsearch

node-hnsearch is a thin wrapper around the HNSearch REST API. Since node-hnsearch is such a thin wrapper, consulting the documentation provided by HNSearch is highly advised.

Installation

Download

$ npm install hnsearch

Require

var hnsearch = require('hnsearch');

API

hnsearch.submissions(query, cb)

hnsearch.comments(query, cb)

hnsearch.users(query, cb)

Use for querying submissions, comments, and users, respectively, against HNSearch's search API. query is the object containing the key-value pairs that the query string will be composed of. cb is the callback function that will be called when the response from HNSearch is received. It should support a (err, response) signature.

Details about the query fields and the response object can be found on the HNSearch API website.

Example

var hnsearch = require('hnsearch');

hnsearch.submissions({ q: 'javascript semicolons' }, function(err, response) {
  if (err) { process.exit(1); }

  console.log('Comments about semicolons and javascript!');
  response.results.forEach(function(result) { 
    console.log(result.item.text); 
  });
});

Testing

No tests yet! As soon as there are some though, you'll be able to run them as follows:

$ cd node-hnsearch
$ npm test

Issues

Found a bug? Create an issue on GitHub.

https://github.com/jharding/node-hnsearch/issues

Versioning

For transparency and insight into the release cycle, releases will be numbered with the follow format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backwards compatibility bumps the major
  • New additions without breaking backwards compatibility bumps the minor
  • Bug fixes and misc changes bump the patch

For more information on semantic versioning, please visit http://semver.org/.

License

Copyright (c) 2013 Jake Harding
Licensed under the MIT License.

Keywords

FAQs

Package last updated on 07 Jan 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc