Spaces:
Build error
Build error
File size: 644 Bytes
f3f431f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# THIS FILE IS RESPONSABLE FOR DEALING WITH THE CLIENT
from .classes import Authenticator, Results
from . import calls
class Client:
def __init__(self, client_id, client_secret):
self.auth = Authenticator(client_id, client_secret)
def search(self, keywords:str, *, types:list = ['track'], filters:dict = {},
market:str = None, limit:int = None, offset:int = None) -> Results:
access_token = self.auth.get_acess_token()
args = (keywords, types, filters, market, limit, offset)
response = calls.call_search(access_token, args)
return Results(response.json())
|