Skip to content

Commit 29b76c4

Browse files
committed
improve examples
1 parent 7cb5be0 commit 29b76c4

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

synapseclient/models/schema_organization.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ def get(self, synapse_client: Optional["Synapse"] = None) -> "SchemaOrganization
6060
syn = Synapse()
6161
syn.login()
6262
63-
org = SchemaOrganization("my.org.name")
63+
org = SchemaOrganization("dpetest")
6464
org.get()
65+
print(org)
6566
```
6667
6768
"""
@@ -91,6 +92,7 @@ def store(self, synapse_client: Optional["Synapse"] = None) -> "SchemaOrganizati
9192
9293
org = SchemaOrganization("my.org.name")
9394
org.store()
95+
print(org)
9496
```
9597
9698
"""
@@ -211,11 +213,10 @@ def update_acl(
211213
syn.login()
212214
213215
org = SchemaOrganization("my.org.name")
214-
current acl = org.get_acl()
215-
resource_access = current_acl["resourceAccess"]
216-
resource_access.append({"principalId": 1, "accessType": ["READ"]})
217-
etag = current_acl["etag"]
218-
org.update_acl(resource_access, etag)
216+
org.update_acl_async(
217+
principal_id=1,
218+
access_type=["READ"]
219+
)
219220
```
220221
"""
221222
return None
@@ -569,6 +570,7 @@ def get(self, synapse_client: Optional["Synapse"] = None) -> "JSONSchema":
569570
570571
js = JSONSchema("my.schema.name", "my.org.name")
571572
js.get()
573+
print(js)
572574
```
573575
"""
574576
return self
@@ -606,6 +608,7 @@ def store(
606608
607609
org = SchemaOrganization("my.org.name")
608610
org.store()
611+
print(org)
609612
```
610613
"""
611614
return self
@@ -694,8 +697,10 @@ def get_body(
694697
js = JSONSchema("my.schema.name", "my.org.name")
695698
# Get latest version
696699
latest = js.get_body()
700+
print(latest)
697701
# Get specific version
698702
first = js.get_body("0.0.1")
703+
print(first)
699704
```
700705
"""
701706
return {}

0 commit comments

Comments
 (0)