"""Fetch all venues available."""

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/venue.ipynb.

# %% auto 0
__all__ = ['fetch_all_venues']

# %% ../nbs/venue.ipynb 4
import pandas as pd

# %% ../nbs/venue.ipynb 5
def fetch_all_venues():
    """Fetches all venue information that exists: \n
    * venue_id \n
    * venue_name
    """

    try:
        print("Fetching all venues...")
        date_url = "https://raw.githubusercontent.com/seanyboi/rugbydata/main/data/v3/venue/venue_registry.parquet"
        venues = pd.read_parquet(date_url, engine="pyarrow")
        return venues
    except Exception as _:
        print(
            "No match information either because no venue took place or rugbypy does not have access to the venue data. Please raise an issue if neither."
        )
