From b6965b3db39c1c643a5a63711056b7529136e0c6 Mon Sep 17 00:00:00 2001 From: Joseph Lombrozo Date: Sat, 11 Jan 2014 21:26:14 -0800 Subject: [PATCH 1/2] Add description to the getArtist API response --- headphones/api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/headphones/api.py b/headphones/api.py index 16a22229..e6892e82 100644 --- a/headphones/api.py +++ b/headphones/api.py @@ -123,8 +123,9 @@ class Api(object): artist = self._dic_from_query('SELECT * from artists WHERE ArtistID="' + self.id + '"') albums = self._dic_from_query('SELECT * from albums WHERE ArtistID="' + self.id + '" order by ReleaseDate DESC') + description = self._dic_from_query('SELECT * from descriptions WHERE ArtistID="' + self.id + '"') - self.data = { 'artist': artist, 'albums': albums } + self.data = { 'artist': artist, 'albums': albums, 'description' : description } return def _getAlbum(self, **kwargs): From 594dc6acaa51690eeb778c1de492a4a50e727c66 Mon Sep 17 00:00:00 2001 From: Joseph Lombrozo Date: Sat, 11 Jan 2014 21:33:17 -0800 Subject: [PATCH 2/2] Tabs to spaces. Whoops! --- headphones/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/headphones/api.py b/headphones/api.py index e6892e82..7754f3f6 100644 --- a/headphones/api.py +++ b/headphones/api.py @@ -123,7 +123,7 @@ class Api(object): artist = self._dic_from_query('SELECT * from artists WHERE ArtistID="' + self.id + '"') albums = self._dic_from_query('SELECT * from albums WHERE ArtistID="' + self.id + '" order by ReleaseDate DESC') - description = self._dic_from_query('SELECT * from descriptions WHERE ArtistID="' + self.id + '"') + description = self._dic_from_query('SELECT * from descriptions WHERE ArtistID="' + self.id + '"') self.data = { 'artist': artist, 'albums': albums, 'description' : description } return