Exemplo n.º 1
0
        /// <summary>
        /// State bets
        /// Hash: Stats/Bets/[IP]/[TID]/[KEY]/[DATE]/[PWD]
        /// </summary>
        /// <param name="Date"></param>
        /// <param name="TID"></param>
        /// <param name="system"></param>
        /// <param name="AffiliateID"></param>
        /// <returns></returns>
        public async System.Threading.Tasks.Task <string> ApiStatsBetsyFullList(string Date, string TID, string system, string login)
        {
            string strMdD5 = hashMD5.Hash_HashStatsBetssAuth(TID, Date);

            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 = new HttpResponseMessage();
                if (string.IsNullOrEmpty(login))
                {
                    response = (await client.GetAsync("System/Api/" + API_KEY + "/Stats/Bets/?&Date=" + Date + "&TID=" + TID + "&Hash=" + strMdD5 + "&System=" + system + "&Login="******"System/Api/" + API_KEY + "/Stats/Bets/?&Date=" + Date + "&TID=" + TID + "&Hash=" + strMdD5 + "&System=" + system));
                }
                if (response.IsSuccessStatusCode)
                {
                    return(response.Content.ReadAsStringAsync().Result);
                }
                return(null);
            }
        }