proc-that-rest-extractor
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

RestExtractor

Modular extractor for proc-that. Loads items from REST APIs via http requests. Uses restler for downloading resources.

A bunch of badges

Build Status Build Status npm Coverage status license semantic-release Greenkeeper badge

Installation

npm install --save proc-that-rest-extractor

Usage

import {Etl} from 'proc-that';
import {RestExtractor} from 'proc-that-rest-extractor';

let extractor = new RestExtractor('http://my-rest-url.com/posts');

new Etl().addExtractor(extractor).start().subscribe(/*...*/);

Custom result set

If the called API delivers a masked result (i.e. a JSON object with a data property) you can pass a function into the constructor that is called on the result.

import {Etl} from 'proc-that';
import {RestExtractor, RestExtractorMethod} from 'proc-that-rest-extractor';

let extractor = new RestExtractor('http://my-rest-url.com/posts', RestExtractorMethod.Get, result => result.data);

new Etl().addExtractor(extractor).start().subscribe(/*...*/);

Package Sidebar

Install

npm i proc-that-rest-extractor

Weekly Downloads

18

Version

2.0.0

License

MIT

Unpacked Size

8.07 kB

Total Files

11

Last publish

Collaborators

  • smartive-ci
  • mfeltscher
  • petermanser
  • cbuehler
  • dwirz
  • deniaz
  • nmaro