@@ -39,9 +39,9 @@ async def post_wiki_page(
39
39
40
40
async def get_wiki_page (
41
41
owner_id : str ,
42
- * ,
43
42
wiki_id : Optional [str ] = None ,
44
43
wiki_version : Optional [int ] = None ,
44
+ * ,
45
45
synapse_client : Optional ["Synapse" ] = None ,
46
46
) -> Dict [str , Any ]:
47
47
"""Get a wiki page.
@@ -242,8 +242,8 @@ async def get_wiki_history(
242
242
async def get_attachment_handles (
243
243
owner_id : str ,
244
244
wiki_id : str ,
245
- * ,
246
245
wiki_version : Optional [int ] = None ,
246
+ * ,
247
247
synapse_client : Optional ["Synapse" ] = None ,
248
248
) -> List [Dict [str , Any ]]:
249
249
"""Get the file handles of all attachments on a wiki page.
@@ -279,9 +279,8 @@ async def get_attachment_url(
279
279
owner_id : str ,
280
280
wiki_id : str ,
281
281
file_name : str ,
282
- * ,
283
- redirect : Optional [bool ] = False ,
284
282
wiki_version : Optional [int ] = None ,
283
+ * ,
285
284
synapse_client : Optional ["Synapse" ] = None ,
286
285
) -> Dict [str , Any ]:
287
286
"""Get the URL of a wiki page attachment.
@@ -292,7 +291,6 @@ async def get_attachment_url(
292
291
wiki_id: The ID of the wiki.
293
292
file_name: The name of the file to get.
294
293
The file names can be found in the FileHandles from the GET /entity/{ownerId}/wiki/{wikiId}/attachmenthandles method.
295
- redirect: When set to false, the URL will be returned as text/plain instead of redirecting. Default is False.
296
294
wiki_version: Optional version of the wiki page.
297
295
synapse_client: If not passed in and caching was not disabled by
298
296
`Synapse.allow_client_caching(False)` this will use the last created
@@ -305,13 +303,11 @@ async def get_attachment_url(
305
303
306
304
client = Synapse .get_client (synapse_client = synapse_client )
307
305
308
- # Add version and redirect as a query parameter if provided
306
+ # Add version as a query parameter if provided
309
307
params = {}
310
308
params ["fileName" ] = file_name
311
309
if wiki_version is not None :
312
310
params ["wikiVersion" ] = wiki_version
313
- if redirect is not None :
314
- params ["redirect" ] = redirect
315
311
316
312
return await client .rest_get_async (
317
313
uri = f"/entity/{ owner_id } /wiki2/{ wiki_id } /attachment" ,
@@ -323,7 +319,6 @@ async def get_attachment_preview_url(
323
319
owner_id : str ,
324
320
wiki_id : str ,
325
321
file_name : str ,
326
- redirect : Optional [bool ] = False ,
327
322
wiki_version : Optional [int ] = None ,
328
323
* ,
329
324
synapse_client : Optional ["Synapse" ] = None ,
@@ -336,7 +331,6 @@ async def get_attachment_preview_url(
336
331
wiki_id: The ID of the wiki.
337
332
file_name: The name of the file to get.
338
333
The file names can be found in the FileHandles from the GET /entity/{ownerId}/wiki/{wikiId}/attachmenthandles method.
339
- redirect: When set to false, the URL will be returned as text/plain instead of redirecting. Default is False.
340
334
wiki_version: Optional version of the wiki page.
341
335
synapse_client: If not passed in and caching was not disabled by
342
336
`Synapse.allow_client_caching(False)` this will use the last created
@@ -349,11 +343,9 @@ async def get_attachment_preview_url(
349
343
350
344
client = Synapse .get_client (synapse_client = synapse_client )
351
345
352
- # Add version and redirect as a query parameter if provided
346
+ # Add version as a query parameter if provided
353
347
params = {}
354
348
params ["fileName" ] = file_name
355
- if redirect is not None :
356
- params ["redirect" ] = redirect
357
349
if wiki_version is not None :
358
350
params ["wikiVersion" ] = wiki_version
359
351
@@ -366,7 +358,6 @@ async def get_attachment_preview_url(
366
358
async def get_markdown_url (
367
359
owner_id : str ,
368
360
wiki_id : str ,
369
- redirect : Optional [bool ] = False ,
370
361
wiki_version : Optional [int ] = None ,
371
362
* ,
372
363
synapse_client : Optional ["Synapse" ] = None ,
@@ -377,7 +368,6 @@ async def get_markdown_url(
377
368
Arguments:
378
369
owner_id: The ID of the owner entity.
379
370
wiki_id: The ID of the wiki.
380
- redirect: When set to false, the URL will be returned as text/plain instead of redirecting. Default is False.
381
371
wiki_version: Optional version of the wiki page.
382
372
synapse_client: If not passed in and caching was not disabled by
383
373
`Synapse.allow_client_caching(False)` this will use the last created
@@ -390,10 +380,8 @@ async def get_markdown_url(
390
380
391
381
client = Synapse .get_client (synapse_client = synapse_client )
392
382
393
- # Add version and redirect as a query parameter if provided
383
+ # Add version as a query parameter if provided
394
384
params = {}
395
- if redirect is not None :
396
- params ["redirect" ] = redirect
397
385
if wiki_version is not None :
398
386
params ["wikiVersion" ] = wiki_version
399
387
0 commit comments