protected async Task <T> RetrieveAsync <T>(IEndpointBuilder builder, GW2RESTConfig config = null) { if (!string.IsNullOrEmpty(ApiKey)) { if (config == null || config.IgnoreAuthentication == false) { builder.AddParameter("access_token", ApiKey); } } string json = await retriever.GetJsonAsync(builder); return(deserializer.Deserialize <T>(json)); }
protected async Task <T> RetrieveAsync <T>(string endpoint, GW2RESTConfig config = null) { IEndpointBuilder builder = new EndpointBuilder().AddEndpoint(endpoint); return(await RetrieveAsync <T>(builder, config)); }
/// <summary> /// Retrieve without an API key. /// </summary> protected T Retrieve <T>(string endpoint, GW2RESTConfig config = null) { IEndpointBuilder builder = new EndpointBuilder().AddEndpoint(endpoint); return(Retrieve <T>(builder, config)); }