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
*[get_embed_access_token](docs/sdks/embeds/README.md#get_embed_access_token) - Get an embed access token for the current workspace.
103
104
*[get_valid_embed_access_tokens](docs/sdks/embeds/README.md#get_valid_embed_access_tokens) - Get all valid embed access tokens for the current workspace.
104
105
*[revoke_embed_access_token](docs/sdks/embeds/README.md#revoke_embed_access_token) - Revoke an embed access EmbedToken.
105
-
<!-- End SDK Available Operations -->
106
-
107
-
108
-
109
-
<!-- Start Dev Containers -->
110
-
111
-
<!-- End Dev Containers -->
106
+
<!-- End Available Resources and Operations [operations] -->
112
107
113
108
114
109
115
-
<!-- Start Pagination -->
116
-
# Pagination
117
110
118
-
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
119
-
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
120
-
return value of `Next` is `None`, then there are no more pages to be fetched.
121
111
122
-
Here's an example of one such pagination call:
123
-
<!-- End Pagination -->
124
112
125
113
126
-
127
-
<!-- Start Error Handling -->
114
+
<!-- Start Error Handling [errors] -->
128
115
## Error Handling
129
116
130
117
Handling errors in this SDK should largely match your expectations. All operations return a response object or raise an error. If Error objects are specified in your OpenAPI Spec, the SDK will raise the appropriate Error type.
@@ -149,20 +136,19 @@ s = speakeasy.Speakeasy(
149
136
res =None
150
137
try:
151
138
res = s.validate_api_key()
152
-
153
-
except (errors.SDKError) as e:
154
-
print(e) # handle exception
155
-
139
+
except errors.SDKError as e:
140
+
print(e) # handle exception
141
+
raise(e)
156
142
157
143
if res.status_code ==200:
158
144
# handle response
159
145
pass
160
146
```
161
-
<!-- End Error Handling -->
147
+
<!-- End Error Handling [errors] -->
162
148
163
149
164
150
165
-
<!-- Start Server Selection -->
151
+
<!-- Start Server Selection [server] -->
166
152
## Server Selection
167
153
168
154
### Select Server by Name
@@ -172,6 +158,7 @@ You can override the default server globally by passing a server name to the `se
The Python SDK makes API calls using the (requests)[https://pypi.org/project/requests/] HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
0 commit comments