{"id":50870825,"url":"https://github.com/chnapy/pokeapi.models","last_synced_at":"2026-06-15T05:02:49.415Z","repository":{"id":354006200,"uuid":"1221533821","full_name":"Chnapy/PokeApi.Models","owner":"Chnapy","description":"Auto generated C# models for pokeapi.co data","archived":false,"fork":false,"pushed_at":"2026-06-01T11:01:33.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T13:04:50.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://nuget.org/packages/PokeApi.Models","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Chnapy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-26T10:47:45.000Z","updated_at":"2026-06-01T11:01:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"33729d94-9483-4fb2-916e-d7de5d5724af","html_url":"https://github.com/Chnapy/PokeApi.Models","commit_stats":null,"previous_names":["chnapy/pokeapi.models"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Chnapy/PokeApi.Models","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2FPokeApi.Models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2FPokeApi.Models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2FPokeApi.Models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2FPokeApi.Models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Chnapy","download_url":"https://codeload.github.com/Chnapy/PokeApi.Models/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Chnapy%2FPokeApi.Models/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34348292,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-15T05:02:44.739Z","updated_at":"2026-06-15T05:02:49.410Z","avatar_url":"https://github.com/Chnapy.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PokeApi.Models\n\nC# models for [PokéAPI](https://pokeapi.co/) data, to be used with:\n\n- REST API with https://pokeapi.co endpoints,\n- files data with https://github.com/PokeApi/api-data JSON files\n\n[![NuGet](https://img.shields.io/nuget/v/PokeApi.Models.svg)](https://www.nuget.org/packages/PokeApi.Models)\n[![Target Frameworks](https://img.shields.io/badge/.NET-8%20%7C%209%20%7C%2010-512BD4)](https://dotnet.microsoft.com)\n\nPackage is published automatically whenever the upstream [PokeAPI/api-data](https://github.com/PokeAPI/api-data) repository is updated. The package is always in sync with the latest schemas.\n\n---\n\n## Usage\n\n```sh\ndotnet add package PokeApi.Models\n```\n\n### Deserializing an API response\n\n```csharp\nusing System.Net.Http.Json;\nusing PokeApi.Models;\n\nvar http = new HttpClient { BaseAddress = new Uri(\"https://pokeapi.co\") };\n\n// Fetch a single Pokémon by id or name\nvar pokemon = await http.GetFromJsonAsync\u003cPokemon\u003e(\n    Pokemon.RestEndpoint.Replace(\"{id}\", \"pikachu\")\n);\n\nConsole.WriteLine(pokemon?.Name);        // \"pikachu\"\nConsole.WriteLine(pokemon?.BaseExperience); // 112\n```\n\n### Deserializing an JSON data\n\n```csharp\nusing PokeApi.Models;\n\nvar pokemon = JsonSerializer.Deserialize\u003cPokemon\u003e(\n    Path.Combine(\"../pokeapi/api-data/data\", Pokemon.FileEndpoint)\n);\n\n// or using JsonTypeInfo from PokeApiJsonContext\nvar pokemon = JsonSerializer.Deserialize(\n    Path.Combine(\"../pokeapi/api-data/data\", Pokemon.FileEndpoint),\n    PokeApiJsonContext.Default.Pokemon\n);\n\nConsole.WriteLine(pokemon?.Name);        // \"pikachu\"\nConsole.WriteLine(pokemon?.BaseExperience); // 112\n```\n\n### Using the Endpoint constant\n\nEach class exposes endpoints that reflect PokeAPI URL and paths patterns:\n\n```csharp\n// File endpoint\nConsole.WriteLine(Version.FileEndpoint);    // \"/api/v2/version/$id/index.json\"\n// List file endpoint\nConsole.WriteLine(Version.FileEndpointList);    // \"/api/v2/version/index.json\"\n\n// REST endpoint\nConsole.WriteLine(Version.RestEndpoint);    // \"/api/v2/version/{id}/\"\n// List REST endpoint\nConsole.WriteLine(Version.RestEndpointList);    // \"/api/v2/version/\"\n\n// Build a URL\nvar url = $\"https://pokeapi.co{Version.RestEndpoint}\".Replace(\"{id}\", \"cheri\");\n// Build a file path\nvar url = $\"./pokeapi/api-data/data{Version.FileEndpoint}\".Replace(\"$id\", \"cheri\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchnapy%2Fpokeapi.models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchnapy%2Fpokeapi.models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchnapy%2Fpokeapi.models/lists"}