#api-wrapper #tokio #async #rate-limiting #api-bindings #http-api #mc-market

yanked mcm_api_wrapper

A wrapper for MC-Market's Ultimate REST API

1.0.1 Mar 10, 2022
1.0.0 Jan 6, 2022

#111 in #rate-limiting

MIT license

44KB
867 lines

mcm_api_wrapper

GitHub license Crates.io docs.rs

An asynchronous Rust wrapper for MC-Market's HTTP API.

  • Built on reqwest/hyper - a fast and correct HTTP implementation.
  • Full coverage of the API with a fully asynchronous design using the tokio runtime.
  • Requests are queued and may be dynamically delayed to stay within rate limiting rules.

Installation & Usage

[dependencies]
mcm_api_wrapper = "1.0.1"

An extensive list of examples can be found under the /examples directory.

use mcm_rust_api_wrapper::{APIWrapper, APIToken};
...

let token = APIToken::Private(String::from("Find @ https://www.mc-market.org/account/api"));
    
let wrapper = APIWrapper::new(token).await.unwrap();
let member = wrapper.members().fetch(87939).await.unwrap();

assert_eq!("Harry", member.username());

Issues & Support

Whether you're wanting to report a bug you've come across during use of this wrapper or are seeking general help/assistance, please utilise the issues tracker and tag your issue appropriately during creation.

I try to respond to issues within a reasonable timeframe.

Dependencies

~6–20MB
~275K SLoC