Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 5c41b28

Browse files
Fix
1 parent 7db068d commit 5c41b28

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

openrobot/api_wrapper/_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ async def lyrics(self, query: str) -> LyricResult:
8585
js = await self._request('GET', f'/api/lyrics/{quote(query)}')
8686
return LyricResult(js)
8787

88-
async def celebrity(self, url: str) -> CelebrityResult:
88+
async def celebrity(self, url: str) -> typing.List[CelebrityResult]:
8989
js = await self._request('GET', '/api/celebrity', params={'url': url})
90-
return CelebrityResult(js)
90+
return [CelebrityResult(data) for data in js]
9191

9292
async def ocr(self, *, url: str = None, fp: io.BytesIO = None) -> OCRResult:
9393
if not url and not fp:

openrobot/api_wrapper/_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ def lyrics(self, query: str) -> LyricResult:
8383
js = self._request('GET', f'/api/lyrics/{quote(query)}')
8484
return LyricResult(js)
8585

86-
def celebrity(self, url: str) -> CelebrityResult:
86+
def celebrity(self, url: str) -> typing.List[CelebrityResult]:
8787
js = self._request('GET', '/api/celebrity', params={'url': url})
88-
return CelebrityResult(js)
88+
return [CelebrityResult(data) for data in js]
8989

9090
def ocr(self, *, url: str = None, fp: io.BytesIO = None) -> OCRResult:
9191
if not url and not fp:

0 commit comments

Comments
 (0)