Skip to content

Commit

Permalink
Changed: Set Local API timeout to 5 seconds (10 is too long)
Browse files Browse the repository at this point in the history
  • Loading branch information
ualex73 committed May 26, 2024
1 parent 05b2945 commit a9de001
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions goslideapi/goslideapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

# API Link: https://documenter.getpostman.com/view/6223391/S1Lu2pSf
BASEURL = "https://api.goslide.io/api/{}"
DEFAULT_TIMEOUT = 10
DEFAULT_TIMEOUT_CLOUD = 10
DEFAULT_TIMEOUT_LOCAL = 5


class AuthenticationFailed(Exception):
Expand Down Expand Up @@ -47,7 +48,7 @@ def __init__(
self,
username,
password,
timeout=DEFAULT_TIMEOUT,
timeout=DEFAULT_TIMEOUT_CLOUD,
url=BASEURL,
authexception=True,
verify_ssl=True,
Expand Down Expand Up @@ -433,7 +434,7 @@ async def household_set(self, name, address, lat, lon):
class GoSlideLocal:
"""API Wrapper for the Go Slide devices, local connectivity."""

def __init__(self, timeout=DEFAULT_TIMEOUT, authexception=True):
def __init__(self, timeout=DEFAULT_TIMEOUT_LOCAL, authexception=True):
"""Create the object with required parameters."""
self._timeout = timeout
self._authexception = authexception
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setuptools.setup(
name='goslide-api',
version='0.6.9',
version='0.7.0',
url='https://github.com/ualex73/goslide-api',
license='Apache License 2.0',
author='Alexander Kuiper',
Expand Down

0 comments on commit a9de001

Please sign in to comment.