You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
382 B
13 lines
382 B
import requests
|
|
|
|
def api_get(endpoint, method='GET', timeout=None, access_token=None, **params):
|
|
backend = "https://api.commadotai.com/"
|
|
|
|
params['_version'] = "OPENPILOTv0.3"
|
|
|
|
headers = {}
|
|
if access_token is not None:
|
|
headers['Authorization'] = "JWT "+access_token
|
|
|
|
return requests.request(method, backend+endpoint, timeout=timeout, headers = headers, params=params)
|
|
|
|
|