microsoft / microsoft/azure-devops-go-api

Cannot create a gallery client

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
223
Forks
92
PR merge metrics
No merged PRs in 30d

Description

I am trying to create gallery client using following code:

package main
import (
	"context"
	"fmt"
	"github.com/microsoft/azure-devops-go-api/azuredevops"
	"github.com/microsoft/azure-devops-go-api/azuredevops/gallery"
)
func main() {
	organizationUrl := "https://dev.azure.com/organization" // todo: replace value with your organization url
	personalAccessToken := "pat"                            // todo: replace value with your PAT
	connection := azuredevops.NewPatConnection(organizationUrl, personalAccessToken)
	ctx := context.Background()
	galleryClient, err := gallery.NewClient(ctx, connection)
	if err != nil {
		fmt.Println(err)
	}
	extensionName := "1123"
	publisherName := "asdasd"
	galleryData, _ := galleryClient.GetExtension(ctx, gallery.GetExtensionArgs{ExtensionName: &extensionName, PublisherName: &publisherName})
	fmt.Println(galleryData.DisplayName)
}

However, I receive following error message:
API resource area Id 69d21c00-f135-441b-b5ce-3626378e0819 is not registered on https://dev.azure.com/organization.

I went through documentation and couldn't find details about this issue.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the gallery.NewClient call shown in the issue and trace how it handles the API resource area error. Check the Azure DevOps organization URL and PAT assumptions against the Gallery API requirements. Done means the client can be created and GetExtension returns the requested extension without this error.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.