public static Models.Character GetCharacter(string characterName, long apikey, string vcode)
        {
            var api = new EveAI.Live.EveApi("R3MUS Recruitment", apikey, vcode);

            List<string> list = new List<String>();
            list.Add(characterName);
            Dictionary<string, long> dict = api.ConvertNamesToIDs(list);

            try
            {
                dict = api.ConvertNamesToIDs(list);
            }
            catch(Exception ex)
            {
                return new Models.Character() { info = new Character.Models.info() { name = characterName, character_id = 0, corporation_id = 0, alliance_id = 0, faction_id = 0, sec_status = 0.0 }, history = null };
            }
            if ((dict[characterName] == null) || (dict[characterName] == 0))
            {
                return new Models.Character() { info = new Character.Models.info() { name = characterName, character_id = 0, corporation_id = 0, alliance_id = 0, faction_id = 0, sec_status = 0.0 }, history = null };
            }
            else
            {
                return GetCharacter(dict[characterName]);
            }
        }
Exemple #2
0
        public static Models.EveCharacter GetCharacter(string characterName, long apikey, string vcode)
        {
            var api = new EveAI.Live.EveApi("R3MUS Recruitment", apikey, vcode);

            List <string> list = new List <String>();

            list.Add(characterName);
            Dictionary <string, long> dict = api.ConvertNamesToIDs(list);

            try
            {
                dict = api.ConvertNamesToIDs(list);
            }
            catch (Exception ex)
            {
                return(new Models.EveCharacter()
                {
                    _currentTime = DateTime.Now.ToString(),
                    _cachedUntil = DateTime.Now.ToString(),
                    //,
                    //result = new EveCharacter.Models.result() {
                    //characterName = characterName,
                    //characterID = 0,
                    //corporationID = 0,
                    //corporation = ex.Message,
                    //bloodline = string.Empty,
                    //securityStatus = 0.0,
                    //corporationDate = new DateTime(),
                    //race = string.Empty,
                    //employmentHistory = null
                    //}
                });
            }
            if ((dict[characterName] == null) || (dict[characterName] == 0))
            {
                return(new Models.EveCharacter()
                {
                    _currentTime = DateTime.Now.ToString(),
                    _cachedUntil = DateTime.Now.ToString(),
                    //    ,
                    //result = new EveCharacter.Models.result()
                    //{
                    //    characterName = characterName,
                    //    characterID = 0,
                    //    corporationID = 0,
                    //    corporation = string.Empty,
                    //    bloodline = string.Empty,
                    //    securityStatus = 0.0,
                    //    corporationDate = new DateTime(),
                    //    race = string.Empty,
                    //    employmentHistory = null
                    //}
                });
            }
            else
            {
                return(GetCharacter(dict[characterName]));
            }
        }
        public static Models.EveCharacter GetCharacter(string characterName, long apikey, string vcode)
        {
            var api = new EveAI.Live.EveApi("R3MUS Recruitment", apikey, vcode);

            List<string> list = new List<String>();
            list.Add(characterName);
            Dictionary<string, long> dict = api.ConvertNamesToIDs(list);
            try
            {
                dict = api.ConvertNamesToIDs(list);
            }
            catch (Exception ex)
            {
                return new Models.EveCharacter()
                {
                    _currentTime = DateTime.Now.ToString(),
                    _cachedUntil = DateTime.Now.ToString(),
                    //,
                    //result = new EveCharacter.Models.result() {
                                    //characterName = characterName,
                                    //characterID = 0,
                                    //corporationID = 0,
                                    //corporation = ex.Message,
                                    //bloodline = string.Empty,
                                    //securityStatus = 0.0,
                                    //corporationDate = new DateTime(),
                                    //race = string.Empty,
                                    //employmentHistory = null
                    //}
                };
            }
            if ((dict[characterName] == null) || (dict[characterName] == 0))
            {
                return new Models.EveCharacter()
                {
                    _currentTime = DateTime.Now.ToString(),
                    _cachedUntil = DateTime.Now.ToString(),
                    //    ,
                    //result = new EveCharacter.Models.result()
                    //{
                    //    characterName = characterName,
                    //    characterID = 0,
                    //    corporationID = 0,
                    //    corporation = string.Empty,
                    //    bloodline = string.Empty,
                    //    securityStatus = 0.0,
                    //    corporationDate = new DateTime(),
                    //    race = string.Empty,
                    //    employmentHistory = null
                    //}
                };
            }
            else
            {
                return GetCharacter(dict[characterName]);
            }
        }
Exemple #4
0
        public static Models.Character GetCharacter(string characterName, long apikey, string vcode)
        {
            var api = new EveAI.Live.EveApi("R3MUS Recruitment", apikey, vcode);

            List <string> list = new List <String>();

            list.Add(characterName);
            Dictionary <string, long> dict = api.ConvertNamesToIDs(list);

            try
            {
                dict = api.ConvertNamesToIDs(list);
            }
            catch (Exception ex)
            {
                return(new Models.Character()
                {
                    info = new Character.Models.info()
                    {
                        name = characterName, character_id = 0, corporation_id = 0, alliance_id = 0, faction_id = 0, sec_status = 0.0
                    }, history = null
                });
            }
            if ((dict[characterName] == null) || (dict[characterName] == 0))
            {
                return(new Models.Character()
                {
                    info = new Character.Models.info()
                    {
                        name = characterName, character_id = 0, corporation_id = 0, alliance_id = 0, faction_id = 0, sec_status = 0.0
                    }, history = null
                });
            }
            else
            {
                return(GetCharacter(dict[characterName]));
            }
        }