Skip to content

Commit 8890e9d

Browse files
committed
add delete_async example using id
1 parent 29b76c4 commit 8890e9d

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

synapseclient/models/schema_organization.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ async def delete_async(self, synapse_client: Optional["Synapse"] = None) -> None
346346
instance from the Synapse class constructor
347347
348348
Example: Delete a SchemaOrganization
349-
 
349+
350+
Delete using a name
350351
351352
```python
352353
from synapseclient.models import SchemaOrganization
@@ -363,6 +364,23 @@ async def delete_org():
363364
364365
asyncio.run(delete_org())
365366
```
367+
368+
Delete using an id
369+
370+
```python
371+
from synapseclient.models import SchemaOrganization
372+
from synapseclient import Synapse
373+
import asyncio
374+
375+
async def delete_org():
376+
377+
syn = Synapse()
378+
syn.login()
379+
380+
org = SchemaOrganization(id=1075)
381+
await org.delete_async()
382+
383+
asyncio.run(delete_org())
366384
"""
367385
if not self.id:
368386
await self.get_async(synapse_client=synapse_client)

0 commit comments

Comments
 (0)