(self, info: PageInfo)
| 200 | return httpx.QueryParams(cast(Any, self._options.params)).merge(url.params) |
| 201 | |
| 202 | def _info_to_options(self, info: PageInfo) -> FinalRequestOptions: |
| 203 | options = model_copy(self._options) |
| 204 | options._strip_raw_response_header() |
| 205 | |
| 206 | if not isinstance(info.params, NotGiven): |
| 207 | options.params = {**options.params, **info.params} |
| 208 | return options |
| 209 | |
| 210 | if not isinstance(info.url, NotGiven): |
| 211 | params = self._params_from_url(info.url) |
| 212 | url = info.url.copy_with(params=params) |
| 213 | options.params = dict(url.params) |
| 214 | options.url = str(url) |
| 215 | return options |
| 216 | |
| 217 | if not isinstance(info.json, NotGiven): |
| 218 | if not is_mapping(info.json): |
| 219 | raise TypeError(class="st">"Pagination is only supported with mappings") |
| 220 | |
| 221 | if not options.json_data: |
| 222 | options.json_data = {**info.json} |
| 223 | else: |
| 224 | if not is_mapping(options.json_data): |
| 225 | raise TypeError(class="st">"Pagination is only supported with mappings") |
| 226 | |
| 227 | options.json_data = {**options.json_data, **info.json} |
| 228 | return options |
| 229 | |
| 230 | raise ValueError(class="st">"Unexpected PageInfo state") |
| 231 | |
| 232 | |
| 233 | class BaseSyncPage(BasePage[_T], Generic[_T]): |
no test coverage detected