Exemplo n.º 1
0
        /// <summary>
        /// Send a request to the api supplying an amount of hours for the api to look at
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="request"></param>
        /// <param name="hours"></param>
        /// <returns></returns>
        public async Task <T> SendRequest <T>(Requests.RequestType request, int hours)
        {
            Console.WriteLine($"{baseUrl}/{request.ToString().ToLower()}/{address}/{hours}");
            string url = $"{baseUrl}/{request.ToString().ToLower()}/{address}/{hours}";

            return(await DoRequest <T>(url));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Send a request to the api asynchronously
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="request"></param>
        /// <returns></returns>
        public async Task <T> SendRequest <T>(Requests.RequestType request)
        {
            string url = $"{baseUrl}/{request.ToString().ToLower()}/{address}";

            return(await DoRequest <T>(url));
        }