Crates.io | footballscore |
lib.rs | footballscore |
version | 0.2.4 |
source | src |
created_at | 2023-12-05 13:18:44.355625 |
updated_at | 2024-07-20 07:35:43.557835 |
description | a CLI tool to retrieve football score from api-football.com |
homepage | https://github.com/nubilfi/footballscore |
repository | https://github.com/nubilfi/footballscore |
max_upload_size | |
id | 1058608 |
size | 117,494 |
a CLI tool to retreive football score from api-football.com. You will need to obtain an API_KEY
by signing up at dashboard.api-football.com.
Usage:
footballscore
Utility to retreive football score of your favorite team from api-football.com
USAGE:
footballscore [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-k, --api-key <api-key> Api key (optional but either this or API_KEY environment variable must exist)
--next-match <next-match> Show next match (optional), but it must be `1`
-n, --club-name <club-name> Get your favorite Club ID by name (optional)
-c, --club-id <club-id> Your favorite Club ID (optional), if not specified `529 (Barcelona)` will be assumed
Output:
Match: Barcelona 0 vs 0 Girona
To retrieve live score data, you only need to use --club-id
option. For example:
footballscore -k=api_key_value -c=club_id_value
Want to stay updated regularly? Set up an interval
for specific durations on your panel item.
Update Frequency : The data is updated every 15 seconds. Although the data is updated every 15 seconds, depending on the competition there may be a delay between reality and the availability of data in the API.
Or, you might want to use it on i3wm + Polybar + dunstify
or something similar, here's an example of mine.
git clone git@github.com:nubilfi/footballscore.git
# Build
cd footballscore
cargo build -r # build with cargo
make # build docker image with Makefile
./scripts/build_package.sh # build packages for ArchLinux
./scripts/setup.sh # setup application environment variables
# Run the application
cargo run -- -h
# Run unit tests and integration tests
cargo test
# Run benchmark
cargo bench