Spaces:
Paused
Paused
Update main.py
Browse files
main.py
CHANGED
|
@@ -81,10 +81,9 @@ def fetch_trending_searches(country_code: str):
|
|
| 81 |
|
| 82 |
# Endpoint to get trending searches for a specific country
|
| 83 |
@app.get("/trending-searches/{country_code}")
|
| 84 |
-
async def get_trending_searches(country_code: str = Query(
|
| 85 |
return fetch_trending_searches(country_code.upper())
|
| 86 |
|
| 87 |
-
|
| 88 |
@app.get("/", tags=["Home"])
|
| 89 |
def api_home():
|
| 90 |
return {'detail': 'Welcome to Web-Scraping API! Visit https://pvanand-web-scraping.hf.space/docs to test'}
|
|
|
|
| 81 |
|
| 82 |
# Endpoint to get trending searches for a specific country
|
| 83 |
@app.get("/trending-searches/{country_code}")
|
| 84 |
+
async def get_trending_searches(country_code: str = Query(..., description="ISO country code (e.g., US for United States)",enum=["US", "IN"])):
|
| 85 |
return fetch_trending_searches(country_code.upper())
|
| 86 |
|
|
|
|
| 87 |
@app.get("/", tags=["Home"])
|
| 88 |
def api_home():
|
| 89 |
return {'detail': 'Welcome to Web-Scraping API! Visit https://pvanand-web-scraping.hf.space/docs to test'}
|