lodestone

Crates.iolodestone
lib.rslodestone
version0.5.0
sourcesrc
created_at2018-10-04 00:08:33.504351
updated_at2024-10-12 16:16:09.196096
descriptionA website wrapper for FFXIV's lodestone.
homepage
repositoryhttps://github.com/Roughsketch/lodestone
max_upload_size
id87913
size58,071
Rust Platform (github:apollographql:rust-platform)

documentation

https://docs.rs/lodestone

README

ci-badge docs-badge crates.io version

lodestone

Library for scraping data off of FFXIV's lodestone

Examples

Get a profile from a user id

use model::profile::Profile;
  
let profile = Profile::get(user_id).unwrap();

Search for a profile in a datacenter

fn search_user(name: &str, dc: Option<Datacenter>) -> Result<Vec<Profile>, Error> {
  let search = SearchBuilder::new().character(name);
        
  if let Some(d) = dc {
    search = search.datacenter(d);
  }
    
  search.send()
}

A more targeted search

let profiles = SearchBuilder::new()
    .character("Strawberry Custard")
    .datacenter(Datacenter::Primal)
    .lang(Language::English)
    .grand_company(GrandCompany::Maelstrom)
    .send()
    .unwrap();

let strawberry = profiles.first().unwrap();
Commit count: 45

cargo fmt