Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnnythetank/angular-bandsintown-api-factory
AngularJS factory for Bandsintown JSON REST API requests
https://github.com/johnnythetank/angular-bandsintown-api-factory
angular angular-factory angularjs api bandsintown bandsintown-api events factory music
Last synced: 30 days ago
JSON representation
AngularJS factory for Bandsintown JSON REST API requests
- Host: GitHub
- URL: https://github.com/johnnythetank/angular-bandsintown-api-factory
- Owner: JohnnyTheTank
- License: mit
- Created: 2015-12-29T23:20:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-01T08:11:04.000Z (about 8 years ago)
- Last Synced: 2024-10-14T04:41:23.259Z (30 days ago)
- Topics: angular, angular-factory, angularjs, api, bandsintown, bandsintown-api, events, factory, music
- Language: JavaScript
- Size: 10.7 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**angular-bandsintown-api-factory** is an angularjs module with a bandsintown v2 api factory.
[![npm version](https://badge.fury.io/js/angular-bandsintown-api-factory.svg)](https://badge.fury.io/js/angular-bandsintown-api-factory)
[![Bower version](https://badge.fury.io/bo/angular-bandsintown-api-factory.svg)](https://badge.fury.io/bo/angular-bandsintown-api-factory)Author: Jonathan Hornung ([JohnnyTheTank](https://github.com/JohnnyTheTank))
## Usage
1. Install via either [bower](http://bower.io/), [npm](https://www.npmjs.com/) or downloaded files:
1. `bower install --save angular-bandsintown-api-factory`
2. `npm install --save angular-bandsintown-api-factory`
3. download [angular-bandsintown-api-factory.zip](https://github.com/JohnnyTheTank/angular-bandsintown-api-factory/zipball/master)2. Include dependencies in your HTML.
1. When using bower:
```html
```
2. When using npm:
```html
```
3. when using downloaded files
```html
```
3. Add **`jtt_bandsintown`** to your application's module dependencies.
4. Use the factory `bandsintownFactory`### factory methods
#### getArtist
Get all parameters [here](http://bandsintown.com/api/requests#artists-get)
```js
// all parameters: http://bandsintown.com/api/requests#artists-get
bandsintownFactory.getArtist({
artist:"", // ? and / characters must be double escaped. Artists such as "AC/DC" will end up as "AC%252FDC"
artist_id:"", // (optional) fallback: mbid_ (MusicBrainz ID), fbid_ (Facebook Page ID)
app_id:"", //The application ID can be anything, but should be a word that describes your application or company.
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```#### getEvents
Get all parameters [here](http://bandsintown.com/api/requests#artists-events)
```js
// all parameters: http://bandsintown.com/api/requests#artists-events
bandsintownFactory.getEventsFromArtist({
artist:"", // ? and / characters must be double escaped. Artists such as "AC/DC" will end up as "AC%252FDC"
artist_id:"", // (optional) fallback: mbid_ (MusicBrainz ID), fbid_ (Facebook Page ID)
date:"", // (optional) (default: upcoming) yyyy-mm-dd || yyyy-mm-dd,yyyy-mm-dd (inclusive range) || upcoming || all
app_id:"", //The application ID can be anything, but should be a word that describes your application or company.
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```Get all parameters [here](http://bandsintown.com/api/requests#artists-event-search)
```js
// all parameters: http://bandsintown.com/api/requests#artists-event-search
bandsintownFactory.getEventsFromArtistByLocation({
artist:"", // ? and / characters must be double escaped. Artists such as "AC/DC" will end up as "AC%252FDC"
artist_id:"", // (optional) fallback: mbid_ (MusicBrainz ID), fbid_ (Facebook Page ID)
date:"", // (optional) (default: upcoming) yyyy-mm-dd || yyyy-mm-dd,yyyy-mm-dd (inclusive range) || upcoming || all
location:"", // city,state (US or CA) || city,country || lat,lon || ip address
radius:", // (optional) (default: 25) in miles. valid values: 0-150
app_id:"", //The application ID can be anything, but should be a word that describes your application or company.
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```Get all parameters [here](http://bandsintown.com/api/requests#artists-recommended-events)
```js
// all parameters: http://bandsintown.com/api/requests#artists-recommended-events
bandsintownFactory.getRecommendedEventsFromArtistByLocation({
artist:"", // ? and / characters must be double escaped. Artists such as "AC/DC" will end up as "AC%252FDC"
artist_id:"", // (optional) fallback: mbid_ (MusicBrainz ID), fbid_ (Facebook Page ID)
date:"", // (optional) (default: upcoming) yyyy-mm-dd || yyyy-mm-dd,yyyy-mm-dd (inclusive range) || upcoming || all
location:"", // city,state (US or CA) || city,country || lat,lon || ip address
radius:", // (optional) (default: 25) in miles. valid values: 0-150
only_recs:"", // (optional) (default: false) if true, the response will only include matching events for artists similar to the specified artist. if false, the response may also include matching events for the specified artist.
app_id:"", //The application ID can be anything, but should be a word that describes your application or company.
}).then(function (_data) {
//on success
}).catch(function (_data) {
//on error
});
```## Bandsintown V2 JSON API
Docs: http://bandsintown.com/api/requests## More angular-api-factories
**bandsintown** - [dailymotion](https://github.com/JohnnyTheTank/angular-dailymotion-api-factory) - [facebook](https://github.com/JohnnyTheTank/angular-facebook-api-factory) - [flickr](https://github.com/JohnnyTheTank/angular-flickr-api-factory) - [footballdata](https://github.com/JohnnyTheTank/angular-footballdata-api-factory) - [github](https://github.com/JohnnyTheTank/angular-github-api-factory) - [openweathermap](https://github.com/JohnnyTheTank/angular-openweathermap-api-factory) - [tumblr](https://github.com/JohnnyTheTank/angular-tumblr-api-factory) - [vimeo](https://github.com/JohnnyTheTank/angular-vimeo-api-factory) - [wikipedia](https://github.com/JohnnyTheTank/angular-wikipedia-api-factory) - [youtube](https://github.com/JohnnyTheTank/angular-youtube-api-factory)## License
MIT