{"id":17469496,"url":"https://github.com/mlemesle/rustemon","last_synced_at":"2025-09-07T12:32:11.736Z","repository":{"id":38328846,"uuid":"423138680","full_name":"mlemesle/rustemon","owner":"mlemesle","description":"A wrapper library for PokeApi, written in Rust","archived":false,"fork":false,"pushed_at":"2024-12-11T15:54:52.000Z","size":162,"stargazers_count":29,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-11T16:22:51.175Z","etag":null,"topics":["api","library","pokeapi","pokemon","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/mlemesle.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}},"created_at":"2021-10-31T12:14:07.000Z","updated_at":"2024-12-11T15:46:41.000Z","dependencies_parsed_at":"2024-04-30T15:53:25.315Z","dependency_job_id":"36258f25-22cc-461a-8f80-bd4682aacf42","html_url":"https://github.com/mlemesle/rustemon","commit_stats":{"total_commits":28,"total_committers":8,"mean_commits":3.5,"dds":0.5357142857142857,"last_synced_commit":"4535637e928c119b195737ed45e0e26f68f65959"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlemesle%2Frustemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlemesle%2Frustemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlemesle%2Frustemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlemesle%2Frustemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlemesle","download_url":"https://codeload.github.com/mlemesle/rustemon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232213368,"owners_count":18489543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["api","library","pokeapi","pokemon","rust"],"created_at":"2024-10-18T15:34:53.280Z","updated_at":"2025-01-02T14:49:11.369Z","avatar_url":"https://github.com/mlemesle.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rustemon [![Latest Version]][crates.io]\n\n[Latest Version]: https://img.shields.io/crates/v/rustemon.svg\n[crates.io]: https://crates.io/crates/rustemon\n\nThis library is a wrapper for the awesome [PokeApi](https://pokeapi.co), which provides all the informations you need about Pokémons !\n\nFully written in Rust, this library covers the whole PokeApi REST api v2.\n\n### How to import it ?\n\nAdds the following in the dependencies of your Cargo.toml :\n\n```toml\nrustemon = \"4.0.0\" \n```\n\n### How to use it ?\n\nAs you noticed in [the documentation of PokeApi](https://pokeapi.co/docs/v2), every endpoints and models are declared in groups.\n\nThe library kept this group oriented architecture !\n\n### Features\n\nTo support easier export to other tooling and libraries, the `serialize` feature enables PokeApi structs to be compiled with `serde::Serialize`.\nThis feature is disabled by default.\n\n```toml\n[dependencies]\nrustemon = { version = \"*\", features = [\"serialize\"] } \n```\n\n##### Models\n\nAll the models are located into the following module :\n\n```rust\nrustemon::model\n```\n\nFor example, if you want the type `Pokemon` located in the group `pokemon`, it is located here :\n\n```rust\nrustemon::model::pokemon::Pokemon\n```\n\n##### Endpoints\n\nThe endpoints follow the same naming rule, for example, if you want to call the evolution chain \nendpoint from the evolution group :\n\n```rust\nrustemon::evolution::evolution_chain\n```\n\nFor each endpoints, 4 functions are defined :\n\n* get_page : without parameters, calls the endpoint without any informations to retrieve the first page of the paginated response for the endpoint, as defined [here](https://pokeapi.co/docs/v2#resource-listspagination-section),\n* get_page_with_param : allows you to modify the parameters for the paginated query,\n* get_by_id : calls the endpoint using the id of the targeted resource,\n* get_by_name : calls the endpoint using the name of the targeted resource.\n\nThe endpoints are all async ! Which means you NEED to add a async runtime (such as tokio for example), in order for \nthe library to work.\n\n### Caching\n\nAll calls to the API are cached by a middleware attached to the [RustemonClient](/src/client.rs) you need to instanciate in order\nto make calls to the PokeAPI.\n\n### Examples\n\nExamples and use cases are available in the `examples` folder. For instance, you can run the `async_follow` example using \n\n```bash\ncargo run --example async_follow\n```\n\n### License\n\nThe license of the library can be found [here](/LICENSE).\n  \n### Contribution\n\nIf you find any bug or improvement that you find valuable, please fill an issue right there -\u003e [project issues](https://github.com/mlemesle/rustemon/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlemesle%2Frustemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlemesle%2Frustemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlemesle%2Frustemon/lists"}