Ejemplo n.º 1
0
        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));
        }