# dackel

> Fetches from APIs in intervals

Latest version **2.0.0** (published 2019-05-05) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-05-05 |
| First published | 2017-05-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | obi-jan-kenobi |
| Maintainers | obi-jan-kenobi |
| Keywords | ajax, polling, requests |

## Links

- npm: https://www.npmjs.com/package/dackel
- Repository: https://github.com/obi-jan-kenobi/dackel
- Homepage: https://github.com/obi-jan-kenobi/dackel#readme
- Issues: https://github.com/obi-jan-kenobi/dackel/issues
- npm.io page: https://npm.io/package/dackel

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.81.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2019-05-05
- 1.1.4 — 2017-05-04
- 1.1.3 — 2017-05-04
- 1.1.2 — 2017-05-04
- 1.1.1 — 2017-05-04
- 1.0.1 — 2017-05-03
- 1.0.0 — 2017-05-01

## README

# dackel
Fetches data from any API in intervals

[![Build Status](https://travis-ci.org/obi-jan-kenobi/dackel.svg?branch=master)](https://travis-ci.org/obi-jan-kenobi/dackel)
[![Known Vulnerabilities](https://snyk.io/test/github/obi-jan-kenobi/dackel/badge.svg)](https://snyk.io/test/github/obi-jan-kenobi/dackel)
[![codecov](https://codecov.io/gh/obi-jan-kenobi/dackel/branch/master/graph/badge.svg)](https://codecov.io/gh/obi-jan-kenobi/dackel)

## Table of contents
- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
- [Development](#development)
- [Changelog](#changelog)


## Installation

```
$ npm install --save dackel
```

```
$ yarn add dackel
```

## Usage

```JavaScript
const subscribe = require('dackel')

// logs the user-data every 10000ms to the console
const unsubscribe = subscribe('https://api.github.com/users/obi-jan-kenobi',
  {
    interval: 10000,
    headers: {
      'User-Agent': 'dackel'
    }
  },
  (err, response, user) => console.log(user))

// stops polling
unsubscribe()
```

## API

### dackel(url, options, callback) -> function

- ```url``` String (required) - url to poll
- ```options``` Object (optional) - interval in ms + request-module options
- ```callback``` Function (required) - Recieves http-response


## Development

```
$ npm test
```

## Changelog

- 1.1.0
  - Fixed exposure
- 1.0.0
  - Initial release

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