diff options
author | Mike Crute <mike@crute.us> | 2018-09-01 04:03:32 +0000 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2018-09-01 04:20:05 +0000 |
commit | 18b843f6fee09298ccfa3a85198f9194011b732f (patch) | |
tree | 01a80c4d157da0e015e919a9a6b7e71bafcd2251 /pandora | |
parent | 3de319435697e65a3b5d8570adc3ddaf88ee857f (diff) | |
download | pydora-18b843f6fee09298ccfa3a85198f9194011b732f.tar.bz2 pydora-18b843f6fee09298ccfa3a85198f9194011b732f.tar.xz pydora-18b843f6fee09298ccfa3a85198f9194011b732f.zip |
create_station returns a Station model
related: #57
Diffstat (limited to 'pandora')
-rw-r--r-- | pandora/client.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pandora/client.py b/pandora/client.py index 0eaa977..01b7654 100644 --- a/pandora/client.py +++ b/pandora/client.py | |||
@@ -199,6 +199,8 @@ class APIClient(BaseAPIClient): | |||
199 | 199 | ||
200 | def create_station(self, search_token=None, artist_token=None, | 200 | def create_station(self, search_token=None, artist_token=None, |
201 | track_token=None): | 201 | track_token=None): |
202 | from .models.pandora import Station | ||
203 | |||
202 | kwargs = {} | 204 | kwargs = {} |
203 | 205 | ||
204 | if search_token: | 206 | if search_token: |
@@ -210,7 +212,8 @@ class APIClient(BaseAPIClient): | |||
210 | else: | 212 | else: |
211 | raise KeyError("Must pass a type of token") | 213 | raise KeyError("Must pass a type of token") |
212 | 214 | ||
213 | return self("station.createStation", **kwargs) | 215 | return Station.from_json(self, |
216 | self("station.createStation", **kwargs)) | ||
214 | 217 | ||
215 | def delete_feedback(self, feedback_id): # pragma: no cover | 218 | def delete_feedback(self, feedback_id): # pragma: no cover |
216 | return self("station.deleteFeedback", | 219 | return self("station.deleteFeedback", |