{"id":22971486,"url":"https://github.com/ankddev/codewars-api-rs","last_synced_at":"2026-02-10T21:01:48.598Z","repository":{"id":265879593,"uuid":"896795429","full_name":"ankddev/codewars-api-rs","owner":"ankddev","description":"A Rust crate for interacting with the Codewars API","archived":false,"fork":false,"pushed_at":"2025-02-10T12:39:34.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T05:49:25.085Z","etag":null,"topics":["api","codewars","rest-api","rust","rust-lang"],"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/ankddev.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":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-01T10:31:16.000Z","updated_at":"2025-02-10T12:39:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"86534d5e-efa6-4f6e-b546-701674c11556","html_url":"https://github.com/ankddev/codewars-api-rs","commit_stats":null,"previous_names":["ankddev/codewars-api-rs"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ankddev/codewars-api-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fcodewars-api-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fcodewars-api-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fcodewars-api-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fcodewars-api-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ankddev","download_url":"https://codeload.github.com/ankddev/codewars-api-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ankddev%2Fcodewars-api-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29316368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","codewars","rest-api","rust","rust-lang"],"created_at":"2024-12-14T22:17:51.540Z","updated_at":"2026-02-10T21:01:48.568Z","avatar_url":"https://github.com/ankddev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003ecodewars-api-rs\u003c/h1\u003e\n\u003ch6 align=\"center\"\u003eFull-featured crate to interact with Codewars API. Check \u003ca href=\"https://dev.codewars.com/\"\u003eofficial documentation\u003c/a\u003e for more information about API.\u003c/h6\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://crates.io/crates/codewars-api\"\u003e\u003cimg src=\"https://img.shields.io/crates/d/codewars-api\" alt=\"crates.io downloads\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/codewars-api\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/codewars-api\"/\u003e\u003c/a\u003e\n    \u003ca href=\"https://docs.rs/codewars-api/latest/codewars_api\"\u003e\u003cimg src=\"https://docs.rs/codewars-api/badge.svg\"/\u003e\u003c/a\u003e\n    \u003cimg alt=\"GitHub commit activity\" src=\"https://img.shields.io/github/commit-activity/w/ankddev/codewars-api-rs\"\u003e\n    \u003ca href=\"https://github.com/ankddev/codewars-api-rs/actions/workflows/test.yml\"\u003e\u003cimg src=\"https://github.com/ankddev/codewars-api-rs/actions/workflows/test.yml/badge.svg\" alt=\"Test status\"/\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003e [!NOTE]\n\u003e At this moment, Codewars API is [minimal and inconsistent](https://dev.codewars.com/#introduction).\n\u003e So, you can't to do some things with API and this crate\n\n# Features\n- [x] Interact with the Codewars REST API\n    - [x] Get user info\n    - [x] Get list of completed challenges\n    - [x] Get list of authored challenges\n    - [x] Get kata info\n- [ ] Interact with the Codewars API using webhooks\n# Installing\nYou can install this crate from Crates.io using Cargo:\n```shell\n$ cargo add codewars-api\n```\n# Usage\nAt this moment only REST API is supported, webhook support will be added in the future.\nImport it in your project:\n```rust\nuse codewars_api::rest_api::client::RestCodewarsClient;\n```\nThen, initialize the client:\n```rust\nlet client = RestCodewarsClient::new();\n```\nAnd you can use methods of client:\n```rust\nlet user = client.get_user(\"username\").await.unwrap();\nlet challenges = client.get_completed_challenges(\"username\", 1).await.unwrap();\n```\n\u003e [!TIP]\n\u003e If you want to use it in `main` function you should install `tokio`\n\u003e ```shell\n\u003e $ cargo add tokio\n\u003e ```\n\u003e And then you can use it in `main` function:\n\u003e ```rust\n\u003e use tokio;\n\u003e use codewars_api::rest_api::client::RestCodewarsClient;\n\u003e\n\u003e #[tokio::main]\n\u003e async fn main() {\n\u003e     let client = RestCodewarsClient::new();\n\u003e     let user = client.get_user(\"username\").await.unwrap();\n\u003e     let challenges = client.get_completed_challenges(\"username\", 1).await.unwrap();\n\u003e }\n\u003e ```\n# Documentation\nDocumentation for this crate can be found at [docs.rs](https://docs.rs/codewars-api/latest/codewars_api)\nAlso, you can see examples of using this crate in [examples](./examples). To run example clone this repo and run this:\n```shell\n$ cargo run --example \u003cexample_name\u003e\n```\nFor example:\n```shell\n$ cargo run --example print_name\n```\n# See Also\n- [conemu-progressbar-go](https://github.com/ankddev/conemu-progressbar-go) - Progress bar for ConEmu for Go\n- [envfetch](https://github.com/ankddev/envfetch) - Lightweight crossplatform CLI tool for working with environment variables\n- [terminal-go](https://github.com/ankddev/terminal-go) - Go library for working with ANSI/VT terminal sequences\n- [zapret-discord-youtube](https://github.com/ankddev/zapret-discord-youtube) - Zapret build for Windows for fixing Discord and YouTube in Russia or othher services\n# Contributing\nFirstly, you should install [Git](https://git-scm.com/download) and [Rust](https://www.rust-lang.org/tools/install).\n* Create fork of this repo by pressing button on the top of this page.\n* Clone your fork\n```shell\n$ git clone https://github.com/username/codewars-api-rs.git\n```\n* Go to directory where you cloned repo\n```shell\n$ cd codewars-api-rs\n```\n* Create new branch\n* Make your changes\n* Run tests:\n```shell\n$ cargo test\n```\n* [Write tests and documentation for your changes](#writing-tests)\n* Format and lint code:\n```shell\n$ cargo fmt\n$ cargo clippy\n```\n* Commit changes\n* Create PR\n## Writing tests\nYou can learn more about writing tests in the [official documentation](https://doc.rust-lang.org/book/ch11-01-writing-tests.html).\nWe test all methods of `RestCodewarsClient` struct in [doctests](https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html).\nAt this moment, we don't use mock in doctests, so you should add `no_run` attribute for doctests, like this:\n\n    # Examples\n    ```no_run\n    use codewars_api::rest_api::client::RestCodewarsClient;\n    ...\n    ```\n\nIn unit tests we use `mockito` library for mock testing. See [it's official documentation](https://docs.rs/mockito/latest/mockito/) for more information. Mocks are stored in `tests/mocks` directory. All mocks are from Codewars documentation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankddev%2Fcodewars-api-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fankddev%2Fcodewars-api-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fankddev%2Fcodewars-api-rs/lists"}