Crates.io | fpl_rs |
lib.rs | fpl_rs |
version | 0.1.2 |
source | src |
created_at | 2023-12-08 13:32:50.956258 |
updated_at | 2024-02-22 18:01:46.96929 |
description | An api wrapper for fantasy premier league. |
homepage | |
repository | |
max_upload_size | |
id | 1062026 |
size | 66,911 |
This is a Rust library that serves as an API wrapper for the Fantasy Premier League (FPL) API. It provides convenient methods for interacting with the FPL API, allowing you to retrieve information about players, teams, gameweeks, and more.
Here is a simple example of how to use the FPL API wrapper:
use fpl_rs::{Fpl, FplError, Players};
#[tokio::main]
async fn main() {
// Create a new Fpl instance
let mut fpl = Fpl::new();
// Retrieve information about all FPL players
match fpl.get_all_players().await {
Ok(players) => {
// Process information about all FPL players
println!("{:?}", players);
}
Err(err) => {
// Handle the error
eprintln!("Error: {}", err);
}
}
}
For detailed documentation on the available methods and usage, please refer to the API documentation.
Contributions are welcome! If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.