Septzzz's picture
Upload folder using huggingface_hub
b60a5a8 verified
Raw
History Blame Contribute Delete
1.46 kB
import requests
import json
from datetime import date, datetime, timedelta
import os
from typing import Optional, Dict, Union, List
def testing_endpoint(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"testing endpoint"
"""
url = f"https://20211230-testing-upload-swagger.p.rapidapi.com/"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "20211230-testing-upload-swagger.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def open_api_v1_0_indoor_air_quality_iot(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Apply for this API to access the steps for indoor air quality information about IoT device - v2"
"""
url = f"https://20211230-testing-upload-swagger.p.rapidapi.com/open-api/v1.0/indoor-air-quality/iot/"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "20211230-testing-upload-swagger.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation