Skip to content

A client to fetch and parse data from HLTV.org

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

dist1ll/hltv-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HLTV client

Documentation | Crates.io | Repository

A crate for fetching and parsing esports data from HLTV.org.

This crate allows you to fetch and parse upcoming matches, results, event information, player performance. This crate uses async calls via reqwest and parses the HTML document with tl. This API mimics the way you discover information on HLTV. Summary pages like HLTV Matches contain less information in the HTML document than the detailed match-specific page.

Currently, the following API calls are supported:

  • crate::upcoming
  • crate::results
  • crate::get_match

Examples

The builders in hltv allow you to build a generic Request object with a Request::fetch method.

#[tokio::test]
async fn results() -> Result<(), Box<dyn Error>> {
    let req = hltv::results()
        .map(Map::Inferno)
        .team(4608) // Team Na'Vi
        .year(2016) 
        .event_type(EventTypeFilter::Lan)
        .build();

    let matches = req.fetch().await?; // Vec<MatchResult>
    Ok(())
}

Getting more detailed information

License

This project is dual-licensed under the MIT and Apache 2.0 license.

About

A client to fetch and parse data from HLTV.org

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages