Coder Social home page Coder Social logo

Comments (14)

tedchamb avatar tedchamb commented on May 10, 2024 3

Thank you. The client code generator needs to be updated to fix this method.

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

Our http client code generator does not support this feature yet. We will get to it soon.

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

@eyalag ,
The general issue should have been addressed in 0.1.21. Which version are you using? Also what method is not working?

Thanks,
Ted

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

@eyalag , i am going to close this for now. If you are still having issues on version 0.1.21+, let me know and I will reopen this. Also let us know which method is not working for you.

from azure-devops-python-api.

phclark avatar phclark commented on May 10, 2024

I'm having issues on version 1.22. Please reopen this ticket, as this bug makes retrieving large lists impossible.

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

@phclark Can you provide more details? Which method are you having problems with?

from azure-devops-python-api.

phclark avatar phclark commented on May 10, 2024

Sure, a basic example of what I'm trying to do:

build_client = azure_devops_connection.clients.get_build_client()
builds = build_client.get_builds(project='Apps', top=500)
print(type(builds)) # Returns list
for b in builds:
    print(b) # Prints raw builds

There seems to be no way of retrieving a continuation token, which is returned as expected from the equivalent REST API call.

from azure-devops-python-api.

RolfJordi avatar RolfJordi commented on May 10, 2024

i have the same issue with the method get_projects from core client. There is no way to retrieve the continuation token.

core_client = azure_devops_connection.clients.get_core_client()
projects = core_client.get_projects(top=10)
print(type(projects)) # Returns list
for p in projects:
    print(p) # Prints raw project

from azure-devops-python-api.

phclark avatar phclark commented on May 10, 2024

Interestingly, I'm also having issues with getting continuationTokens to work when using the raw REST API. When I make a GET request like,

https://{workspace}.visualstudio.com/{project}/_apis/build/builds?%top=100&api-version=5.0

The token, returned in the header field x-ms-continuationtoken does not vary when the returned continuationToken is included in the next request.
Has anyone else experienced this?

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

@phclark Can you try the $top instead of %top, and see if you get the behavior you are expecting.

https://{workspace}.visualstudio.com/{project}/_apis/build/builds?$top=100&api-version=5.0

from azure-devops-python-api.

phclark avatar phclark commented on May 10, 2024

Sorry, that was a typo. I am using $top.
For example, the subsequent calls, with urlencode, resolve to
.../_apis/build/builds?%24top=1000&continuationtoken=2017-12-05T20%3A35%3A46.9163266Z&api-version=5.0

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

Duplicate to MicrosoftDocs/vsts-rest-api-specs#178, which sounds like it has been fixed in the service.

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

reopening for the broader ContinuatuonToken issue, which should be fixed soon.

from azure-devops-python-api.

tedchamb avatar tedchamb commented on May 10, 2024

Fixed in #258
https://github.com/microsoft/azure-devops-python-api/releases/tag/5.1.0b3

Continuation Token example:

get_builds_response = build_client.get_builds(project=project_name)
index = 0
while get_builds_response is not None:
    for build in get_builds_response.value:
        pprint.pprint("[" + str(index) + "] " + build.build_number)
        index += 1
    if get_builds_response.continuation_token is not None and get_builds_response.continuation_token != "":
        get_builds_response = build_client.get_builds(project=project_name, continuation_token=get_builds_response.continuation_token)
    else:
        get_builds_response = None

from azure-devops-python-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.