import requests


def widget_content(product_id: int, date_index: int):
    """Gets gig details from the product API
    
    Args:
        product_id (int): productId from ParisCat GetStack
        date_index (int): dateIndex from ParisCat GetStack
    
    Returns:
        dict: Product API JSON
    """

    description_url = "https://api.rollerdigital.com/api/products/availabilities/widget"
    headers = {
        'x-api-key': "pariscat"
    }
    query_string = {
        "productId": product_id,
        "startDateIndex": date_index,
        "endDateIndex": date_index
    }

    try:
        desc = requests.get(description_url, headers = headers, params=query_string)
        return desc.json()
    except:
        return None