async def test_get_playlist(self): async with kuwo.KuWo() as client: resp = await client.get_playlist('1085247459') self.assertIsNotNone(resp)
async def test_get_song_lyric(self): async with kuwo.KuWo() as client: resp = await client.get_song_lyric('76323299') self.assertIsNotNone(resp)
async def test_get_artist(self): async with kuwo.KuWo() as client: resp = await client.get_artist('336') self.assertIsNotNone(resp)
async def test_get_album(self): async with kuwo.KuWo() as client: resp = await client.get_album('10685968') self.assertIsNotNone(resp)
async def test_search_songs(self): async with kuwo.KuWo() as client: resp = await client.search_songs('周杰伦') self.assertIsNotNone(resp)
async def get_playlist_from_kuwo(request: web.Request): return await get_playlist(kuwo.KuWo(), request.match_info['playlist_id'])
async def get_album_from_kuwo(request: web.Request): return await get_album(kuwo.KuWo(), request.match_info['album_id'])
async def get_song_from_kuwo(request: web.Request): return await get_song(kuwo.KuWo(), request.match_info['song_id'])
async def search_songs_from_kuwo(request: web.Request): return await search_songs(kuwo.KuWo(), request.match_info['keyword'])