New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@gradecam/restler-q

Package Overview
Dependencies
Maintainers
5
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gradecam/restler-q

Q Wrapper for Restler

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
5
Created
Source

restler-q Build Status

(C) Andrew Newdigate (@suprememoocow), Licensed under the MIT-LICENSE

An extremely simple Q promises wrapper for Don Wrong's Restler library.

Installing

npm install restler-q

Using

The interface is similar to Restler's interface:

var rest = require('restler-q');

rest.get('https://api.github.com/orgs/Troupe/repos')
  .then(function(repos) {
    assert(Array.isArray(repos));
  })
  .nodeify(done);

If you would like to gain access to the response object, do it like this

var rest = require('restler-q').spread; // Note the .spread on the end!
rest.get('https://api.github.com/orgs/Troupe/repos')
  .spread(function(repos, response) {
    // Use Q's `spread`, not `then` 
    assert(Array.isArray(repos));
  })
  .fail(function(err) {
    // err.response contains the HTTP Response
  })
  .nodeify(done);

Running the tests

npm install
make test

TODO

  • Provide ability to call abort and retry methods.

Keywords

FAQs

Package last updated on 12 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc