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: docs/quickstart/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Quick Start
2
2
3
-
Here are some common use cases to help you get started quickly. For more detailed usage, please refer to the [Usage](../usage/authentication.md) section.
3
+
Here are some common use cases to help you get started quickly. For more detailed usage, please refer to the [Usage](../usage/getting-started/authentication.md) section.
Copy file name to clipboardExpand all lines: docs/usage/getting-started/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ Available built-in throttlers:
177
177
178
178
### `auto_retry`
179
179
180
-
The `auto_retry` option enables request retrying when rate limit exceeded and server error encountered. See [Auto Retry](./auto-retry.md) for more infomation.
180
+
The `auto_retry` option enables request retrying when rate limit exceeded and server error encountered. See [Auto Retry](../auto-retry.md) for more infomation.
Repeatedly creating new client instances may lead to memory leaks. We recommend reusing the same client instance within a single context to avoid this issue.
Copy file name to clipboardExpand all lines: docs/usage/rest-api.md
+1-31Lines changed: 1 addition & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ If you are calling an API that requires request body parameters, you can pass th
66
66
67
67
!!! tip
68
68
69
-
By default, githubkit will validate the request body against the API schema. If you want to skip the validation, you can set the client config `rest_api_validate_body` to `False`. See [Configuration](./configuration.md#rest_api_validate_body) for more information.
69
+
By default, githubkit will validate the request body against the API schema. If you want to skip the validation, you can set the client config `rest_api_validate_body` to `False`. See [Configuration](./getting-started/configuration.md#rest_api_validate_body) for more information.
70
70
71
71
Or you can pass the json request body as a dictionary:
72
72
@@ -179,36 +179,6 @@ In some cases, you may need to pass additional headers to the API request. You c
179
179
content = resp.text
180
180
```
181
181
182
-
## Reusing Client
183
-
184
-
You can make multiple requests with the same client instance in one context:
185
-
186
-
=== "Sync"
187
-
188
-
```python hl_lines="4"
189
-
from githubkit import GitHub, Response
190
-
from githubkit.versions.latest.models import FullRepository
Repeatedly creating new client instances may lead to memory leaks. We recommend reusing the same client instance within a single context to avoid this issue.
211
-
212
182
## Data Validation
213
183
214
184
As shown above, the response data is parsed and validated by accessing the `response.parsed_data` property. This ensures that the data type returned by the API is as expected and your code is safe to use it (with static type checking). But sometimes you may want to get the raw data returned by the API, such as when the schema is not correct. You can use the `response.text` property or `response.json()` method to get the raw data. The loaded json data is also typed but not validated. For example:
0 commit comments