Пример #1
0
        public void UpdateStart2()
        {
            string json_response = this.Proxy.proxy(KanColle.Master.Start2.GET);
            KanColleAPI <KanColle.Master.Start2> start2 = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Master.Start2> >(json_response);

            this.Start2 = start2.GetData();
        }
Пример #2
0
        public void UpdateBasic()
        {
            string json_response = this.Proxy.proxy(KanColle.Member.Basic.GET);
            KanColleAPI <KanColle.Member.Basic> basic = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Member.Basic> >(json_response);

            this.basic = basic.GetData();
        }
Пример #3
0
        public void UpdatePort()
        {
            string member_id     = this.basic.api_member_id;
            string json_response = this.Proxy.proxy(ApiPort.PORT, ApiPort.port(member_id));
            KanColleAPI <KanColle.Member.Port> port = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Member.Port> >(json_response);

            this.Port = port.GetData();
        }
Пример #4
0
        public KanColle.Member.Port GetPort(string member_id)
        {
            try {
                string json_response = this.proxy(ApiPort.PORT, ApiPort.port(member_id));
                KanColleAPI <KanColle.Member.Port> port = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Member.Port> >(json_response);
                return(port.GetData());
            } catch (Exception e) {
#if DEBUG
                Console.WriteLine(e.Message);
#endif
                throw new Exception(e.Message);
            }
        }
Пример #5
0
        // WARNING: Start2 currently cannot be parsed because the server returns some invalid JSON (there are stray quotation marks
        // in the returned data that causes the parser to panic).
        // Since data in Start2 tend to be static anyway, please find a workaround such as by preloading data manually instead of dynamically.
        public KanColle.Master.Start2 GetStart2()
        {
            try {
                string json_response = this.proxy(KanColle.Master.Start2.GET);
                KanColleAPI <KanColle.Master.Start2> start2 = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Master.Start2> >(json_response);
                return(start2.GetData());
            } catch (Exception e) {
#if DEBUG
                Console.WriteLine(e.Message);
#endif
                throw new Exception(e.Message);
            }
        }
Пример #6
0
        // For getting some of the more important, commonly-used data

        public KanColle.Member.Basic GetBasic()
        {
            try {
                string json_response = this.proxy(KanColle.Member.Basic.GET);
                KanColleAPI <KanColle.Member.Basic> basic = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Member.Basic> >(json_response);
                return(basic.GetData());
            } catch (Exception e) {
#if DEBUG
                Console.WriteLine(e.Message);
#endif
                throw new Exception(e.Message);
            }
        }
Пример #7
0
 public KanColle.Master.Start2 GetStart2()
 {
     try {
         string json_response = this.proxy(KanColle.Master.Start2.GET);
         KanColleAPI <KanColle.Master.Start2> start2 = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Master.Start2> >(json_response);
         return(start2.GetData());
     } catch (Exception e) {
         if (debug)
         {
             Console.WriteLine(e.Message);
         }
         return(null);
     }
 }
Пример #8
0
        // For getting some of the more important, commonly-used data

        public KanColle.Member.Basic GetBasic()
        {
            try {
                string json_response = this.proxy(KanColle.Member.Basic.GET);
                KanColleAPI <KanColle.Member.Basic> basic = JsonConvert.DeserializeObject <KanColleAPI <KanColle.Member.Basic> >(json_response);
                return(basic.GetData());
            } catch (Exception e) {
                if (debug)
                {
                    Console.WriteLine(e.Message);
                }
                return(null);
            }
        }