7 releases

new 0.1.6 Mar 18, 2025
0.1.5 May 25, 2024
0.1.4 Feb 20, 2024
0.1.3 Jan 29, 2024

#3 in #send-http

Download history 1/week @ 2024-12-05 2/week @ 2024-12-12 1/week @ 2025-02-06 69/week @ 2025-03-13

69 downloads per month

MIT license

96KB
2K SLoC

Rust bindings for the Valorant Assets API

This crate provides Rust bindings for the Valorant Assets API.

Installation

Install this crate with cargo add valorant-assets-api or add it to your Cargo.toml.

Usage

use valorant_assets_api::agents::{get_agent, get_agents};
use valorant_assets_api::models::language::Language;

#[tokio::main]
async fn main() {
    // Create a reqwest::Client, which is used to send HTTP requests.
    let client = reqwest::Client::new();

    // Get a list of agents from the Valorant API. (language is optional)
    let agents = get_agents(&client, Some(Language::DeDe), None)
        .await
        .expect("Failed to get agents");

    println!(
        "Agents: {:?}",
        agents
            .iter()
            .map(|x| x.display_name.clone())
            .collect::<Vec<_>>()
    );

    println!(
        "Single Agent: {:#?}",
        agents.first()
    );
}

Dependencies

~5–17MB
~223K SLoC