示例#1
0
        /// <summary>
        /// Result = 0 -> Error
        /// Result = 1 -> Success
        /// Result = 2 -> Character not found, but no errors.
        /// </summary>
        /// <param name="character"></param>
        /// <param name="realm"></param>
        /// <returns></returns>
        private JSONGuildNews RetrieveGuildNews(string guild, string realm)
        {
            JSONGuildNews result = JSONBase.GetGuildNewsJSON(guild, realm);

            if (result == null)
            {
                ModelState.AddModelError(string.Empty, $"Guild {guild} from {realm} not found.");
            }

            return(result);
        }