private static Uri CreateRequestUrl(AtApiCredentials atApiCredentials, string parentRequestType, string returnType, string requestName, string requestInput)
 {
     var requestUrl = string.Format("{0}/{1}/{2}/{3}/{4}?{5}", atApiCredentials.ApiUrl, parentRequestType, returnType, requestName, requestInput, atApiCredentials.ApiKey);
     return new Uri(requestUrl);
 }
Exemplo n.º 2
0
 public ApiToAT(string apiKey,string apiUrl)
 {
     _atApiCredentials = new AtApiCredentials(apiKey, apiUrl);
 }
 internal static IEnumerable<JToken> GetIEnumerableJsonApiResponse(AtApiCredentials atApiCredentials, string parentRequestType, string returnType, string requestName, string requestInput)
 {
     var url = CreateRequestUrl(atApiCredentials,parentRequestType, returnType, requestName, requestInput);
     var json = GetJsonFromUrl(url);
     return json["response"].AsEnumerable();
 }