[Showstopper] Cannot use continuation token in API 7.0 and above (thus limiting number of results)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
Rechercherichtung
Beginne damit, die generierte Methode get_test_suites_for_plan nachzuverfolgen und ihre Verarbeitung der Antworten von v6 und v7 zu vergleichen. Untersuche, wie der Header x-ms-continuationtoken dargestellt wird, wenn die Methode eine Liste zurückgibt. Als erledigt gilt die Bestätigung eines nutzbaren continuation-token-Pfads für die betroffenen endpoints oder die Dokumentation, warum die aktuelle API ihn nicht bereitstellen kann.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi, in earlier versions of the API (until 6.0.0b4), when making a request on some items (e.g. WorkItems, Test Suites, ...), you had a response object with a value and a continuation_token that you could use to make a new request and continue parsing.
For example, here is the prototype of such function:
def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_token=None, as_tree_view=None):
"""GetTestSuitesForPlan.
[Preview API] Get test suites for plan.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan for which suites are requested.
:param str expand: Include the children suites and testers details.
:param str continuation_token: If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites.
:param bool as_tree_view: If the suites returned should be in a tree structure.
:rtype: :class:`<GetTestSuitesForPlanResponseValue>`
So you could do something like:
resp = client.get_test_suites_for_plan(project, my_plan_id)
suites = resp.value
while resp.continuation_token:
resp = client.get_test_suites_for_plan(project, my_plan_id)
suites += resp.value
With more recent versions (in particular 7.0), you now get a list returned (but with the limit of size imposed by the API).
For example, a version of similar function would be:
def get_test_suites_for_plan(self, project, plan_id, expand=None, continuation_token=None, as_tree_view=None):
"""GetTestSuitesForPlan.
[Preview API] Get test suites for plan.
:param str project: Project ID or project name
:param int plan_id: ID of the test plan for which suites are requested.
:param str expand: Include the children suites and testers details.
:param str continuation_token: If the list of suites returned is not complete, a continuation token to query next batch of suites is included in the response header as "x-ms-continuationtoken". Omit this parameter to get the first batch of test suites.
:param bool as_tree_view: If the suites returned should be in a tree structure.
:rtype: :class:`<[TestSuite]> <azure.devops.v6_0.test_plan.models.[TestSuite]>`
"""
How to retrieve the continuation token to continue parsing the other results?
- Vorherrschende Sprache
- Python
- Sterne
- 684
- Forks
- 218
- Ø Merge
- 8 T. 10 Std.
- Gemergte PRs (30 T.)
- 1
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/azure-devops-python-api
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
Alle Issues in microsoft/azure-devops-python-api
Ähnliche Issues
-
agent-ready documentation needs-triage
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
instance instance add
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
searxng/searx-instances#939 · 1 Kommentar ·
-
area-deployment area-integrations triage:bot-seen
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 86/100