survey-monkey-streams
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

🐵🚿 survey-monkey-streams Build Status

Maintainability Test Coverage Scrutinizer Code Quality SonarQube Known Vulnerabilities Greenkeeper badge

Stream the Survey Monkey API

Why?

  • Paging: We abstract away page handling, allowing you to consume data from beginning to end
  • Backpressure: We won't read faster than you can process the data, keeping memory requirements low

Installation npm version node

  npm i survey-monkey-streams

Usage

  import { Reader } from 'survey-monkey-streams';
  const reader = new Reader({
    url: `collectors/${id}/responses`,
    headers: { authorization: `bearer ${token}` }
  })
  reader.on('data', response => {
    console.log(response)
  })
  import { SurveysResponsesBulkReader } from 'survey-monkey-streams';
  const reader = new SurveysResponsesBulkReader({
    headers: { authorization: `bearer ${token}` }
  })
  reader.pipe(myDbWriter)

Check the Documentation for more information

Design Decisions

KISS

Rather than define a new API, this module chooses to expose the APIs of the underlying technologies, i.e. request and the Node.js Stream API. Common use cases are more verbose than they might otherwise be, but minimal tampering means less bugs, documentation and frustration.

Contribution Gitter Commitizen friendly Conventional Commits

Question? Bug? Feature request? Not sure? Open an issue!

See the code on GitHub

I wrote this to fix a problem I was facing, so it might need stretching to meet your needs. Notably, there is no Writable yet.

Pull requests welcome, but please get in touch first. I don't want to waste your time 😁

Maintenance

Release like:

  npm run v
  git push --follow-tags

Package Sidebar

Install

npm i survey-monkey-streams

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

23.8 kB

Total Files

13

Last publish

Collaborators

  • aaronjameslang