Angular-Bandcamp

Angular Module to access to the Bandcamp API
1 person uses it
Author: 3595807? Englar
Submitted by: 3595807?v=3 Seb-L

Angular-Bandcamp

Angular Module (service) to get infos from Bandcamp API.

Install

Include AngularJs file, angular-bandcamp.js and your app.js on your HTML file. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.15/angular.js"></script> <script src="js/angular-bandcamp.js"></script> <script src="js/app.js"></script> In you app.js include angular-bandcamp module in your app and in your controller. ``` var myApp = angular.module('myApp', ['Bandcamp']);

myApp.controller('MyCtrl', ['$scope', 'Bandcamp', function ($scope, Bandcamp) { // your controller }); And enter your API key in the config section of the angular-bandcamp.js. // CONFIG var key = 'YOUR_API_KEY'; ```

Usage

There is a fonction for each API module (more infos here : http://bandcamp.com/developer). You can take a look at the index.html file for a demo.

Basic use (in controller): Bandcamp.bandSearch('XVIII Eyes').then(function(data) { $scope.bands = data; console.log(data); });

List of functions : Bandcamp.bandSearch('NAME_OR_NAMES') // eg: Bandcamp.bandSearch('we are knives, adebisi shank') Bandcamp.bandDisco('BAND_ID_OR_IDs') Bandcamp.bandInfo('BAND_ID_OR_IDs') Bandcamp.albumInfo('ALBUM_ID') Bandcamp.trackInfo('TRACK_ID_OR_IDs) Bandcamp.urlInfo('BANDCAMP_URL')

comments powered by Disqus
This page was last updated about 3 years ago.