A complete, rate-limiting, asynchronous Rust wrapper of the Hypixel Public API with extensive SkyBlock support

Overview

rs-pixel   Build Status Latest Version Discord

A complete, rate-limiting, asynchronous Rust implementation of the Hypixel Public API with extensive SkyBlock support.

[dependencies]
rs-pixel = "0.1.0"

Getting started

You will need a Hypixel Api Key to access most endpoints (official documentation).

Creating an Instance

Use the default configuration

let mut api = RsPixel::new("API KEY").await.unwrap();

Or configure the client, Minecraft username/UUID API type, and the rate limit strategy

let config = ConfigBuilder::default()
    .client(surf::Config::new().try_into().unwrap())
    .minecraft_api_type(ApiType::PlayerDb)
    .rate_limit_strategy(RateLimitStrategy::Error)
    .into();
let mut api = RsPixel::from_config("API KEY", config).await.unwrap();

Examples

Print a player's name and rank

let response = api.get_player_by_username("USERNAME").await.unwrap();

println!(
    "{} has the {} rank",
    response.get_name().unwrap(),
    response.get_rank()
);

Print a skyblock player's statistics

let response = api.get_skyblock_profiles_by_name("USERNAME").await.unwrap();
let profile = response.get_last_played_profile().unwrap();

println!(
    "Enderman Slayer XP: {}\nCombat Skill Level: {}\nCatacombs LeveL: {}",
    profile.get_slayer("enderman").unwrap().current_exp,
    profile.get_skill("combat").unwrap().level,
    profile.get_catacombs().unwrap().level
);

Print a skyblock player's inventory contents (NBT parsed to JSON)

let response = api.get_skyblock_profiles_by_uuid("uuid").await.unwrap();
let profile = response.get_last_played_profile().unwrap();

println!("Inventory Contents:  {}", profile.get_inventory().unwrap());

Get the first page and print the first auction

let response = api.get_skyblock_auctions(0).await.unwrap();
let auction = response.auctions.get(0).unwrap();

println!(
    "The starting bid for a {} is {} coins",
    auction.item_name, auction.starting_bid
);

Todo

  • Documentation
  • More examples

License & Contributing

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

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

