public string Get(string resource, IDictionary <string, string> parameters = null)
 {
     try
     {
         var headers = new Dictionary <string, string> {
             { "X-Auth-Token", "5759e59c5cd44dfdbd72cfc074d8f8f2" }
         };
         return(_restSharp.Get(_urlBase, resource, headers: headers, parameters: parameters, parameterType: RestSharp.ParameterType.QueryString).Content);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
示例#2
0
 public string Avatar(string hash, string tamanho)
 {
     try
     {
         var resource = $"/avatar/{hash}";
         Dictionary <string, string> parametros = null;
         if (tamanho != null)
         {
             parametros = new Dictionary <string, string>
             {
                 { "s", tamanho }
             };
         }
         return(_restSharp.Get(_urlBase, resource, parametros).Content);
     }
     catch (Exception ex)
     {
         return(null);
     }
 }