diff --git a/README.md b/README.md index 90889480..15dd1a93 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,27 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ 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`. +## Nested params + +Nested parameters are dictionaries, typed using `TypedDict`, for example: + +```python +from arcadepy import Arcade + +client = Arcade() + +authorization_response = client.auth.authorize( + auth_requirement={ + "id": "id", + "oauth2": {"scopes": ["string"]}, + "provider_id": "provider_id", + "provider_type": "provider_type", + }, + user_id="user_id", +) +print(authorization_response.auth_requirement) +``` + ## Handling errors 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.