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

7digital-api

Package Overview
Dependencies
Maintainers
1
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.4.5
  • Source
  • npm
  • Socket score

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

7digital Node.js API Client

Current head build status:

Build Status

About 7digital

7digital.com is an online music store operating in over 16 countries and offering more than 11 million high quality DRM free MP3s (320kbps) from all major labels and wide range of idependent labels and distributors. 7digital API will give you access to the full catalogue including high quality album art, 30s preview clips for all tracks, commissions on sales, integrated purchasing and full length streaming. More details at developer.7digital.net

WHAT IS THIS?

A serverside javascript wrapper round the 7digital API which returns the responses parsed into JavaScript objects. Full code documentation can be found here

INSTALLATION

The easiest way to use the API client is to install it via npm

npm install 7digital-api

or globally

sudo npm install -g 7digital-api

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

npm install

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 or want XML responses, you do so like this:

var api, artists;

api = require('7digital-api').configure({
    format: 'XML',
    consumerkey: 'MY_KEY_HERE',
    consumersecret: 'MY_SECRET_HERE',
});

artists = new api.Artists();

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

See oauth.js in the examples folder for an example of how to acquire an oauth access token to access any of the protected endpoints.

The bundled OAuth module must be used in place of a standard OAuth client

require('7digital-api').oauth,

This is to ensure the tokens are correctly parsed from the XML response.

See developer.7digital.net for full details of the API endpoints and the parameters they accept.

To run the tests:

npm test

Keywords

FAQs

Package last updated on 28 Aug 2013

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