+ def get_toptrack(self, artist=None):
+ """Fetch artist top tracks
+ """
+ payload = self._forge_payload(artist, top=True)
+ # Construct URL
+ ressource = '{0}/song/search'.format(SimaEch.root_url)
+ ans = self._fetch(ressource, payload)
+ titles = list()
+ artist = {
+ 'artist': artist.name,
+ 'musicbrainz_artistid': artist.mbid,
+ }
+ for song in ans.get('response').get('songs'):
+ title = song.get('title')
+ if title not in titles:
+ titles.append(title)
+ yield Track(title=title, **artist)
+