Beispiel #1
0
        public Task <string> ArticleRequest(ArticleEndpoint endpoint, Func <IDictionary <string, string> > getParameters)
        {
            var requestUrl = GenerateApiUrl(endpoint);
            var parameters = getParameters.Invoke();

            return(WebClient(requestUrl, parameters));
        }
        public Task <string> ArticleRequest(ArticleEndpoint endpoint, Func <IDictionary <string, string> > getParameters)
        {
            var requestUrl = UrlHelper.GenerateUrl(_wikiApiUrl, Endpoints[endpoint]);
            var parameters = getParameters.Invoke();

            return(_wikiaHttpClient.GetString(requestUrl, parameters));
        }
Beispiel #3
0
 private string GenerateApiUrl(ArticleEndpoint endpoint)
 {
     return(UrlHelper.GenerateApiUrl(_wikiApiUrl, Endpoints[endpoint]));
 }