Exemplo n.º 1
0
        /// <summary>
        /// Lấy lịch sử tiền cược của người chơi
        /// Hash: Stats/BetsSummary/[IP]/[TID]/[KEY]/[DATE]/[PWD]
        /// </summary>
        /// <param name="Date"></param>
        /// <param name="TID">follow format(YYYY-MM-DD)</param>
        /// <returns></returns>
        public async System.Threading.Tasks.Task <string> ApiBetsSummaryFullList(string Date, string TID, string AffiliateID)
        {
            string strMdD5 = hashMD5.Hash_HashUniversalBetsAuth(Date, TID);

            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 = (await client.PostAsync("System/Api/" + API_KEY + "Stats/BetsSummary/?&Date=" + Date + "&TID=" + TID + "&Hash=" + strMdD5 + "&AffiliateID=" + AffiliateID, null));
                if (response.IsSuccessStatusCode)
                {
                    return(response.Content.ReadAsStringAsync().Result);
                }
                return(null);
            }
        }