Skip to content
This repository was archived by the owner on Dec 27, 2018. It is now read-only.

v0.5.0

Compare
Choose a tag to compare
@emmenko emmenko released this 19 Mar 09:24
· 18 commits to master since this release

@deprecated: use version 0.5.1

  • Logger is no longer exposed in this module, instead it's available in the sphere-node-utils package

    Note that the sphere-node-connect still uses internally the logger

  • introduce PAGED request with progress subscription

    A PAGED request is an HTTP GET to one of the API query endpoints. It should be used to retrieve all results of the specified resource. It uses internally a recursive function to accumulate results in chunks.

rest = new Rest options

rest.PAGED '/products', (error, response, body) ->
  # do something

You can subscribe to progress notification by specifying a second callback

rest = new Rest options

rest.PAGED '/products', (error, response, body) ->
  # do something
, (progress) ->
  # progress is an object containing the current progress percentage
  # and the value of the current results (array)
  # {percentage: 20, value: [r1, r2, r3, ...]}