| 20 | |
| 21 | |
| 22 | class AzurePaginator(Paginator): |
| 23 | def get_items(self, response) -> Optional[list[object]]: |
| 24 | return response.json['value'] |
| 25 | |
| 26 | def get_next_page_id(self, response) -> Optional[str]: |
| 27 | return response.headers.get('x-ms-continuationtoken') |
| 28 | |
| 29 | def set_next_page_param(self, request, next_page_id): |
| 30 | request.query_args['continuationToken'] = next_page_id |
| 31 | |
| 32 | |
| 33 | class AzureDevOpsAPI(API): |