howlongtobeat

Crates.iohowlongtobeat
lib.rshowlongtobeat
version0.5.2
sourcesrc
created_at2022-08-22 15:13:17.265195
updated_at2022-12-04 20:29:36.420627
descriptionSimple api for https://howlongtobeat.com
homepagehttps://github.com/saturnavt/howlongtobeat-api
repositoryhttps://github.com/saturnavt/howlongtobeat-api
max_upload_size
id650431
size49,221
Alejandro Castillo (saturnavt)

documentation

README

Howlongtobeat API

About & Credits

How long to beat provides information and data about games and how long it will take to finish them.

This library is a simple wrapper api to fetch data from How long to beat (search and detail). It is an awesome website and a great service, also heavily living from community data. Please check the website and support if you like what they are doing.

Usage

Install the dependency

howlongtobeat = "0.5.2"

Use in code

Add imports

use howlongtobeat::search;

Searching for a game

let games_found = search("Elden Ring".to_string());
println!("{:#?}", games_found);
  • Search response example:
[
    Game {
        image: "https://howlongtobeat.com/games/68151_Elden_Ring.jpg",
        title: "Elden Ring",
        main: "52h 39m",
        extra: "98h 11m",
        completionist: "131h 19m",
    },
    Game {
        image: "https://howlongtobeat.com/games/108888_Elden_Ring_GB.jpg",
        title: "Elden Ring GB",
        main: "0h 21m",
        extra: "0h 29m",
        completionist: "0h 0m",
    },
]

License

DO WHAT THE FUCK YOU WANT

Commit count: 16

cargo fmt