It's really hard to find examples on using the azure-devops-extension-api & SDK.
I'm developing a Azure Devops Extension Hub using react and typescript and using azure-devops-extension-api with their SDK
I wan't to be able to get a list of packages by a feed in Azure Devops.
It looks like I need get a list of feeds
Then query get packages
But i'm really not sure how to do this. It doesn't look like it's implemented in either of the two API's so i guess i need to fetch them myself. I have tried using plain fetch, but looks like that's not the way to go.
I have seen something called WebApi but i'm not sure how to use it so i hope anyone in here have an answer.
Yes, until now, we does not provide any SDK and class can let you get packages info from Feed directly. But there has a work around can for you consider: use Service Endpoint.
The logic of this work around is create a service connection with your Feed URL.
Step1: Get the Feed Url:
Step2: Create a service connection by select Generic.
This method is actually creating a bridge to connect the Client and the Feed by using service endpoint.
At this time, you could access this Feed service connection by using ServiceEndpoint Rest Client API. You can check this sample.