Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
sharinetmc committed Jan 7, 2025
1 parent 4cc54c0 commit c689a0c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions parsons/newmode/newmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def __init__(self, api_user=None, api_password=None, api_version=None):
logger.warning(
"Newmode V1 API will be sunset in Feburary 2025. To use V2, set api_version=v2.1"
)
self.api_user = api_user
self.api_password = api_password
self.api_user = check_env.check("NEWMODE_API_USER", api_user)
self.api_password = check_env.check("NEWMODE_API_PASSWORD", api_password)
self.api_version = api_version
self.client = Client(api_user, api_password, api_version)

Expand Down Expand Up @@ -358,8 +358,8 @@ def __init__(
"""
self.api_version = api_version
self.base_url = V2_API_URL
self.client_id = client_id
self.client_secret = client_secret
self.client_id = check_env.check("NEWMODE_API_CLIENT_ID", client_id)
self.client_secret = check_env.check("NEWMODE_API_CLIENT_SECRET", client_secret)
self.headers = {"content-type": "application/json"}

def base_request(
Expand Down Expand Up @@ -601,11 +601,6 @@ def __new__(
NewMode Class
"""
api_version = check_env.check("NEWMODE_API_VERSION", api_version)
client_id = check_env.check("NEWMODE_API_CLIENT_ID", client_id)
client_secret = check_env.check("NEWMODE_API_CLIENT_SECRET", client_secret)
api_user = check_env.check("NEWMODE_API_USER", api_user)
api_password = check_env.check("NEWMODE_API_PASSWORD", api_password)

if api_version.startswith("v2"):
return NewmodeV2(
client_id=client_id, client_secret=client_secret, api_version=api_version
Expand Down

0 comments on commit c689a0c

Please sign in to comment.