You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+21Lines changed: 21 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,27 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ
81
81
82
82
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
83
83
84
+
## Nested params
85
+
86
+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
87
+
88
+
```python
89
+
from arcadepy import Arcade
90
+
91
+
client = Arcade()
92
+
93
+
authorization_response = client.auth.authorize(
94
+
auth_requirement={
95
+
"id": "id",
96
+
"oauth2": {"scopes": ["string"]},
97
+
"provider_id": "provider_id",
98
+
"provider_type": "provider_type",
99
+
},
100
+
user_id="user_id",
101
+
)
102
+
print(authorization_response.auth_requirement)
103
+
```
104
+
84
105
## Handling errors
85
106
86
107
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `arcadepy.APIConnectionError` is raised.
0 commit comments