/// <summary> /// Gets the default list of cards or filter with a query. /// </summary> /// <param name="query"></param> /// <returns></returns> public static Pokemon Get(Dictionary <string, string> query = null) { try { // Make sure this actually gets the default cards // from the API as described. query = QueryBuilderHelper.GetDefaultQuery(query); Pokemon pokemon = QueryBuilder.GetPokemonCards(query); if (pokemon == null) { pokemon.Errors = new List <string>() { "Not Found" }; return(pokemon); } else { return(pokemon); } } catch (Exception ex) { Pokemon pokemon = new Pokemon(); pokemon.Errors = new List <string>() { ex.Message }; return(pokemon); } }
/// <summary> /// Gets the default list of cards or filter with a query. /// </summary> /// <param name="query"></param> /// <returns></returns> public static Pokemon Get(Dictionary <string, string> query = null) { try { var pokemon = QueryBuilder.GetPokemonCards(); return(pokemon ?? new Pokemon { Errors = new List <string> { "Not Found" } }); } catch (Exception ex) { return(new Pokemon { Errors = new List <string> { ex.Message } }); } }