Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/yonoma/client.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import requests
from yonoma.exceptions import YonomaAPIError
from yonoma.version import VERSION

class YonomaClient:
BASE_URL = "https://api.yonoma.io/v1/"

def __init__(self, api_key):
self.api_key = api_key
self.version = VERSION
self.headers = {
"Authorization": f"Bearer {self.api_key}",
"Content-Type": "application/json"
"Content-Type": "application/json",
"User-Agent": f"yonoma-python: {self.version}"
}

def request(self, method, endpoint, data=None):
Expand Down