Example #1
0
        public static HistoryResult GetHistory(string character, Server server)
        {
            if (server == Server.Test)
            {
                return(null);
            }

            character = character.ToLower();
            string xml = HTML.GetHtml(String.Format(URL_AunoWhois, character, (int)server));

            if (xml != null)
            {
                HistoryResult result = ParseHistory(xml);
                if (result != null)
                {
                    Output("Retrieved {0}@{1} from auno's history server", character, server.ToString());
                    return(result);
                }
                else
                {
                    Output("Unable to parse history data for {0}@{1}", character, server.ToString());
                    return(null);
                }
            }
            else
            {
                Output("Unable to retrieve history data for {0}@{1}", character, server.ToString());
                return(null);
            }
        }
Example #2
0
        public static ServerStatusResult GetServerStatus()
        {
            string xml = HTML.GetHtml(URL_OfficialServerStatus);

            if (xml != null)
            {
                return(ParseServerStatus(xml));
            }
            else
            {
                return(null);
            }
        }
Example #3
0
        public static OrganizationResult GetOrganization(string url, Int32 timeout)
        {
            string xml = HTML.GetHtml(url, timeout);

            if (xml != null)
            {
                Output("Downloaded {0}", url);
                return(ParseOrganization(xml));
            }
            else
            {
                Output("Unable to download {0}", url);
                return(null);
            }
        }