Skip to content

Commit

Permalink
Modified the example code
Browse files Browse the repository at this point in the history
The example code was not running. Modified the code to fix the error faced previously

More reference here:  microsoft#494
  • Loading branch information
Ddhruv-IOT committed Apr 15, 2024
1 parent 2cd2d0f commit 8069077
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,11 @@ core_client = connection.clients.get_core_client()

# 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
for project in get_projects_response:
pprint.pprint("[" + str(index) + "] " + project.name)
index += 1
```

## API documentation
Expand Down

0 comments on commit 8069077

Please sign in to comment.