Skip to content

The-ZOO-Industries/hypixel-api-wrapper-cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hypixel-cpp

Single-header C++ wrapper for Hypixel API JSON shapes tracked by HypixelDatabase/HypixelTracking.

The wrapper keeps the original JSON available while adding typed nested accessors. nlohmann/json is vendored in include/nlohmann.

#include <hypixel.hpp>

nlohmann::json response = /* API response */;
auto api = hypixel::parse_player_response(response);

auto skywars = api.player().stats().SkyWars();
double xp = skywars.skywars_experience().value_or(0.0);

Supported Wrappers

  • parse_player_response
  • parse_achievements_response
  • parse_challenges_response
  • parse_companions_response
  • parse_games_response
  • parse_guild_response
  • parse_guild_achievements_response
  • parse_guild_permissions_response
  • parse_pets_response
  • parse_quests_response
  • parse_skyblock_profile_v2_response
  • parse_skyblock_garden_response
  • parse_skyblock_bazaar_products_response
  • parse_skyblock_collections_response
  • parse_skyblock_skills_response
  • parse_skyblock_items_response

Notes

  • Accessors return lightweight views into the original nlohmann::json; keep the JSON object alive while using them.
  • Missing or mismatched scalar values return std::nullopt from .get<T>().
  • Use .value_or(default_value) for fallback values.
  • Use .raw() when you need direct access to the underlying JSON field.

About

Header-only C++ wrapper for Hypixel player API JSON responses

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors