microsoft / microsoft/azure-devops-go-api
How to page through memberentitlementmanagement SearchUserEntitlements() results?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 223
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
Does anyone have any examples of how to page through memberentitlementmanagement SearchUserEntitlements() results? According to the docs a ContinuationToken should be used for paging, but that's not exposed in return value that I can see. I originally posted a thread here and was redirected to the github issues for this project. Thanks!
package main
import (
"context"
"os"
"github.com/microsoft/azure-devops-go-api/azuredevops/v7"
"github.com/microsoft/azure-devops-go-api/azuredevops/v7/memberentitlementmanagement"
)
func main() {
org := os.Getenv("AZURE_DEVOPS_ORGANIZATION_URL")
pat := os.Getenv("AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN")
// Initialize the client
connection := azuredevops.NewPatConnection(org, pat)
client, _ := memberentitlementmanagement.NewClient(context.Background(), connection)
// Create search args
options := memberentitlementmanagement.SearchUserEntitlementsArgs{ContinuationToken: nil}
// Get the current page of results
response, _ := client.SearchUserEntitlements(context.Background(), options)
// This is an invalid parameter. Where can I get it?
if response.ContinuationToken != nil {
// we have all responses
} else {
// need to get the next page
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Go example and the memberentitlementmanagement.SearchUserEntitlements entry point, then inspect the SearchUserEntitlementsArgs and returned response types. Verify whether a continuation token is exposed and whether repeated calls can page through results; done means documenting the supported paging path or precisely identifying the missing SDK value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100