Comments
  • Update Rust crate serde to 1.0.147

    Update Rust crate serde to 1.0.147

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde (source) | dependencies | patch | 1.0.146 -> 1.0.147 |


    Release Notes

    serde-rs/serde

    v1.0.147

    Compare Source

    • Add serde::de::value::EnumAccessDeserializer which transforms an EnumAccess into a Deserializer (#​2305)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate base64 to 0.13.1

    Update Rust crate base64 to 0.13.1

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | base64 | dependencies | patch | 0.13.0 -> 0.13.1 |


    Release Notes

    marshallpierce/rust-base64

    v0.13.1

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde to 1.0.146

    Update Rust crate serde to 1.0.146

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde (source) | dependencies | patch | 1.0.145 -> 1.0.146 |


    Release Notes

    serde-rs/serde

    v1.0.146

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde_json to 1.0.87

    Update Rust crate serde_json to 1.0.87

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde_json | dependencies | patch | 1.0.86 -> 1.0.87 |


    Release Notes

    serde-rs/json

    v1.0.87

    Compare Source

    • Add write_i128 and write_u128 methods to serde_json::Formatter to control the formatting of 128-bit integers (#​940, thanks @​Lucretiel)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde_json to 1.0.86

    Update Rust crate serde_json to 1.0.86

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde_json | dependencies | patch | 1.0.85 -> 1.0.86 |


    Release Notes

    serde-rs/json

    v1.0.86

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde to 1.0.145

    Update Rust crate serde to 1.0.145

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde (source) | dependencies | patch | 1.0.144 -> 1.0.145 |


    Release Notes

    serde-rs/serde

    v1.0.145

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde_json to 1.0.85

    Update Rust crate serde_json to 1.0.85

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde_json | dependencies | patch | 1.0.83 -> 1.0.85 |


    Release Notes

    serde-rs/json

    v1.0.85

    Compare Source

    • Make Display for Number produce the same representation as serializing (#​919)

    v1.0.84

    Compare Source

    • Make Debug impl of serde_json::Value more compact (#​918)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde to 1.0.144

    Update Rust crate serde to 1.0.144

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde (source) | dependencies | patch | 1.0.143 -> 1.0.144 |


    Release Notes

    serde-rs/serde

    v1.0.144

    Compare Source

    • Change atomic ordering used by Serialize impl of atomic types to match ordering used by Debug impl of those same types (#​2263, thanks @​taiki-e)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde to 1.0.143

    Update Rust crate serde to 1.0.143

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde (source) | dependencies | patch | 1.0.142 -> 1.0.143 |


    Release Notes

    serde-rs/serde

    v1.0.143

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate chrono to 0.4.20 - autoclosed

    Update Rust crate chrono to 0.4.20 - autoclosed

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | chrono | dependencies | patch | 0.4.19 -> 0.4.20 |


    Release Notes

    chronotope/chrono

    v0.4.20

    • Add more formatting documentation and examples.
    • Add support for microseconds timestamps serde serialization/deserialization (#​304)
    • Fix DurationRound is not TZ aware (#​495)
    • Implement DurationRound for NaiveDateTime
    • Implement std::iter::Sum for Duration
    • Add DateTime::from_local() to construct from given local date and time (#​572)
    • Add a function that calculates the number of years elapsed between now and a given Date or DateTime (#​557)
    • Correct build for wasm32-unknown-emscripten target (#​568)
    • Change Local::now() and Utc::now() documentation from "current date" to "current date and time" (#​647)
    • Fix duration_round panic on rounding by Duration::zero() (#​658)
    • Add optional rkyv support.
    • Add support for microseconds timestamps serde serialization for NaiveDateTime.
    • Add support for optional timestamps serde serialization for NaiveDateTime.
    • Fix build for wasm32-unknown-emscripten (@​yu-re-ka #​593)
    • Make ParseErrorKind public and available through ParseError::kind() (#​588)
    • Implement DoubleEndedIterator for NaiveDateDaysIterator and NaiveDateWeeksIterator
    • Fix panicking when parsing a DateTime (@​botahamec)
    • Add support for getting week bounds based on a specific NaiveDate and a Weekday (#​666)
    • Remove libc dependency from Cargo.toml.
    • Add the and_local_timezone method to NaiveDateTime
    • Fix the behavior of Duration::abs() for negative durations with non-zero nanos
    • Add compatibility with rfc2822 comments (#​733)
    • Make js-sys and wasm-bindgen enabled by default when target is wasm32-unknown-unknown for ease of API discovery
    • Add the Months struct and associated Add and Sub impls

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde_json to 1.0.83

    Update Rust crate serde_json to 1.0.83

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde_json | dependencies | patch | 1.0.82 -> 1.0.83 |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate base64 to 0.20.0

    Update Rust crate base64 to 0.20.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | base64 | dependencies | minor | 0.13.1 -> 0.20.0 |


    Release Notes

    marshallpierce/rust-base64

    v0.20.0

    Compare Source

    Breaking changes
    • Update MSRV to 1.57.0
    • Decoding can now either ignore padding, require correct padding, or require no padding. The default is to require correct padding.
      • The NO_PAD config now requires that padding be absent when decoding.

    0.20.0-alpha.1

    Breaking changes
    • Extended the Config concept into the Engine abstraction, allowing the user to pick different encoding / decoding implementations.
      • What was formerly the only algorithm is now the FastPortable engine, so named because it's portable (works on any CPU) and relatively fast.
      • This opens the door to a portable constant-time implementation (#​153, presumably ConstantTimePortable?) for security-sensitive applications that need side-channel resistance, and CPU-specific SIMD implementations for more speed.
      • Standard base64 per the RFC is available via DEFAULT_ENGINE. To use different alphabets or other settings (padding, etc), create your own engine instance.
    • CharacterSet is now Alphabet (per the RFC), and allows creating custom alphabets. The corresponding tables that were previously code-generated are now built dynamically.
    • Since there are already multiple breaking changes, various functions are renamed to be more consistent and discoverable.
    • MSRV is now 1.47.0 to allow various things to use const fn.
    • DecoderReader now owns its inner reader, and can expose it via into_inner(). For symmetry, EncoderWriter can do the same with its writer.
    • encoded_len is now public so you can size encode buffers precisely.

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde to 1.0.151

    Update Rust crate serde to 1.0.151

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde (source) | dependencies | patch | 1.0.147 -> 1.0.151 |


    Release Notes

    serde-rs/serde

    v1.0.151

    Compare Source

    • Update serde::{ser,de}::StdError to re-export core::error::Error when serde is built with feature="std" off and feature="unstable" on (#​2344)

    v1.0.150

    Compare Source

    • Relax some trait bounds from the Serialize impl of HashMap and BTreeMap (#​2334)
    • Enable Serialize and Deserialize impls of std::sync::atomic types on more platforms (#​2337, thanks @​badboy)

    v1.0.149

    Compare Source

    • Relax some trait bounds from the Serialize impl of BinaryHeap, BTreeSet, and HashSet (#​2333, thanks @​jonasbb)

    v1.0.148

    Compare Source

    • Support remote derive for generic types that have private fields (#​2327)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Update Rust crate serde_json to 1.0.91

    Update Rust crate serde_json to 1.0.91

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | serde_json | dependencies | patch | 1.0.87 -> 1.0.91 |


    Release Notes

    serde-rs/json

    v1.0.91

    Compare Source

    • Opt out of -Zrustdoc-scrape-examples on docs.rs for now

    v1.0.90

    Compare Source

    • Documentation improvements

    v1.0.89

    Compare Source

    • Fix invalid JSON incorrectly accepted when a large number has no digits after decimal point (#​953)

    v1.0.88

    Compare Source

    • Optimize serde_json::Map's implementation of append and clone_from (#​952, thanks @​Lucretiel)

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    cargo
    Cargo.toml
    • surf 2.3.2
    • serde_json 1.0.87
    • serde 1.0.147
    • lazy_static 1.4.0
    • hematite-nbt 0.5.2
    • base64 0.13.1
    github-actions
    .github/workflows/ci.yml
    • actions/checkout v3

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Owner
null
The Rust API client for KittyCAD.

kittycad.rs The Rust API client for KittyCAD. Rust docs KittyCAD API Docs Generating You can trigger a build with the GitHub action to generate the cl

KittyCAD 5 Jan 2, 2023
Image processing proxy and API, created to allow faster media delivery for the Holaplex storefront.

Description imgopt is an image processing proxy with a very simple API, created to download and dynamically scaledown, convert, and cache different me

Holaplex 5 Nov 3, 2022
Simple image resizer/cropper API

Simple image resizer/cropper API. This is a Rust ?? port of the following article on the Deno Blog: Build a Simple Image Resizing API in less than 100

Enrique Mejías 5 Mar 2, 2023
A Rust library for calculating perceptual hash values of images

img_hash Now builds on stable Rust! (But needs nightly to bench.) A library for getting perceptual hash values of images. Thanks to Dr. Neal Krawetz f

Austin Bonander 264 Dec 9, 2022
Encoding and decoding images in Rust

Image Maintainers: @HeroicKatora, @fintelia How to contribute An Image Processing Library This crate provides basic image processing functions and met

image-rs 3.5k Jan 9, 2023
Rust bindings for OpenCV 3 & 4

Rust OpenCV bindings Experimental Rust bindings for OpenCV 3 and 4. The API is usable, but unstable and not very battle-tested; use at your own risk.

null 1.2k Dec 30, 2022
A simple steganography library written in rust

steganography A stable steganography library written in rust Crates.io Usage Add the following to the Cargo.toml in your project: [dependencies] stega

Teodor Voinea 79 Dec 9, 2022
Zero dependency images (of chaos) in Rust

bifurcate-rs Zero dependency images (of chaos) in Rust To run: time cargo run --release > img.pgm To convert from PGM to PNG using Image Magick: conve

Stephen Merity 32 Nov 17, 2021
tai (Terminal Ascii Image) tool to convert images to ascii written in Rust

TAI Terminal Ascii Image A tool to convert images to ascii art written in Rust ?? Notes This tool is still in development stage. Contributions All Con

Mustafa Salih 258 Dec 5, 2022
🎨 Example-based texture synthesis written in Rust 🦀

?? texture-synthesis A light Rust API for Multiresolution Stochastic Texture Synthesis [1], a non-parametric example-based algorithm for image generat

Embark 1.7k Dec 31, 2022
Face detection library for the Rust programming language

Rustface SeetaFace detection library for the Rust programming language Example of demo program output SEETAFACE C++ – Github repository for the origin

Andrei Tomashpolskiy 323 Dec 27, 2022
Rust CV mono-repo

Rust CV Rust CV is a project to implement computer vision algorithms, abstractions, and systems in Rust. #[no_std] is supported where possible. Docume

Rust Computer Vision 429 Dec 29, 2022
Visual Odometry in Rust (vors)

Visual Odometry in Rust (vors) This repository provides both a library ("crate" as we say in Rust) named visual-odometry-rs, (shortened vors) and a bi

Matthieu Pizenberg 42 Dec 29, 2022
A Telegram Bot written in Rust to Track new Github releases

Release Tracker This is used to track Releases posted on GitHub Releases and Post it on a Telegram Channel/Group. Setup Export env variables or just f

Kartikeya Hegde 20 Jul 7, 2022
A Simple-to-use, cross-platform Rust Webcam Capture Library

Cross Platform Rust Library for powerful Webcam Capture and Virtual Webcams

null 246 Jan 8, 2023
Classical Rainbow Triangle using Rust and Vulkan via vulkano bindings

Vulkano Rainbow Triangle Classical Rainbow Triangle using Rust and Vulkan via vulkano bindings. Based on the vulkano triangle example Quick Start $ ca

Tsoding 14 Dec 30, 2022
A simple image average color extractor written in 🦀 Rust

A simple image average color extractor written in ?? Rust

Victor Aremu 3 Sep 23, 2021
A simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art version constructed with emoji

EmojiPix This is a simple command-line utility (and Rust crate!) for converting from a conventional image file (e.g. a PNG file) into a pixel-art vers

Michael Milton 22 Dec 6, 2022
Silicon is an alternative to Carbon implemented in Rust.

Silicon is an alternative to Carbon implemented in Rust.

Aloxaf 2.3k Dec 27, 2022