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 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.1.tar.gz (11.1 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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file fogis-api-client-timmyBird-0.0.1.tar.gz.

File metadata

File hashes

Hashes for fogis-api-client-timmyBird-0.0.1.tar.gz
Algorithm Hash digest
SHA256 af54c3f69288e9ebdfe6391662f782a05aaf6ba44004b2a9d7e2eb957968962f
MD5 6f17b43066c8674ff8cc10ad66dcdf2a
BLAKE2b-256 dab782b3139d7d8ee6233db0d486a8b11a41b7ca70aca063643a4d9bf0b24304

See more details on using hashes here.

File details

Details for the file fogis_api_client_timmyBird-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fogis_api_client_timmyBird-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c3ea4792e3ea1bb80066af569873710d396fd14d1abae14626fc0b20a3750cc0
MD5 b4d3cd40e14d4b81d09b8a6381c07f0b
BLAKE2b-256 e4458af57f3ba54c893c7992936db9e9f9adfb96c9f17e3ff0f836fcd4dc602e

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