5 releases
0.2.4 | Jul 20, 2024 |
---|---|
0.2.3 | Dec 18, 2023 |
0.2.2 | Dec 11, 2023 |
0.1.2 | Dec 7, 2023 |
0.1.1 | Dec 5, 2023 |
#822 in Command line utilities
226 downloads per month
60KB
1.5K
SLoC
footballscore
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.
Development
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
License
Dependencies
~3–15MB
~183K SLoC