Exemple #1
0
    def get_artist_detail(self, artist_id):
        data = self.ne.artist_infos(artist_id)
        for i, track in enumerate(data['hotSongs']):
            data['hotSongs'][i] = access_music(track)

        for each_key in data['artist']:
            data[each_key] = data['artist'][each_key]

        model = ArtistDetailModel(data).get_model()
        return model
Exemple #2
0
    def get_artist_detail(self, artist_id):
        data = self.ne.artist_infos(artist_id)
        if not self.is_response_avaible(data):
            return data

        for i, track in enumerate(data['hotSongs']):
            data['hotSongs'][i] = self.access_music(track)

        for each_key in data['artist']:
            data[each_key] = data['artist'][each_key]

        model = ArtistDetailModel(data).get_dict()
        return model