Example #1
0
        /// <summary>
        /// Get user balance/widthDraw được chỉ định cụ thể
        /// </summary>
        /// <param name="login"></param>
        /// <param name="TID"></param>
        /// <param name="system"></param>
        /// <returns></returns>
        public string ApiGetUser_BalanceSpecified(string login, string TID, string system)
        {
            string strMdD5 = hashMD5.Hash_getbalance(login, TID, system);

            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri(URL_API_FUNDIST);
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
                HttpResponseMessage response = client.GetAsync("System/Api/" + API_KEY + "/Balance/Get/?&Login="******"&System=" + system + "&TID=" + TID + "&Hash=" + strMdD5).Result;//có thể option reason
                if (response.IsSuccessStatusCode)
                {
                    return(response.Content.ReadAsStringAsync().Result);
                }
                return(null);
            }
        }