# wikidata-changes-stream

> Represent wikidata changes API as a node stream

Latest version **0.0.1** (published 2017-11-07) · ISC license · 0 weekly downloads

## Install

```sh
npm install wikidata-changes-stream
pnpm add wikidata-changes-stream
yarn add wikidata-changes-stream
bun add wikidata-changes-stream
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-11-07 |
| First published | 2017-11-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Mapbox |
| Maintainers | yhahn |
| Keywords | wikidata |

## Links

- npm: https://www.npmjs.com/package/wikidata-changes-stream
- Repository: https://github.com/mapbox/wikidata-changes-stream
- Issues: https://github.com/mapbox/wikidata-changes-stream/issues
- npm.io page: https://npm.io/package/wikidata-changes-stream

## Dependencies (3)

- [requestretry](https://npm.io/package/requestretry.md) ^1.12.0
- [wikidata-sdk](https://npm.io/package/wikidata-sdk.md) ^4.0.6
- [parallel-stream](https://npm.io/package/parallel-stream.md) ^1.1.2

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-11-07
- 0.0.0 — 2017-11-06

## README

wikidata-changes-stream
-----------------------
Create node streams of change event objects from Wikidata's RecentChanges API.

- https://www.wikidata.org/w/api.php?action=query&list=recentchanges
- https://www.mediawiki.org/wiki/API:RecentChanges

### createChangeStream()

Create a stream of change event objects from Wikidata.

### createEntityStream()

Transform stream that requests full entities from change event objects.

### Example

Stream the last 60 seconds of changes from Wikidata.

```js
var wcs = require('wikidata-changes-stream');

var changes = wcs.createChangeStream({
    start: (+new Date)/1000 - 60,
    end: (+new Date)/1000
});

changes
    .pipe(wcs.createEntityStream())
    .on('data', function(obj) {
        console.log(JSON.stringify(obj));
    })
    .on('error', function(err) {
        console.error(err);
    });
```

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