Giter Club home page Giter Club logo

starrailapiwithrust's Introduction

Mihomo API with Rust

version. 0.1.1

Sample Code

Cargo.tomi

mihomo_api = { git = "https://github.com/wuliao97/mihomoAPI-rust" }
tokio = {version= "1.29.1", features=["full"]}

main.rs

extern crate mihomo_api;

use crate::mihomo_api::model::{
    client::Client,
    json::Base
};

#[tokio::main]
async fn main() {
    let id: String = String::from("801671759");
    let client: Client = Client::default(id);
    let result: Base = client.get_user().await.unwrap();

    dbg!(result.player);
}

Output

[src\main.rs:14] result.player = Player {       
    uid: "801671759",
    nickname: "Ennui",
    level: 69,
    world_level: 6,
    friend_count: 37,
    avatar: Avatar {
        id: "200101",
        name: "三月なのか・歓迎",
        icon: "icon/avatar/200101.png",
    },
    signature: "入って! discord.gg/starrailjp",
    is_display: Bool(true),
    space_info: SpaceInfo {
        challenge_data: ChallengeData {
            maze_group_id: 10,
            maze_group_index: 21,
            pre_maze_group_index: 115,
        },
        pass_area_progress: 7,
        light_cone_count: 76,
        avatar_count: 30,
        achievement_count: 245,
    },
}

starrailapiwithrust's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.