Пример #1
0
        public static string getServerStatus()
        {
            Random rd    = new Random();
            long   time  = rd.Next() + GetTimeStamp();
            string token = STRMD5.GetMD5HashString(time + "??!?!/!?" + API_KEY + "?!@?2?!" + time);
            //Shell.WriteLine("time:{0} apikey:{1} token:{2}",time,API_KEY,token);
            Dictionary <string, string> ps = new Dictionary <string, string>();

            ps.Add("time", time.ToString());
            ps.Add("token", token);
            ps.Add("apikey", API_KEY);
            return(GetResponseString(CreatePostHttpResponse(API_SERVER_STATUS, ps)));
        }
Пример #2
0
        public static string setCancelUUID(string uuid)
        {
            Random rd    = new Random();
            long   time  = rd.Next() + GetTimeStamp();
            string token = STRMD5.GetMD5HashString(time + "??!?!/!?" + API_KEY + "?!@?2?!" + time);
            //Shell.WriteLine("time:{0} apikey:{1} token:{2}",time,API_KEY,token);
            Dictionary <string, string> ps = new Dictionary <string, string>();

            ps.Add("time", time.ToString());
            ps.Add("token", token);
            ps.Add("apikey", API_KEY);
            ps.Add("uuid", uuid);
            return(GetResponseString(CreatePostHttpResponse(API_CANCEL_UUID, ps)));
        }