An open API service indexing awesome lists of open source software.

https://github.com/elsehow/kefir-periodic-get

periodically poll a URL, and get a kefir stream of responses.
https://github.com/elsehow/kefir-periodic-get

Last synced: over 1 year ago
JSON representation

periodically poll a URL, and get a kefir stream of responses.

Awesome Lists containing this project

README

          

# kefir-periodic-get

periodically poll a URL, and get a kefir stream of responses.

works in node and the browser!

## installation

`npm install kefir-periodic-get`

## usage

poll for recent changes on wikipedia:

```javascript
var kefir-periodic-get = require('timesink')

var wikiRecentlyChanged = 'https://en.wikipedia.org/wiki/Special:RecentChanges'

var syncedTimes = kefir-periodic-get(wikiRecentlyChanged, 1000).skipDuplicates()
```

this will issue a GET to the `wikiRecentlyChanged` every 1000ms.

## api

`kefir-periodic-get(url, interval)`

issues a GET request to `url` every `interval` ms.

returns a kefir stream of responses.