codewars-api 1.0.0

A library for interacting with the Codewars API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Simple example that prints name of user

extern crate codewars_api;
extern crate tokio;

use codewars_api::rest_api::client::RestCodewarsClient;

#[tokio::main]
async fn main() {
    // Initialize client
    let client = RestCodewarsClient::new();
    // Get user and print name
    println!(
        "Name of user: {}",
        client.get_user("ANKDDEV").await.unwrap().name
    );
}