├── README.md ├── PokeApi ├── Move.cs ├── ItemFlingEffect.cs ├── APIResource.cs ├── ItemSprites.cs ├── Genus.cs ├── PokemonType.cs ├── TypePokemon.cs ├── FlavorBerryMap.cs ├── MoveStatAffect.cs ├── EncounterVersionDetails.cs ├── Region.cs ├── NamedAPIResource.cs ├── EvolutionChain.cs ├── Name.cs ├── MoveStatAffectSets.cs ├── BerryFlavor.cs ├── NatureStatAffectSets.cs ├── EncounterMethodRate.cs ├── NatureStatAffect.cs ├── PokemonEncounter.cs ├── VersionGameIndex.cs ├── LocationAreaEncounter.cs ├── GenerationGameIndex.cs ├── PokemonSpeciesGender.cs ├── EncounterMethod.cs ├── AbilityPokemon.cs ├── PokemonAbility.cs ├── Version.cs ├── BerryFirmness.cs ├── ItemPocket.cs ├── PalParkArea.cs ├── EncounterCondition.cs ├── EncounterConditionValue.cs ├── PokemonSpeciesFlavorText.cs ├── Language.cs ├── ItemCategory.cs ├── MoveDamageClass.cs ├── ItemAttribute.cs ├── PalParkEncounterSpecies.cs ├── VersionEncounterDetail.cs ├── EvolutionTrigger.cs ├── Nature.cs ├── Description.cs ├── Location.cs ├── Gender.cs ├── GrowthRateExperienceLevel.cs ├── PokemonFormSprites.cs ├── ChainLink.cs ├── Generation.cs ├── PokemonEntry.cs ├── TypeRelations.cs ├── EggGroup.cs ├── PokemonColor.cs ├── PokemonSpeciesDexEntry.cs ├── Stat.cs ├── AwesomeName.cs ├── Type.cs ├── VersionGroupFlavorText.cs ├── VerboseEffect.cs ├── LocationArea.cs ├── Ability.cs ├── PokemonForm.cs ├── PokemonShape.cs ├── Berry.cs ├── MoveLearnMethod.cs ├── Encounter.cs ├── GrowthRate.cs ├── Pokedex.cs ├── Item.cs ├── PalParkEncounterArea.cs ├── Pokemon.cs ├── VersionGroup.cs ├── EvolutionDetail.cs ├── Http │ └── PokeApiClient.cs └── PokemonSpecies.cs ├── Program.cs ├── Flurl-Sample.sln ├── LICENSE ├── Properties └── AssemblyInfo.cs ├── .gitattributes ├── .gitignore └── Flurl-Sample.csproj /README.md: -------------------------------------------------------------------------------- 1 | # Flurl-sample 2 | Ejemplo de la librería Flurl 3 | -------------------------------------------------------------------------------- /PokeApi/Move.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class Move 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /PokeApi/ItemFlingEffect.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class ItemFlingEffect 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /PokeApi/APIResource.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class APIResource 4 | { 5 | public string URL { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /PokeApi/ItemSprites.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class ItemSprites 4 | { 5 | public string Default { get; set; } 6 | } 7 | } -------------------------------------------------------------------------------- /PokeApi/Genus.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class Genus 4 | { 5 | public string Genus1 { get; set; } 6 | public NamedApiResource Language { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /PokeApi/PokemonType.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class PokemonType 4 | { 5 | public int Slot { get; set; } 6 | public NamedApiResource Type { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /PokeApi/TypePokemon.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class TypePokemon 4 | { 5 | public int Slot { get; set; } 6 | public NamedApiResource Pokemon { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /PokeApi/FlavorBerryMap.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class FlavorBerryMap 4 | { 5 | public int Potency { get; set; } 6 | public NamedApiResource Berry { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /PokeApi/MoveStatAffect.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class MoveStatAffect 4 | { 5 | public int MaxChange { get; set; } 6 | public NamedApiResource Move { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /PokeApi/EncounterVersionDetails.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class EncounterVersionDetails 4 | { 5 | public int Rate { get; set; } 6 | public NamedApiResource Version { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /PokeApi/Region.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class Region 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public NamedApiResource Locations { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /PokeApi/NamedAPIResource.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class NamedApiResource 4 | { 5 | public string Name { get; set; } 6 | public string URL { get; set; } 7 | 8 | public T Resource { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /PokeApi/EvolutionChain.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class EvolutionChain 4 | { 5 | public int Id { get; set; } 6 | public NamedApiResource BabyTriggerItem { get; set; } 7 | public ChainLink Chain { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /PokeApi/Name.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class Name 6 | { 7 | [JsonProperty("name")] 8 | public string Name1 { get; set; } 9 | public NamedApiResource Language { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /PokeApi/MoveStatAffectSets.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class MoveStatAffectSets 6 | { 7 | public List Increase { get; set; } 8 | public List Decrease { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /PokeApi/BerryFlavor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class BerryFlavor 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List Berries { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /PokeApi/NatureStatAffectSets.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class NatureStatAffectSets 6 | { 7 | public List Increase { get; set; } 8 | public List Decrease { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /PokeApi/EncounterMethodRate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class EncounterMethodRate 6 | { 7 | public EncounterMethod EncounterMethod { get; set; } 8 | public List VersionDetails { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /PokeApi/NatureStatAffect.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class NatureStatAffect 6 | { 7 | 8 | [JsonProperty("max_change")] 9 | public int MaxChange { get; set; } 10 | public NamedApiResource Nature { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/PokemonEncounter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonEncounter 6 | { 7 | public NamedApiResource Pokemon { get; set; } 8 | 9 | public List VersionDetails { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /PokeApi/VersionGameIndex.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class VersionGameIndex 6 | { 7 | 8 | [JsonProperty("game_index")] 9 | public int GameIndex { get; set; } 10 | public NamedApiResource Version { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/LocationAreaEncounter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class LocationAreaEncounter 6 | { 7 | public APIResource LocationArea { get; set; } 8 | public List VersionDetails { get; set; } 9 | } 10 | } -------------------------------------------------------------------------------- /PokeApi/GenerationGameIndex.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class GenerationGameIndex 6 | { 7 | 8 | [JsonProperty("game_index")] 9 | public int GameIndex { get; set; } 10 | public NamedApiResource Generation { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/PokemonSpeciesGender.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonSpeciesGender 6 | { 7 | public int Rate { get; set; } 8 | [JsonProperty("pokemon_species")] 9 | public NamedApiResource PokemonSpecies { get; set; } 10 | } 11 | } -------------------------------------------------------------------------------- /PokeApi/EncounterMethod.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class EncounterMethod 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public int Order { get; set; } 10 | public List Names { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Threading.Tasks; 3 | 4 | namespace Flurl_Sample 5 | { 6 | internal class Program 7 | { 8 | private static void Main(string[] args) 9 | { 10 | var bulb = new PokeApi.Http.PokeApiClient(); 11 | 12 | Console.Read(); 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /PokeApi/AbilityPokemon.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class AbilityPokemon 6 | { 7 | 8 | [JsonProperty("is_hidden")] 9 | public bool IsHidden { get; set; } 10 | public int Slot { get; set; } 11 | public NamedApiResource Pokemon { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /PokeApi/PokemonAbility.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonAbility 6 | { 7 | 8 | [JsonProperty("is_hidden")] 9 | public bool IsHidden { get; set; } 10 | public int Slot { get; set; } 11 | public NamedApiResource Ability { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /PokeApi/Version.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class Version 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List Names { get; set; } 10 | public NamedApiResource VersionGroup { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/BerryFirmness.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class BerryFirmness 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List> Berries { get; set; } 10 | public List Names { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/ItemPocket.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class ItemPocket 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List> Categories { get; set; } 10 | public List Names { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/PalParkArea.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class PalParkArea 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List Names { get; set; } 10 | public List PokemonEncounters { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/EncounterCondition.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class EncounterCondition 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List Names { get; set; } 10 | public List> Values { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/EncounterConditionValue.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class EncounterConditionValue 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List> Condition { get; set; } 10 | public List Names { get; set; } 11 | } 12 | } -------------------------------------------------------------------------------- /PokeApi/PokemonSpeciesFlavorText.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonSpeciesFlavorText 6 | { 7 | 8 | [JsonProperty("flavor_text")] 9 | public string FlavorText { get; set; } 10 | public NamedApiResource Language { get; set; } 11 | public NamedApiResource Version { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /PokeApi/Language.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class Language 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public bool Official { get; set; } 10 | public string Iso639 { get; set; } 11 | public string Iso3166 { get; set; } 12 | public List Names { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /PokeApi/ItemCategory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class ItemCategory 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List> Items { get; set; } 10 | public List Names { get; set; } 11 | public NamedApiResource Pocket { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /PokeApi/MoveDamageClass.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class MoveDamageClass 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List Descriptions { get; set; } 10 | public List> Moves { get; set; } 11 | public List Names { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /PokeApi/ItemAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class ItemAttribute 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List> Items { get; set; } 10 | 11 | public List Names { get; set; } 12 | 13 | public List Descriptions { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PokeApi/PalParkEncounterSpecies.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PalParkEncounterSpecies 6 | { 7 | 8 | [JsonProperty("base_score")] 9 | public int BaseScore { get; set; } 10 | public int Rate { get; set; } 11 | 12 | [JsonProperty("pokemon_species")] 13 | public NamedApiResource PokemonSpecies { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PokeApi/VersionEncounterDetail.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class VersionEncounterDetail 6 | { 7 | public NamedApiResource Version { get; set; } 8 | 9 | [JsonProperty("max_chance")] 10 | public int MaxChance { get; set; } 11 | 12 | [JsonProperty("encounter_details")] 13 | public Encounter EncounterDetails { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PokeApi/EvolutionTrigger.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class EvolutionTrigger 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public List Names { get; set; } 11 | [JsonProperty("pokemon_species")] 12 | public List> PokemonSpecies { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /PokeApi/Nature.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class Nature 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | 8 | public NamedApiResource DecreasedStat { get; set; } 9 | public NamedApiResource IncreasedStat { get; set; } 10 | public NamedApiResource HatesFlavor { get; set; } 11 | public NamedApiResource LikesFlavor { get; set; } 12 | } 13 | } -------------------------------------------------------------------------------- /PokeApi/Description.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class Description 4 | { 5 | /// 6 | /// The localized description for an API resource in a specific language. 7 | /// 8 | public string Description1 { get; set; } 9 | 10 | /// 11 | /// The language this name is in. 12 | /// 13 | public NamedApiResource Language { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PokeApi/Location.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class Location 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public NamedApiResource Region { get; set; } 10 | public List Names { get; set; } 11 | public List GameIndices { get; set; } 12 | public APIResource Areas { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /PokeApi/Gender.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Gender 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | [JsonProperty("pokemon_species_details")] 11 | public List PokemonSpeciesDetails { get; set; } 12 | [JsonProperty("required_for_evolution")] 13 | public List> RequiredForEvolution { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /PokeApi/GrowthRateExperienceLevel.cs: -------------------------------------------------------------------------------- 1 | namespace PokeApi 2 | { 3 | public class GrowthRateExperienceLevel 4 | { 5 | /// 6 | /// The level gained. 7 | /// 8 | /// The level. 9 | public int Level { get; set; } 10 | 11 | /// 12 | /// The amount of experience required to reach the referenced level. 13 | /// 14 | /// The experience. 15 | public int Experience { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /PokeApi/PokemonFormSprites.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonFormSprites 6 | { 7 | 8 | [JsonProperty("front_default")] 9 | public string FrontDefault { get; set; } 10 | 11 | [JsonProperty("front_shiny")] 12 | public string FrontShiny { get; set; } 13 | 14 | [JsonProperty("back_default")] 15 | public string BackDefault { get; set; } 16 | 17 | [JsonProperty("back_shiny")] 18 | public string BackShiny { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /PokeApi/ChainLink.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class ChainLink 7 | { 8 | 9 | [JsonProperty("is_baby")] 10 | public bool IsBaby { get; set; } 11 | public NamedApiResource Species { get; set; } 12 | 13 | [JsonProperty("evolution_details")] 14 | public EvolutionDetail EvolutionDetails { get; set; } 15 | 16 | [JsonProperty("evolves_to")] 17 | public List EvolvesTo { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /PokeApi/Generation.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Generation 7 | { 8 | public int Id { get; set; } 9 | public int Name { get; set; } 10 | public List> Abilities { get; set; } 11 | public List Names { get; set; } 12 | 13 | [JsonProperty("main_region")] 14 | public NamedApiResource MainRegion { get; set; } 15 | public List> Moves { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /PokeApi/PokemonEntry.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class PokemonEntry 7 | { 8 | 9 | [JsonProperty("entry_number")] 10 | public int EntryNumber { get; set; } 11 | 12 | [JsonProperty("pokemon_species")] 13 | public List> PokemonSpecies { get; set; } 14 | public NamedApiResource Region { get; set; } 15 | 16 | [JsonProperty("version_group")] 17 | public NamedApiResource VersionGroup { get; set; } 18 | } 19 | } -------------------------------------------------------------------------------- /PokeApi/TypeRelations.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class TypeRelations 6 | { 7 | public List> NoDamageTo { get; set; } 8 | public List> HalfDamageTo { get; set; } 9 | public List> DoubleDamageTo { get; set; } 10 | public List> NoDamageFrom { get; set; } 11 | public List> HalfDamageFrom { get; set; } 12 | public List> DoubleDamageFrom { get; set; } 13 | } 14 | } -------------------------------------------------------------------------------- /PokeApi/EggGroup.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class EggGroup 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public List Names { get; set; } 10 | 11 | /// 12 | /// A list of all Pokémon species that are members of this egg group. 13 | /// 14 | /// The pokemon species. 15 | /// [JsonProperty("pokemon_species")] 16 | public List> PokemonSpecies { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /PokeApi/PokemonColor.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class PokemonColor 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public List Names { get; set; } 11 | 12 | /// 13 | /// A list of the Pokémon species that have this color. 14 | /// 15 | /// The pokemon species. 16 | 17 | [JsonProperty("pokemon_species")] 18 | public List> PokemonSpecies { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /PokeApi/PokemonSpeciesDexEntry.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonSpeciesDexEntry 6 | { 7 | /// 8 | /// The index number within the Pokédex. 9 | /// 10 | /// The entry number. 11 | [JsonProperty("entry_number")] 12 | public int EntryNumber { get; set; } 13 | 14 | /// 15 | /// The Pokédex the referenced Pokémon species can be found in. 16 | /// 17 | /// The name. 18 | public string Name { get; set; } 19 | } 20 | } -------------------------------------------------------------------------------- /PokeApi/Stat.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class Stat 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | [JsonProperty("game_index")] 11 | public int GameIndex { get; set; } 12 | 13 | 14 | [JsonProperty("is_battle_only")] 15 | public bool IsBattleOnly { get; set; } 16 | 17 | [JsonProperty("affecting_moves")] 18 | public MoveStatAffectSets AffectingMoves { get; set; } 19 | 20 | [JsonProperty("affecting_natures")] 21 | public NatureStatAffectSets AffectingNatures { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /PokeApi/AwesomeName.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class AwesomeName 6 | { 7 | /// 8 | /// The localized "scientific" name for an API resource in a specific language. 9 | /// 10 | /// The awesome name1. 11 | 12 | [JsonProperty("awesome_name")] 13 | public string AwesomeName1 { get; set; } 14 | 15 | /// 16 | /// The language this "scientific" name is in. 17 | /// 18 | /// The language. 19 | public NamedApiResource Language { get; set; } 20 | } 21 | } -------------------------------------------------------------------------------- /PokeApi/Type.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class Type 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public TypeRelations DamageRelations { get; set; } 10 | public List GameIndices { get; set; } 11 | public NamedApiResource Generation { get; set; } 12 | public NamedApiResource MoveDamageClass { get; set; } 13 | public List Names { get; set; } 14 | public TypePokemon Pokemon { get; set; } 15 | public List> Moves { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /PokeApi/VersionGroupFlavorText.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class VersionGroupFlavorText 6 | { 7 | /// 8 | /// The localized name for an API resource in a specific language. 9 | /// 10 | /// The text. 11 | public string Text { get; set; } 12 | 13 | /// 14 | /// The language this name is in. 15 | /// 16 | public NamedApiResource Language { get; set; } 17 | 18 | 19 | [JsonProperty("version_group")] 20 | public NamedApiResource VersionGroup { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /PokeApi/VerboseEffect.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class VerboseEffect 6 | { 7 | /// 8 | /// The localized effect text for an API resource in a specific language. 9 | /// 10 | public string Effect { get; set; } 11 | 12 | /// 13 | /// The localized effect text in brief. 14 | /// 15 | 16 | [JsonProperty("short_effect")] 17 | public string ShortEffect { get; set; } 18 | 19 | /// 20 | /// The language this effect is in. 21 | /// 22 | public NamedApiResource Language { get; set; } 23 | } 24 | } -------------------------------------------------------------------------------- /PokeApi/LocationArea.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class LocationArea 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | 11 | [JsonProperty("game_index")] 12 | public int GameIndex { get; set; } 13 | 14 | [JsonProperty("encounter_method_rates")] 15 | public List EncounterMethodRates { get; set; } 16 | public NamedApiResource Location { get; set; } 17 | public List Names { get; set; } 18 | 19 | [JsonProperty("pokemon_encounters")] 20 | public List PokemonEncounters { get; set; } 21 | } 22 | } -------------------------------------------------------------------------------- /PokeApi/Ability.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Ability 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | 11 | [JsonProperty("is_main_series")] 12 | public bool IsMainSeries { get; set; } 13 | public NamedApiResource Generation { get; set; } 14 | public List Names { get; set; } 15 | 16 | [JsonProperty("effect_entries")] 17 | public List EffectEntries { get; set; } 18 | 19 | [JsonProperty("flavor_text_entries")] 20 | public List FlavorTextEntries { get; set; } 21 | public List Pokemon { get; set; } 22 | } 23 | } -------------------------------------------------------------------------------- /PokeApi/PokemonForm.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonForm 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | public int Order { get; set; } 10 | 11 | [JsonProperty("form_order")] 12 | public int FormOrder { get; set; } 13 | 14 | [JsonProperty("is_default")] 15 | public bool IsDefault { get; set; } 16 | 17 | [JsonProperty("is_battle_only")] 18 | public bool IsBattleOnly { get; set; } 19 | 20 | [JsonProperty("is_mega")] 21 | public bool IsMega { get; set; } 22 | 23 | [JsonProperty("form_name")] 24 | public string FormName { get; set; } 25 | public NamedApiResource Pokemon { get; set; } 26 | public PokemonFormSprites Sprites { get; set; } 27 | 28 | [JsonProperty("version_group")] 29 | public NamedApiResource VersionGroup { get; set; } 30 | } 31 | } -------------------------------------------------------------------------------- /PokeApi/PokemonShape.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class PokemonShape 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | /// 11 | /// The "scientific" name of this Pokémon shape listed in different languages. 12 | /// 13 | /// The awesome names. 14 | public List AwesomeNames { get; set; } 15 | 16 | /// 17 | /// The name of this Pokémon shape listed in different languages. 18 | /// 19 | /// The names. 20 | public List Names { get; set; } 21 | 22 | /// 23 | /// A list of the Pokémon species that have this shape. 24 | /// 25 | /// The pokemon species. 26 | /// [JsonProperty("pokemon_species")] 27 | public List> PokemonSpecies { get; set; } 28 | } 29 | } -------------------------------------------------------------------------------- /Flurl-Sample.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 2012 4 | VisualStudioVersion = 14.0.25123.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Flurl-Sample", "Flurl-Sample.csproj", "{556D7B05-77F0-4A86-BA37-E63BC4F2611C}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {556D7B05-77F0-4A86-BA37-E63BC4F2611C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {556D7B05-77F0-4A86-BA37-E63BC4F2611C}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {556D7B05-77F0-4A86-BA37-E63BC4F2611C}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {556D7B05-77F0-4A86-BA37-E63BC4F2611C}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /PokeApi/Berry.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Berry 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | 11 | 12 | [JsonProperty("growth_time")] 13 | public int GrowthTime { get; set; } 14 | 15 | [JsonProperty("max_harvest")] 16 | public int MaxHarvest { get; set; } 17 | 18 | [JsonProperty("natural_gift_power")] 19 | public int NaturalGiftPower { get; set; } 20 | public int Size { get; set; } 21 | public int Smoothness { get; set; } 22 | 23 | [JsonProperty("soil_dryness")] 24 | public int SoilDryness { get; set; } 25 | 26 | public NamedApiResource Firmness { get; set; } 27 | public List Flavors { get; set; } 28 | public NamedApiResource Item { get; set; } 29 | 30 | [JsonProperty("natural_gift_types")] 31 | public NamedApiResource NaturalGiftType { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 That C# Guy 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /PokeApi/MoveLearnMethod.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class MoveLearnMethod 6 | { 7 | /// 8 | /// The identifier for this move learn method resource. 9 | /// 10 | public int Id { get; set; } 11 | 12 | /// 13 | /// The name for this move learn method resource. 14 | /// 15 | public string Name { get; set; } 16 | 17 | /// 18 | /// The description of this move learn method listed in different languages. 19 | /// 20 | /// The descriptions. 21 | public List Descriptions { get; set; } 22 | 23 | /// 24 | /// The name of this move learn method listed in different languages. 25 | /// 26 | /// The names. 27 | public List Names { get; set; } 28 | 29 | /// 30 | /// A list of version groups where moves can be learned through this method. 31 | /// 32 | /// The version group. 33 | public List> VersionGroup { get; set; } 34 | } 35 | } -------------------------------------------------------------------------------- /PokeApi/Encounter.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Encounter 7 | { 8 | /// 9 | /// The lowest level the Pokémon could be encountered at 10 | /// 11 | 12 | [JsonProperty("min_level")] 13 | public int MinLevel { get; set; } 14 | 15 | /// 16 | /// The highest level the Pokémon could be encountered at 17 | /// 18 | 19 | [JsonProperty("max_level")] 20 | public int MaxLevel { get; set; } 21 | 22 | /// 23 | /// A list of condition values that must be in effect for this encounter to occur 24 | /// 25 | 26 | [JsonProperty("condition_values")] 27 | public List> ConditionValues { get; set; } 28 | 29 | /// 30 | /// Percent chance that this encounter will occur 31 | /// 32 | public int Chance { get; set; } 33 | 34 | /// 35 | /// The method by which this encounter happens. 36 | /// 37 | public NamedApiResource Method { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /PokeApi/GrowthRate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class GrowthRate 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | /// 11 | /// The formula used to calculate the rate at which the Pokémon species gains level 12 | /// 13 | public string Formula { get; set; } 14 | 15 | /// 16 | /// The descriptions of this characteristic listed in different languages. 17 | /// 18 | /// The descriptions. 19 | public List Descriptions { get; set; } 20 | 21 | /// 22 | /// A list of levels and the amount of experienced needed to atain them based on this growth rate. 23 | /// 24 | public List Levels { get; set; } 25 | 26 | /// 27 | /// A list of Pokémon species that gain levels at this growth rate. 28 | /// 29 | /// The pokemon species. 30 | /// [JsonProperty("pokemon_species")] 31 | public List> PokemonSpecies { get; set; } 32 | } 33 | } -------------------------------------------------------------------------------- /PokeApi/Pokedex.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class Pokedex 6 | { 7 | public int Id { get; set; } 8 | public string Name { get; set; } 9 | 10 | /// 11 | /// Whether or not this Pokédex originated in the main series of the video games. 12 | /// 13 | public bool IsMainSeries { get; set; } 14 | 15 | /// 16 | /// The description of this Pokédex listed in different languages. 17 | /// 18 | /// The description. 19 | public List Description { get; set; } 20 | 21 | /// 22 | /// The name of this Pokédex listed in different languages. 23 | /// 24 | /// The names. 25 | public List Names { get; set; } 26 | 27 | /// 28 | /// A list of pokemon catalogued in this Pokédex and their indexes. 29 | /// 30 | /// The pokemon entries. 31 | public List PokemonEntries { get; set; } 32 | 33 | public NamedApiResource Region { get; set; } 34 | 35 | public NamedApiResource VersionGroups { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /PokeApi/Item.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Item 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | public int Cost { get; set; } 11 | 12 | [JsonProperty("fling_power")] 13 | public int FlingPower { get; set; } 14 | 15 | [JsonProperty("fling_effect")] 16 | public ItemFlingEffect FlingEffect { get; set; } 17 | public List> Attributes { get; set; } 18 | public ItemCategory Category { get; set; } 19 | 20 | [JsonProperty("effect_entries")] 21 | public List EffectEntries { get; set; } 22 | 23 | [JsonProperty("flavor_text_entries")] 24 | public List FlavorTextEntries { get; set; } 25 | 26 | [JsonProperty("game_indices")] 27 | public List GameIndices { get; set; } 28 | public List Names { get; set; } 29 | public ItemSprites Sprites { get; set; } 30 | 31 | [JsonProperty("held_by_pokemon")] 32 | public List> HeldByPokemon { get; set; } 33 | 34 | [JsonProperty("baby_trigger_for")] 35 | public List> BabyTriggerFor { get; set; } 36 | } 37 | } -------------------------------------------------------------------------------- /PokeApi/PalParkEncounterArea.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class PalParkEncounterArea 7 | { 8 | /// 9 | /// The base score given to the player when the referenced Pokémon is caught during a pal park run. 10 | /// 11 | /// The base score. 12 | 13 | [JsonProperty("base_score")] 14 | public int BaseScore { get; set; } 15 | 16 | /// 17 | /// The base rate for encountering the referenced Pokémon in this pal park area. 18 | /// 19 | /// The rate. 20 | public int Rate { get; set; } 21 | 22 | /// 23 | /// The pal park area where this encounter happens. 24 | /// 25 | /// The area. 26 | public NamedApiResource Area { get; set; } 27 | 28 | [JsonProperty("flavor_text_entries")] 29 | public List FlavorTextEntries { get; set; } 30 | 31 | [JsonProperty("form_descriptions")] 32 | public List FormDescriptions { get; set; } 33 | 34 | public Genus Genera { get; set; } 35 | 36 | public List> Varieties { get; set; } 37 | } 38 | } -------------------------------------------------------------------------------- /PokeApi/Pokemon.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class Pokemon 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | 11 | [JsonProperty("base_experience")] 12 | public int BaseExperience { get; set; } 13 | public int Height { get; set; } 14 | 15 | 16 | [JsonProperty("is_default")] 17 | public bool IsDefault { get; set; } 18 | public int Order { get; set; } 19 | public int Weight { get; set; } 20 | public List Abilities { get; set; } 21 | public List> Forms { get; set; } 22 | 23 | 24 | [JsonProperty("game_indices")] 25 | public List GameIndices { get; set; } 26 | 27 | 28 | [JsonProperty("held_items")] 29 | public List> HeldItems { get; set; } 30 | 31 | 32 | [JsonProperty("location_area_encounters")] 33 | public List LocationAreaEncounters { get; set; } 34 | public List> Moves { get; set; } 35 | public NamedApiResource Species { get; set; } 36 | public List> Stats { get; set; } 37 | public List Types { get; set; } 38 | } 39 | } -------------------------------------------------------------------------------- /PokeApi/VersionGroup.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace PokeApi 4 | { 5 | public class VersionGroup 6 | { 7 | public int Id { get; set; } 8 | 9 | public string Name { get; set; } 10 | 11 | /// 12 | /// Order for sorting. Almost by date of release, except similar versions are grouped together. 13 | /// 14 | /// The order. 15 | public int Order { get; set; } 16 | 17 | /// 18 | /// The generation this version was introduced in. 19 | /// 20 | /// The generation. 21 | public List> Generation { get; set; } 22 | 23 | /// 24 | /// A list of methods in which Pokémon can learn moves in this version group. 25 | /// 26 | /// The move learn methods. 27 | public List> MoveLearnMethods { get; set; } 28 | 29 | /// 30 | /// The name of this version group listed in different languages. 31 | /// 32 | /// The names. 33 | public List Names { get; set; } 34 | 35 | /// 36 | /// A list of Pokédexes introduces in this version group. 37 | /// 38 | /// The pokedexes. 39 | public List> Pokedexes { get; set; } 40 | } 41 | } -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | 8 | [assembly: AssemblyTitle("Flurl-Sample")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Flurl-Sample")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | 21 | [assembly: ComVisible(false)] 22 | 23 | // The following GUID is for the ID of the typelib if this project is exposed to COM 24 | 25 | [assembly: Guid("556d7b05-77f0-4a86-ba37-e63bc4f2611c")] 26 | 27 | // Version information for an assembly consists of the following four values: 28 | // 29 | // Major Version 30 | // Minor Version 31 | // Build Number 32 | // Revision 33 | // 34 | // You can specify all the values or you can default the Build and Revision Numbers 35 | // by using the '*' as shown below: 36 | // [assembly: AssemblyVersion("1.0.*")] 37 | 38 | [assembly: AssemblyVersion("1.0.0.0")] 39 | [assembly: AssemblyFileVersion("1.0.0.0")] -------------------------------------------------------------------------------- /PokeApi/EvolutionDetail.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | 3 | namespace PokeApi 4 | { 5 | public class EvolutionDetail 6 | { 7 | public NamedApiResource Item { get; set; } 8 | public NamedApiResource Trigger { get; set; } 9 | public NamedApiResource Gender { get; set; } 10 | 11 | [JsonProperty("held_item")] 12 | public NamedApiResource HeldItem { get; set; } 13 | 14 | [JsonProperty("known_move")] 15 | public NamedApiResource KnownMove { get; set; } 16 | 17 | [JsonProperty("known_move_type")] 18 | public NamedApiResource KnownMoveType { get; set; } 19 | public NamedApiResource Location { get; set; } 20 | 21 | [JsonProperty("min_level")] 22 | public int MinLevel { get; set; } 23 | 24 | [JsonProperty("min_happiness")] 25 | public int MinHappiness { get; set; } 26 | 27 | [JsonProperty("min_beauty")] 28 | public int MinBeauty { get; set; } 29 | 30 | [JsonProperty("min_affection")] 31 | public int MinAffection { get; set; } 32 | 33 | [JsonProperty("needs_overworld_rain")] 34 | public bool NeedsOverworldRain { get; set; } 35 | 36 | [JsonProperty("party_species")] 37 | public NamedApiResource PartySpecies { get; set; } 38 | 39 | [JsonProperty("relative_physical_stats")] 40 | public int RelativePhysicalStats { get; set; } 41 | 42 | [JsonProperty("time_of_day")] 43 | public string TimeOfDay { get; set; } 44 | 45 | [JsonProperty("trade_species")] 46 | public NamedApiResource TradeSpecies { get; set; } 47 | 48 | [JsonProperty("turn_upside_down")] 49 | public bool TurnUpsideDown { get; set; } 50 | } 51 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | build/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | 28 | # MSTest test Results 29 | [Tt]est[Rr]esult*/ 30 | [Bb]uild[Ll]og.* 31 | 32 | # NUNIT 33 | *.VisualState.xml 34 | TestResult.xml 35 | 36 | # Build Results of an ATL Project 37 | [Dd]ebugPS/ 38 | [Rr]eleasePS/ 39 | dlldata.c 40 | 41 | # DNX 42 | project.lock.json 43 | artifacts/ 44 | 45 | *_i.c 46 | *_p.c 47 | *_i.h 48 | *.ilk 49 | *.meta 50 | *.obj 51 | *.pch 52 | *.pdb 53 | *.pgc 54 | *.pgd 55 | *.rsp 56 | *.sbr 57 | *.tlb 58 | *.tli 59 | *.tlh 60 | *.tmp 61 | *.tmp_proj 62 | *.log 63 | *.vspscc 64 | *.vssscc 65 | .builds 66 | *.pidb 67 | *.svclog 68 | *.scc 69 | 70 | # Chutzpah Test files 71 | _Chutzpah* 72 | 73 | # Visual C++ cache files 74 | ipch/ 75 | *.aps 76 | *.ncb 77 | *.opensdf 78 | *.sdf 79 | *.cachefile 80 | 81 | # Visual Studio profiler 82 | *.psess 83 | *.vsp 84 | *.vspx 85 | 86 | # TFS 2012 Local Workspace 87 | $tf/ 88 | 89 | # Guidance Automation Toolkit 90 | *.gpState 91 | 92 | # ReSharper is a .NET coding add-in 93 | _ReSharper*/ 94 | *.[Rr]e[Ss]harper 95 | *.DotSettings.user 96 | 97 | # JustCode is a .NET coding add-in 98 | .JustCode 99 | 100 | # TeamCity is a build add-in 101 | _TeamCity* 102 | 103 | # DotCover is a Code Coverage Tool 104 | *.dotCover 105 | 106 | # NCrunch 107 | _NCrunch_* 108 | .*crunch*.local.xml 109 | 110 | # MightyMoose 111 | *.mm.* 112 | AutoTest.Net/ 113 | 114 | # Web workbench (sass) 115 | .sass-cache/ 116 | 117 | # Installshield output folder 118 | [Ee]xpress/ 119 | 120 | # DocProject is a documentation generator add-in 121 | DocProject/buildhelp/ 122 | DocProject/Help/*.HxT 123 | DocProject/Help/*.HxC 124 | DocProject/Help/*.hhc 125 | DocProject/Help/*.hhk 126 | DocProject/Help/*.hhp 127 | DocProject/Help/Html2 128 | DocProject/Help/html 129 | 130 | # Click-Once directory 131 | publish/ 132 | 133 | # Publish Web Output 134 | *.[Pp]ublish.xml 135 | *.azurePubxml 136 | ## TODO: Comment the next line if you want to checkin your 137 | ## web deploy settings but do note that will include unencrypted 138 | ## passwords 139 | #*.pubxml 140 | 141 | *.publishproj 142 | 143 | # NuGet Packages 144 | *.nupkg 145 | # The packages folder can be ignored because of Package Restore 146 | **/packages/* 147 | # except build/, which is used as an MSBuild target. 148 | !**/packages/build/ 149 | # Uncomment if necessary however generally it will be regenerated when needed 150 | #!**/packages/repositories.config 151 | 152 | # Windows Azure Build Output 153 | csx/ 154 | *.build.csdef 155 | 156 | # Windows Store app package directory 157 | AppPackages/ 158 | 159 | # Visual Studio cache files 160 | # files ending in .cache can be ignored 161 | *.[Cc]ache 162 | # but keep track of directories ending in .cache 163 | !*.[Cc]ache/ 164 | 165 | # Others 166 | ClientBin/ 167 | [Ss]tyle[Cc]op.* 168 | ~$* 169 | *~ 170 | *.dbmdl 171 | *.dbproj.schemaview 172 | *.pfx 173 | *.publishsettings 174 | node_modules/ 175 | orleans.codegen.cs 176 | 177 | # RIA/Silverlight projects 178 | Generated_Code/ 179 | 180 | # Backup & report files from converting an old project file 181 | # to a newer Visual Studio version. Backup files are not needed, 182 | # because we have git ;-) 183 | _UpgradeReport_Files/ 184 | Backup*/ 185 | UpgradeLog*.XML 186 | UpgradeLog*.htm 187 | 188 | # SQL Server files 189 | *.mdf 190 | *.ldf 191 | 192 | # Business Intelligence projects 193 | *.rdl.data 194 | *.bim.layout 195 | *.bim_*.settings 196 | 197 | # Microsoft Fakes 198 | FakesAssemblies/ 199 | 200 | # Node.js Tools for Visual Studio 201 | .ntvs_analysis.dat 202 | 203 | # Visual Studio 6 build log 204 | *.plg 205 | 206 | # Visual Studio 6 workspace options file 207 | *.opt 208 | 209 | # LightSwitch generated files 210 | GeneratedArtifacts/ 211 | _Pvt_Extensions/ 212 | ModelManifest.xml 213 | -------------------------------------------------------------------------------- /PokeApi/Http/PokeApiClient.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Flurl; 7 | using Flurl.Http; 8 | using Newtonsoft.Json; 9 | 10 | namespace PokeApi.Http 11 | { 12 | public class PokeApiClient 13 | { 14 | const string V2Endpoint = "http://pokeapi.co/api/v2/"; 15 | 16 | public async Task GetByUrl(string url) 17 | { 18 | string endpoint; 19 | if (UrlOfType.TryGetValue(typeof(T), out endpoint)) 20 | { 21 | return await url.GetJsonAsync(); 22 | } 23 | throw new Exception("Support for " + typeof(T) + " is not implemented yet :("); 24 | } 25 | 26 | // public async Task Get(int id) 27 | // { 28 | // var a = V2Endpoint.AppendPathSegment(""); 29 | // a. 30 | // return await GetByUrl(V2Endpoint.AppendPathSegment( 31 | // } 32 | 33 | 34 | 35 | #region static Dictionary UrlOfType = new Dictionary { [...] }; 36 | static Dictionary UrlOfType = new Dictionary 37 | { 38 | // { typeof(ContestEffect ), "contest-effect" }, 39 | // { typeof(SuperContestEffect), "super-contest-effect" }, 40 | // { typeof(Characteristic ), "characteristic" }, 41 | 42 | { typeof(Berry ), "berry" }, 43 | { typeof(BerryFirmness), "berry-firmness" }, 44 | { typeof(BerryFlavor ), "berry-flavor" }, 45 | 46 | // { typeof(ContestType), "contest-type" }, 47 | 48 | { typeof(EncounterMethod ), "encounter-method" }, 49 | { typeof(EncounterCondition ), "encounter-condition" }, 50 | { typeof(EncounterConditionValue), "encounter-condition-value" }, 51 | 52 | { typeof(EvolutionChain ), "evolution-chain" }, 53 | { typeof(EvolutionTrigger), "evolution-trigger" }, 54 | 55 | { typeof(Generation ), "generation" }, 56 | { typeof(Pokedex ), "pokedex" }, 57 | { typeof(Version ), "version" }, 58 | { typeof(VersionGroup), "version-group" }, 59 | 60 | { typeof(Item ), "item" }, 61 | { typeof(ItemAttribute ), "item-attribute" }, 62 | { typeof(ItemCategory ), "item-category" }, 63 | { typeof(ItemFlingEffect), "item-fling-effect" }, 64 | { typeof(ItemPocket ), "item-pocket" }, 65 | 66 | { typeof(Move ), "move" }, 67 | // { typeof(MoveAilment ), "move-ailment" }, 68 | // { typeof(MoveBattleStyle), "move-battle-style" }, 69 | // { typeof(MoveCategory ), "move-category" }, 70 | { typeof(MoveDamageClass), "move-damage-class" }, 71 | { typeof(MoveLearnMethod), "move-learn-method" }, 72 | // { typeof(MoveTarget ), "move-target" }, 73 | 74 | { typeof(Location ), "location" }, 75 | { typeof(LocationArea), "location-area" }, 76 | { typeof(PalParkArea ), "pal-park-area" }, 77 | { typeof(Region ), "region" }, 78 | 79 | { typeof(Ability ), "ability" }, 80 | { typeof(EggGroup ), "egg-group" }, 81 | { typeof(Gender ), "gender" }, 82 | { typeof(GrowthRate ), "growth-rate" }, 83 | { typeof(Nature ), "nature" }, 84 | // { typeof(PokeathlonStat), "pokeathlon-stat" }, 85 | { typeof(Pokemon ), "pokemon" }, 86 | { typeof(PokemonColor ), "pokemon-color" }, 87 | { typeof(PokemonForm ), "pokemon-form" }, 88 | // { typeof(PokemonHabitat), "pokemon-habitat" }, 89 | { typeof(PokemonShape ), "pokemon-shape" }, 90 | { typeof(PokemonSpecies), "pokemon-species" }, 91 | { typeof(Stat ), "stat" }, 92 | { typeof(PokemonType ), "type" }, 93 | 94 | { typeof(Language), "language" } 95 | }; 96 | #endregion 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /PokeApi/PokemonSpecies.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Newtonsoft.Json; 3 | 4 | namespace PokeApi 5 | { 6 | public class PokemonSpecies 7 | { 8 | public int Id { get; set; } 9 | public string Name { get; set; } 10 | 11 | /// 12 | /// The order in which species should be sorted. Based on National Dex order, except families are grouped together and 13 | /// sorted by stage. 14 | /// 15 | /// The order. 16 | public int Order { get; set; } 17 | 18 | /// 19 | /// The chance of this Pokémon being female, in eighths; or -1 for genderless. 20 | /// 21 | /// The gender rate. 22 | 23 | [JsonProperty("gender_rate")] 24 | public int GenderRate { get; set; } 25 | 26 | /// 27 | /// The base capture rate; up to 255. The higher the number, the easier the catch. 28 | /// 29 | /// The capture rate. 30 | 31 | [JsonProperty("capture_rate")] 32 | public int CaptureRate { get; set; } 33 | 34 | /// 35 | /// The happiness when caught by a normal Pokéball; up to 255. The higher the number, the happier the Pokémon. 36 | /// 37 | /// The base happiness. 38 | 39 | [JsonProperty("base_happiness")] 40 | public int BaseHappiness { get; set; } 41 | 42 | /// 43 | /// Whether or not this is a baby Pokémon. 44 | /// 45 | /// 46 | 47 | [JsonProperty("is_baby")] 48 | public bool IsBaby { get; set; } 49 | 50 | /// 51 | /// Initial hatch counter: one must walk 255 × (hatch_counter + 1) steps before this Pokémon's egg hatches, unless 52 | /// utilizing bonuses like Flame Body's. 53 | /// 54 | 55 | [JsonProperty("hatch_counter")] 56 | public int HatchCounter { get; set; } 57 | 58 | /// 59 | /// Whether or not this Pokémon can have different genders. 60 | /// 61 | 62 | [JsonProperty("has_gender_differences")] 63 | public bool HasGenderDifferences { get; set; } 64 | 65 | /// 66 | /// Whether or not this Pokémon has multiple forms and can switch between them. 67 | /// 68 | 69 | [JsonProperty("forms_switchable")] 70 | public bool FormsSwitchable { get; set; } 71 | 72 | /// 73 | /// The rate at which this Pokémon species gains levels 74 | /// 75 | 76 | [JsonProperty("growth_rate")] 77 | public NamedApiResource GrowthRate { get; set; } 78 | 79 | /// 80 | /// A list of pokedexes and the indexes reserved within them for this Pokémon species. 81 | /// 82 | 83 | [JsonProperty("pokedex_numbers")] 84 | public List PokedexNumbers { get; set; } 85 | 86 | /// 87 | /// A list of egg groups this Pokémon species is a member of. 88 | /// 89 | 90 | [JsonProperty("egg_groups")] 91 | public List EggGroups { get; set; } 92 | 93 | /// 94 | /// The color of this Pokémon for gimmicky Pokédex search. 95 | /// 96 | /// The color. 97 | public List> Color { get; set; } 98 | 99 | /// 100 | /// The shape of this Pokémon for gimmicky Pokédex search. 101 | /// 102 | /// The color. 103 | public List> Shape { get; set; } 104 | 105 | /// 106 | /// The Pokémon species that evolves into this pokemon_species. 107 | /// 108 | 109 | [JsonProperty("evolves_from_species")] 110 | public NamedApiResource EvolvesFromSpecies { get; set; } 111 | 112 | /// 113 | /// The evolution chain this Pokémon species is a member of. 114 | /// 115 | 116 | [JsonProperty("evolution_chain")] 117 | public APIResource EvolutionChain { get; set; } 118 | 119 | /// 120 | /// The generation this Pokémon species was introduced in. 121 | /// 122 | /// The generation. 123 | public NamedApiResource Generation { get; set; } 124 | 125 | /// 126 | /// The name of this Pokémon species listed in different languages. 127 | /// 128 | /// The names. 129 | public List Names { get; set; } 130 | 131 | /// 132 | /// A list of encounters that can be had with this Pokémon species in pal park. 133 | /// 134 | /// The pal park encounters. 135 | 136 | [JsonProperty("pal_pak_encounters")] 137 | public List PalParkEncounters { get; set; } 138 | } 139 | } -------------------------------------------------------------------------------- /Flurl-Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {556D7B05-77F0-4A86-BA37-E63BC4F2611C} 8 | Exe 9 | Properties 10 | Flurl_Sample 11 | Flurl-Sample 12 | v4.5 13 | 512 14 | true 15 | False 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | packages\Newtonsoft.Json.6.0.3\lib\net45\Newtonsoft.Json.dll 46 | 47 | 48 | packages\Flurl.1.1.2\lib\portable-net40+sl50+win+wpa81+wp80+MonoAndroid10+MonoTouch10\Flurl.dll 49 | 50 | 51 | packages\Flurl.Http.0.9.0\lib\net45\Flurl.Http.dll 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 141 | 142 | 143 | 144 | --------------------------------------------------------------------------------