protected override async Task <IEnumerable <string> > GetSuggestionsAsync(ArtifactoryCredentials credentials, IComponentConfiguration config) { using (var client = credentials.CreateClient()) using (var response = await client.GetAsync("api/build").ConfigureAwait(false)) { var builds = await this.ParseResponseAsync <BuildCollection>(response).ConfigureAwait(false); return(builds.Builds?.Select(b => b.Uri.Trim('/'))); } }
protected override async Task <IEnumerable <string> > GetSuggestionsAsync(ArtifactoryCredentials credentials, IComponentConfiguration config) { using (var client = credentials.CreateClient()) using (var response = await client.GetAsync("api/repositories").ConfigureAwait(false)) { var repositories = await this.ParseResponseAsync <IEnumerable <Repository> >(response).ConfigureAwait(false); return(repositories?.Select(r => r.Key)); } }
protected abstract Task <IEnumerable <string> > GetSuggestionsAsync(ArtifactoryCredentials credentials, IComponentConfiguration config);