Aggregating Live TV Events
import requests
data = {
"active": {
"gte": "2020-02-01",
"lte": "2020-02-29"
},
"location": {
"place_id": [
5224323,
5811704,
4887398
]
},
"phq_viewership_sports_american_football_nfl": {
"stats": [
"count",
"sum",
"avg"
]
},
"phq_viewership_sports_basketball_nba": {
"stats": [
"count",
"sum",
"avg"
]
}
}
response = requests.post(
url="https://api.predicthq.com/v1/features/",
headers={
"Authorization": "Bearer $ACCESS_TOKEN",
"Accept": "application/json"
},
json=data
)
print(response.json())Last updated
Was this helpful?