# hackerfire

> A node module to wrap around the Hacker News Firebase API

Latest version **0.2.0** (published 2014-10-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install hackerfire
pnpm add hackerfire
yarn add hackerfire
bun add hackerfire
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2014-10-12 |
| First published | 2014-10-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Mike Wilcox |
| Maintainers | mikedub |
| Keywords | hn, hackernews, firebase |

## Links

- npm: https://www.npmjs.com/package/hackerfire
- Repository: https://github.com/mjw56/hackerfire
- Issues: https://github.com/mjw56/hackerfire/issues
- npm.io page: https://npm.io/package/hackerfire

## Dependencies (1)

- [firebase](https://npm.io/package/firebase.md) ^1.1.1

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 0.2.0 (latest) — 2014-10-12
- 0.1.0 — 2014-10-12

## README

hackerfire
==========

Simple Node module for the Hacker News Firebase API

### Installation:

```sh
npm install hackerfire
```

### Usage:

Get Top Stories:

```sh
var hackerfire = require('hackerfire');

hackerfire.getTopStories().then(function(response) {
  console.log(response);
});
```
Get User:

```sh
var user = hackerfire.getUserById('pg');

user.on('value', function(response) {
  console.log(response.val());
}, function(error) {
  console.log('retrieval failed: ' + error.code);
});

var users = hackerfire.getUserById([ 'pg', 'foobar' ]);

for(var i = 0; i < users.length; i++) {
  users[i].on('value', function(response) {
    console.log(response.val());
  }, function(error) {
    console.log('retrieval failed: ' + error.code);
  });
}

```

Get Item:

```sh
var item = hackerfire.getItem( '8265435' );

for(var i = 0; i < item.length; i++) {
  item.on('value', function(response) {
    console.log(response.val());
  }, function(error) {
    console.log('retrieval failed: ' + error.code);
  });
}

var items = hackerfire.getItem([ '8265435', '8168423' ]);

for(var i = 0; i < items.length; i++) {
  items.on('value', function(response) {
    console.log(response.val());
  }, function(error) {
    console.log('retrieval failed: ' + error.code);
  });
}

```

For more information on how firebase works for retrieving data, check out their docs:
https://www.firebase.com/docs/web/guide/retrieving-data.html

## Tests

```sh
npm install

gulp tests

```

## Issues
[Issues](https://github.com/mjw56/hackerfire/issues)

## License
[MIT License](https://raw.githubusercontent.com/mjw56/hackerfire/master/LICENSE)

---
_Source: https://npm.io/package/hackerfire · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
