Created
August 20, 2015 12:52
-
-
Save daviddt/ee2daa382bd4e431d54b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <reference path="../../typings/_custom.d.ts" /> | |
import { Injectable } from 'angular2/angular2'; | |
@Injectable() | |
export class Spotify { | |
url: string; | |
constructor() { | |
this.url = 'https://api.spotify.com/v1/'; | |
} | |
public searchArtist (value) { | |
return window.fetch(this.url + 'search?type=artist&q=' + value); | |
} | |
public getArtistById (id) { | |
return window.fetch(this.url + 'artists/' + id); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment