Septzzz's picture
Upload folder using huggingface_hub (part 12)
96aab11 verified
Raw
History Blame Contribute Delete
4.76 kB
import requests
import json
from datetime import date, datetime, timedelta
import os
from typing import Optional, Dict, Union, List
def get_apple_accessories_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get Apple accessories Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/accessories"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def get_apple_clearance_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get Apple clearance Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/clearance"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def get_appletv_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get appleTV Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/appletv"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def get_ipod_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get ipod Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/ipod"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def get_ipad_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get Ipad Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/ipad"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def get_mac_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get Iphone Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/mac"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def get_iphone_refurbished_available(country: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Get Iphone Refurbished Available by country"
"""
url = f"https://apple-refurbished.p.rapidapi.com/{country}/shop/refurbished/iphone"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "apple-refurbished.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation