Skip to content

anthonytam/ironforge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ironforge

A rust implementation of the Battle.NET API.

Implemented APIs

General API Features

  • Proper error management
  • US/EU/KR/TW region API endpoints
  • CN region API endpoints
  • Namespace identification
  • Locale identification

BattleNet OAuth API

  • All regions except CN
  • CN region endpoint

World of Warcraft API

52/53 APIs Implemented Game Data API:
  • Achievements
  • Auction House
  • Azerite Essence
  • Connected Realm
  • Covenant
  • Creature
  • Guild Crest
  • Heirloom
  • Item
  • Journal
  • Media Search
  • Modified Crafting
  • Mount
  • Mythic Keystone Affix
  • Mythic Keystone Dungeon
  • Mythic Keystone Leaderboard
  • Mythic Raid Leaderboard
  • Pet
  • Playable Class
  • Playable Race
  • Playable Specialization
  • Power Type
  • Profession
  • PvP Season
  • PvP Tier
  • Quest
  • Realm
  • Region
  • Reputations
  • Spell
  • Talent
  • Tech Talent
  • Title
  • Toy
  • Wow Token

Profile Data API:

  • Account Profile
  • Character Achievements
  • Character Appearance
  • Character Collections
  • Character Encounters
  • Character Equipment
  • Character Hunter Pets
  • Character Media
  • Character Mythic Keystone Profile
  • Character Professions
  • Character Profile
  • Character PvP
  • Character Quests
  • Character Reputations
  • Character Soulbinds
  • Character Specializations
  • Character Statistics
  • Character Titles
  • Guild

World of Warcraft Classic API

0/23 APIs Implemented Game Data API:
  • Auction House
  • Connected Realm
  • Creature
  • Guild Crest
  • Item
  • Media Search
  • Playable Class
  • Playable Race
  • Power Type
  • PvP Season
  • Realm
  • Region
  • Wow Token

Profile Data API:

  • Account Profile
  • Character Achievements
  • Character Appearance
  • Character Equipment
  • Character Hunter Pets
  • Character Media
  • Character Profile
  • Character PvP
  • Character Specializations
  • Character Statistics
  • Guild

Diablo III API

0/8 APIs Implemented

Hearthstone API

0/4 APIs Implemented

StarCraft II API

0/5 APIs Implemented

Tracing & Logging

Ironforge uses the tracing ecosystem for structured, async-aware logging. This provides:

  • Detailed logs for all API requests, responses, and errors
  • Spans for token refresh, deserialization, and request coordination
  • Configurable log levels (info, debug, warn, error, trace)
  • Easy integration with tracing-subscriber for console, file, or JSON output

Enabling Tracing

You can enable tracing on the Blizzard API client using the builder:

use ironforge::api_client::{BlizzardAPIClientBuilder, Region, Locale};
use tracing::Level;

let client = BlizzardAPIClientBuilder::new()
    .client_id("your_client_id")
    .client_secret("your_client_secret")
    .region(Region::US)
    .locale(Locale::en_US)
    .enable_tracing(true)
    .tracing_level(Level::DEBUG)
    .build()
    .expect("Failed to build client");

Initializing Tracing

Before making requests, initialize a tracing subscriber in your main function:

use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};

fn main() {
    tracing_subscriber::registry()
        .with(tracing_subscriber::EnvFilter::new(
            std::env::var("RUST_LOG").unwrap_or_else(|_| "ironforge=info".into()),
        ))
        .with(tracing_subscriber::fmt::layer())
        .init();
    // ...
}

You can control log verbosity with the RUST_LOG environment variable:

RUST_LOG=ironforge=debug cargo run

What Gets Logged?

  • All API requests (endpoint, namespace, status, errors)
  • Token refresh operations
  • Deserialization attempts and results
  • All errors, with context

Example Output

INFO  ironforge::api_client > Sending API request to endpoint: /data/wow/realm/area-52
DEBUG ironforge::api_client > Making HTTP request to: https://us.api.blizzard.com/data/wow/realm/area-52?locale=en_US
INFO  ironforge::api_client > API request completed successfully with status: 200

See the api_client and world_of_warcraft modules for more details on what is traced.

About

A rust wrapper for the Battle.NET API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages