Ejemplo n.º 1
0
        public void Load(BlizzardApiJsonResponse json)
        {
            switch (json.ResultCode)
            {
            case null:
            case System.Net.HttpStatusCode.OK:
                break;

            case System.Net.HttpStatusCode.Forbidden:
                BlizzardApiComment = LocaleStringCode.BLIZZ_API_RESPONSE_FORBIDDEN;
                break;

            case System.Net.HttpStatusCode.NotFound:
                BlizzardApiComment = LocaleStringCode.BLIZZ_API_RESPONSE_NOT_FOUND;
                break;

            case System.Net.HttpStatusCode.TooManyRequests:
                BlizzardApiComment = LocaleStringCode.BLIZZ_API_LIMIT_REACHED;
                break;

            default:
                BlizzardApiComment = LocaleStringCode.UNKNOWN_ERROR;
                break;
            }
        }
Ejemplo n.º 2
0
 protected bool CheckJson(BlizzardApiJsonResponse json)
 {
     if (json == null)
     {
         BlizzardApiComment = LocaleStringCode.BLIZZ_API_RESPONSE_EMPTY;
         return(false);
     }
     Load(json);
     return(true);
 }