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();
        }
        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();
        }
        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();
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
            }
        }
Example #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);
     }
 }
Example #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);
            }
        }