@@ -11,6 +11,21 @@ This library provides convenient access to the TrueFoundry API.
1111> - TypeScript: [ ![ Ask DeepWiki] ( https://deepwiki.com/badge.svg )] ( https://deepwiki.com/truefoundry/truefoundry-typescript-sdk )
1212
1313
14+ ## Table of Contents
15+
16+ - [ Installation] ( #installation )
17+ - [ Reference] ( #reference )
18+ - [ Usage] ( #usage )
19+ - [ Async Client] ( #async-client )
20+ - [ Exception Handling] ( #exception-handling )
21+ - [ Pagination] ( #pagination )
22+ - [ Advanced] ( #advanced )
23+ - [ Access Raw Response Data] ( #access-raw-response-data )
24+ - [ Retries] ( #retries )
25+ - [ Timeouts] ( #timeouts )
26+ - [ Custom Client] ( #custom-client )
27+ - [ Contributing] ( #contributing )
28+
1429## Installation
1530
1631``` sh
@@ -152,6 +167,15 @@ for page in response.iter_pages():
152167 yield page
153168```
154169
170+ ``` python
171+ # You can also iterate through pages and access the typed response per page
172+ pager = client.users.list(... )
173+ for page in pager.iter_pages():
174+ print (page.response) # access the typed response for each page
175+ for item in page:
176+ print (item)
177+ ```
178+
155179## Advanced
156180
157181### Access Raw Response Data
@@ -169,11 +193,11 @@ response = client.applications.with_raw_response.list(...)
169193print (response.headers) # access the response headers
170194print (response.data) # access the underlying object
171195pager = client.users.list(... )
172- print (pager.response.headers ) # access the response headers for the first page
196+ print (pager.response) # access the typed response for the first page
173197for item in pager:
174198 print (item) # access the underlying object(s)
175199for page in pager.iter_pages():
176- print (page.response.headers ) # access the response headers for each page
200+ print (page.response) # access the typed response for each page
177201 for item in page:
178202 print (item) # access the underlying object(s)
179203```
0 commit comments