Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

7digital-api

Package Overview
Dependencies
Maintainers
0
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

7digital-api

Simple 7digital API wrapper for nodeJS

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
308
increased by93.71%
Maintainers
0
Weekly downloads
 
Created
Source

Node.js API Wrapper

7digital

WHAT IS THIS?

It is:

  • A library for wrapping 3rd party RESTful APIs based on a JSON schema file in nodejs.
  • A serverside javascript wrapper round the 7digital API

INSTALLATION

The easiest way to use this wrapper is to install it via npm

npm install 7digital-api

or globally

sudo npm install -g 7digital-api 

If you have a clean checkout of the code, you must update the git submodules before installing:

git submodule update --init --recursive

Then you can install via npm as usual (for npm >=1.0)

npm install  ../path/to/checkout

USAGE

See the examples folder for examples of how to use this. If you have included 7digital-api in your dependencies in the package.json file, you can use the like so:

var api = require('7digital-api'),
    artists = new api.Artists();

artists.getReleases({ artistid: 1 }, function(err, data) {
    console.dir(data);
});

If you need to supply your own config, you do so like this:

var	api, artists;

api = require('7digital-api').with({
    oauthkey: 'MY_KEY_HERE',
    oauthsecret: 'MY_SECRET_HERE',
});

artists = new api.Artists()

artists.getReleases({ artistid: 1 }, function(err, data) {
    console.dir(data);
});	

WHAT DOES THIS SUPPORT?

The 7digital wrapper currently only supports the portions of the API which do not require OAUTH authentication.

To run the tests:

cd spec && node specs.js

To run the json proxy and API explorer:

node server.js
curl http://localhost:3000/artist/details?artistid=1

Please note, This has only really been tested with recent versions of node (>=0.3.1). If you have problems with older versions of node, please try upgrading. You may want to try n if you want to manage multiple versions of node.

Keywords

FAQs

Package last updated on 30 Jun 2011

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