8 releases

0.2.1 Feb 8, 2024
0.2.0 Oct 19, 2023
0.1.0-beta.3 Jul 3, 2023
0.1.0-alpha.2 Jun 21, 2023

#2341 in Web programming

31 downloads per month

MIT/Apache

170KB
3K SLoC

A NationStates API in Rust.

Proud to be 100% safe. Takes full advantage of Rust's type system.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.


lib.rs:

A NationStates API wrapper that takes full advantage of Rust's type system.

Works with the current API (v12) as of 4 October 2023.

Using the library usually takes three steps:

  1. Creating a request (e.g. PublicNationRequest) with the relevant shards.
  2. Sending the request as a URL through a Client.
  3. Parsing the response using a parser in parsers.

Currently, the following requests can be formed and sent:

The following requests can be parsed:

  • Nation (some fields still being finalized)

The following functionality is planned, but is not implemented:

  • parsers for Region, World, and WA request responses
  • private shards
  • lighter-weight client using hyper
  • breaking crate into features

Examples

For a list of examples, see the examples folder on GitHub.

Dependencies

~8–21MB
~321K SLoC