Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion yepcode_run/api/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class ExecutionStatus(Enum):

@dataclass
class YepCodeApiConfig:
auth_url: Optional[str] = None
api_host: Optional[str] = None
timeout: Optional[int] = None
access_token: Optional[str] = None
Expand Down
5 changes: 1 addition & 4 deletions yepcode_run/api/yepcode_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,16 +107,13 @@ def __init__(self, config: YepCodeApiConfig = None):
self.client_id = final_config.get("client_id")
self.client_secret = final_config.get("client_secret")
self.api_token = final_config.get("api_token")
self.auth_url = final_config.get("auth_url")
self.team_id = final_config.get("team_id")
self.access_token = final_config.get("access_token")
self.timeout = final_config.get("timeout")
if not self.client_id and self.access_token:
self.client_id = self._client_id_from_access_token()
if not self.team_id and self.client_id:
self.team_id = self._team_id_from_client_id()
if not self.auth_url:
self.auth_url = self._get_auth_url()

def get_client_id(self) -> str:
if not self.client_id:
Expand Down Expand Up @@ -170,7 +167,7 @@ def _get_access_token(self) -> str:
)

response = requests.post(
self.auth_url,
self._get_auth_url(),
headers={
"x-api-token": api_token,
},
Expand Down
1 change: 0 additions & 1 deletion yepcode_run/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ class ExecutionStatus(Enum):

@dataclass
class YepCodeApiConfig:
auth_url: Optional[str] = None
api_host: Optional[str] = None
timeout: Optional[int] = None
access_token: Optional[str] = None
Expand Down