I need to get an instance of the GitRestClient in my extension (Custom Work Item Control).
When I was using the "old" extension SDK I did the following:
import * as GitRestClient from "TFS/VersionControl/GitRestClient";
private gitClient: GitRestClient.GitHttpClient4_1;
this.gitClient = GitRestClient.getClient();
But I'm currently using the new SDK and want to stay on it. the getClient() method does not exist on the GitRestClient.
I'm importing the types as follows:
import {
GitRestClient,
GitVersionDescriptor,
GitVersionOptions,
GitVersionType,
VersionControlRecursionType,
} from "azure-devops-extension-api/Git";
But how do I get an instance of the GitRest Client?
I can see that there's a getClient in azure-devops-extension-api but it requires a RestClientFactory and it looks there's a default which calls the constructor with IVssRestClientOptions which would need to be passed.
As I said I would like to obtain an instance of the GitRestClient in my custom control to call some GitAPI's.
I need to get an instance of the GitRestClient in my extension (Custom Work Item Control). When I was using the "old" extension SDK I did the following:
import * as GitRestClient from "TFS/VersionControl/GitRestClient"; private gitClient: GitRestClient.GitHttpClient4_1; this.gitClient = GitRestClient.getClient();
But I'm currently using the new SDK and want to stay on it. the getClient() method does not exist on the GitRestClient. I'm importing the types as follows: import { GitRestClient, GitVersionDescriptor, GitVersionOptions, GitVersionType, VersionControlRecursionType, } from "azure-devops-extension-api/Git";
But how do I get an instance of the GitRest Client? I can see that there's a getClient in azure-devops-extension-api but it requires a RestClientFactory and it looks there's a default which calls the constructor with IVssRestClientOptions which would need to be passed.
As I said I would like to obtain an instance of the GitRestClient in my custom control to call some GitAPI's.
Thanks for your support. Georg