diff --git a/README.md b/README.md index 0b8151d5..c18751c7 100644 --- a/README.md +++ b/README.md @@ -32,12 +32,19 @@ connection = Connection(base_url=organization_url, creds=credentials) # Get a client (the "core" client provides access to projects, teams, etc) core_client = connection.clients.get_core_client() -# Get the list of projects in the org -projects = core_client.get_projects() - -# Show details about each project in the console -for project in projects: - pprint.pprint(project.__dict__) +# Get the first page of projects +get_projects_response = core_client.get_projects() +index = 0 +while get_projects_response is not None: + for project in get_projects_response.value: + pprint.pprint("[" + str(index) + "] " + project.name) + index += 1 + if get_projects_response.continuation_token is not None and get_projects_response.continuation_token != "": + # Get the next page of projects + get_projects_response = core_client.get_projects(continuation_token=get_projects_response.continuation_token) + else: + # All projects have been retrieved + get_projects_response = None ``` ## API documentation diff --git a/azure-devops/azure/devops/client.py b/azure-devops/azure/devops/client.py index 29683220..61381add 100644 --- a/azure-devops/azure/devops/client.py +++ b/azure-devops/azure/devops/client.py @@ -128,8 +128,6 @@ def _create_request_message(self, http_method, location_id, route_values=None, route_values) logger.debug('Route template: %s', location.route_template) url = self._client.format_url(route_template, **route_values) - import pprint - pprint.pprint("url=" + url) request = ClientRequest(method=http_method, url=self._client.format_url(url)) if query_parameters: request.format_parameters(query_parameters) diff --git a/azure-devops/azure/devops/version.py b/azure-devops/azure/devops/version.py index 1722640a..743eacbd 100644 --- a/azure-devops/azure/devops/version.py +++ b/azure-devops/azure/devops/version.py @@ -3,4 +3,4 @@ # Licensed under the MIT License. See License.txt in the project root for license information. # -------------------------------------------------------------------------------------------- -VERSION = "5.1.0b2" +VERSION = "5.1.0b3" diff --git a/azure-devops/setup.py b/azure-devops/setup.py index f9faf30d..5d38de2e 100644 --- a/azure-devops/setup.py +++ b/azure-devops/setup.py @@ -6,7 +6,7 @@ from setuptools import setup, find_packages NAME = "azure-devops" -VERSION = "5.1.0b2" +VERSION = "5.1.0b3" # To install the library, run the following #