{"id":17223119,"url":"https://github.com/daboross/rust-screeps-api","last_synced_at":"2025-04-14T00:18:48.766Z","repository":{"id":47192301,"uuid":"83096169","full_name":"daboross/rust-screeps-api","owner":"daboross","description":"Rust library wrapping the https://screeps.com API","archived":false,"fork":false,"pushed_at":"2022-06-16T13:22:06.000Z","size":772,"stargazers_count":18,"open_issues_count":6,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T14:21:25.136Z","etag":null,"topics":[],"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/daboross.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-25T01:07:14.000Z","updated_at":"2024-02-15T10:48:31.000Z","dependencies_parsed_at":"2022-09-01T17:32:28.286Z","dependency_job_id":null,"html_url":"https://github.com/daboross/rust-screeps-api","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Frust-screeps-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Frust-screeps-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Frust-screeps-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daboross%2Frust-screeps-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daboross","download_url":"https://codeload.github.com/daboross/rust-screeps-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799984,"owners_count":21163404,"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":[],"created_at":"2024-10-15T04:07:25.564Z","updated_at":"2025-04-14T00:18:48.725Z","avatar_url":"https://github.com/daboross.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"rust-screeps-api\n================\n[![Linux Build Status][travis-image]][travis-builds]\n[![Windows Build Status][appveyor-image]][appveyor-builds]\n\nA Rust library for using the [Screeps] HTTP API.\n\nScreeps is a true programming MMO where users uploading JavaScript code to power their online empires.\n`rust-screeps-api` can connect to the [official server][screeps], and any [private server][screeps-os] instances run by\nusers.\n\n`rust-screeps-api` uses [hyper] to run http requests and [serde] to parse json results.\n\n## Usage\n\n```rust\nextern crate screeps_api;\n\nuse screeps_api::SyncApi;\n\nlet mut api = SyncApi::new().unwrap();\n\napi.login(\"username\", \"password\").unwrap();\n\nlet my_info = api.my_info().unwrap();\n\nprintln!(\"Logged in with user ID {}!\", my_info.user_id);\n```\n\nDocumentation is located at https://docs.rs/screeps-api/.\n\nUnofficial API documentation for:\n- HTTP endpoints at https://github.com/screepers/python-screeps/blob/master/docs/Endpoints.md.\n- Websocket endpoints at https://github.com/daboross/rust-screeps-api/blob/master/protocol-docs/websocket.md\n\n## What's implemented\n\n- Logging in\n- Getting all leaderboard information\n- Getting room terrain\n- Checking room status\n- Getting room overview info\n- Getting logged in user's info\n- Getting rooms where PvP recently occurred\n- Websocket connections:\n  - Getting user CPU and Memory usage each tick\n  - Getting a map overview of a room\n  - Getting new message notifications\n  - Getting console messages\n  - Parts of getting room detailed updates\n    - Almost all room objects are parsed\n    - Flags are parsed\n    - RoomVisuals are not parsed\n\n### What isn't implemented\n\n- Market API\n- Messaging API\n- Detailed user information API\n- Game manipulation API\n- Room history API\n- Parsing room visuals in room socket updates.\n\n## Testing\n\n`rust-screeps-api` has both unit tests for parsing sample results from each endpoint, and integration tests which make calls to the official server.\n\nEnvironmental variables used when testing:\n- SCREEPS_API_USERNAME: the username to log in with for doing authenticated tests\n- SCREEPS_API_PASSWORD: the password to login with for doing authenticated tests\n- All variables can also be placed into a `.env` file (parsed using the `dotenv` crate)\n\nUse:\n- `cargo test` to perform all tests, including calls to https://screeps.com with provided login details.\n- `cargo test parse` to only perform parsing unit tests. This can be performed offline.\n- `cargo test -- --skip auth` to test both parsing and all unauthenticated calls to the official server.\n\n## Updating / Contributing\n\nTo keep working, this library needs to be periodically updated to match the\nscreeps protocools. Since I might not be doing the updating, I've written up\nsome barebone notes on how to do that at [CONTRIBUTING.md]\n\n[travis-image]: https://travis-ci.org/daboross/rust-screeps-api.svg?branch=master\n[travis-builds]: https://travis-ci.org/daboross/rust-screeps-api\n[appveyor-image]: https://ci.appveyor.com/api/projects/status/github/daboross/rust-screeps-api?branch=master\u0026svg=true\n[appveyor-builds]: https://ci.appveyor.com/project/daboross/rust-screeps-api\n[screeps]: https://screeps.com\n[screeps-os]: https://github.com/screeps/screeps/\n[hyper]: https://github.com/hyperium/hyper/\n[serde]: https://github.com/serde-rs/json/\n[`serde_json::Value`]: https://docs.serde.rs/serde_json/value/enum.Value.html\n[CONTRIBUTING.md]: https://github.com/daboross/rust-screeps-api/blob/master/CONTRIBUTING.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaboross%2Frust-screeps-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaboross%2Frust-screeps-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaboross%2Frust-screeps-api/lists"}