Skip to main content

A Python client for the FOGIS API (Svensk Fotboll)

Project description

fogis_api_client

A Python client for interacting with the FOGIS API (Svensk Fotboll).

Features

  • Authentication with FOGIS API.
  • Fetching match lists, team players, officials, and events.
  • Reporting match events and results.
  • Error handling and logging.

Installation

pip install fogis-api-client-timmyBird

Usage

import logging
from fogis_api_client.fogis_api_client import FogisApiClient, FogisLoginError, FogisAPIRequestError

logging.basicConfig(level=logging.INFO)

username = "your_fogis_username"
password = "your_fogis_password"

try:
    client = FogisApiClient(username, password)
    client.login()
    matches = client.fetch_matches_list_json()
    if matches:
        print(f"Found {len(matches)} matches.")
    else:
        print("No matches found.")
except FogisLoginError as e:
    print(f"Login failed: {e}")
except FogisAPIRequestError as e:
    print(f"API request error: {e}")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

Error Handling

The package includes custom exceptions for common API errors:

FogisLoginError: Raised when login fails.

FogisAPIRequestError: Raised for general API request errors.


Contributing

Contributions are welcome! Please open an issue or a pull request if you find any bugs or have suggestions.


License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fogis_api_client_timmybird-0.0.4.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fogis_api_client_timmybird-0.0.4-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file fogis_api_client_timmybird-0.0.4.tar.gz.

File metadata

File hashes

Hashes for fogis_api_client_timmybird-0.0.4.tar.gz
Algorithm Hash digest
SHA256 333535256e616f4c6bf1a96bcc312e98ee8a9873eded57360683cfe4a04938b6
MD5 2bbab189d64ed06102183827c082d448
BLAKE2b-256 9b404ea89ee8b42a273c92deb6ad32951eb0215f22fce4605f387e295b55adca

See more details on using hashes here.

File details

Details for the file fogis_api_client_timmybird-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for fogis_api_client_timmybird-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 597acb81f51b09bb1fed85c75cbcd798cb7aa6f55ed751c8b944cb7c55e22a76
MD5 e9f5ad0c6a6d81d8ad9fbfec48be5c68
BLAKE2b-256 98360f6ab9ce2544baab57f40ef9c9286fdc81baa8140180ce999690f07c5355

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page