Skip to content

Commit 99cbb81

Browse files
committed
update function names
1 parent c52996f commit 99cbb81

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

synapseclient/api/wiki_service.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -193,13 +193,12 @@ async def get_wiki_header_tree(
193193

194194
client = Synapse.get_client(synapse_client=synapse_client)
195195

196-
response = client.rest_get_paginated_async(
196+
async for item in client.rest_get_paginated_async(
197197
uri=f"/entity/{owner_id}/wikiheadertree2",
198198
limit=limit,
199199
offset=offset,
200-
)
201-
202-
return response
200+
):
201+
yield item
203202

204203

205204
async def get_wiki_history(
@@ -232,12 +231,12 @@ async def get_wiki_history(
232231

233232
client = Synapse.get_client(synapse_client=synapse_client)
234233

235-
response = client.rest_get_paginated_async(
234+
async for item in client.rest_get_paginated_async(
236235
uri=f"/entity/{owner_id}/wiki2/{wiki_id}/wikihistory",
237236
limit=limit,
238237
offset=offset,
239-
)
240-
return response
238+
):
239+
yield item
241240

242241

243242
async def get_attachment_handles(
@@ -246,7 +245,7 @@ async def get_attachment_handles(
246245
*,
247246
wiki_version: Optional[int] = None,
248247
synapse_client: Optional["Synapse"] = None,
249-
) -> List[str, Any]:
248+
) -> List[Dict[str, Any]]:
250249
"""Get the file handles of all attachments on a wiki page.
251250
<https://rest-docs.synapse.org/rest/GET/entity/ownerId/wiki2/wikiId/attachmenthandles.html>
252251

0 commit comments

Comments
 (0)