Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated login url #85

Merged
merged 4 commits into from
Sep 19, 2018
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
2 changes: 1 addition & 1 deletion bimmer_connected/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
_LOGGER = logging.getLogger(__name__)


class ConnectedDriveAccount(object): # pylint: disable=too-many-instance-attributes
class ConnectedDriveAccount: # pylint: disable=too-many-instance-attributes
"""Create a new connection to the BMW Connected Drive web service.

:param username: Connected drive user name
Expand Down
4 changes: 2 additions & 2 deletions bimmer_connected/const.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"""Version numbers of bimmer_connected."""
MAJOR_VERSION = 0
MINOR_VERSION = 5
PATCH_VERSION = 1
PATCH_VERSION = 2

__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)


"""urls for different services."""

AUTH_URL = 'https://{server}/webapi/oauth/token'
AUTH_URL = 'https://{server}/gcdm/oauth/token'
BASE_URL = 'https://{server}/webapi/v1'

VEHICLES_URL = BASE_URL + '/user/vehicles'
Expand Down
4 changes: 2 additions & 2 deletions bimmer_connected/remote_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class _Services(Enum):
REMOTE_AIR_CONDITIONING = 'CLIMATE_NOW'


class RemoteServiceStatus(object): # pylint: disable=too-few-public-methods
class RemoteServiceStatus: # pylint: disable=too-few-public-methods
"""Wraps the status of the execution of a remote service."""

def __init__(self, response: dict):
Expand All @@ -58,7 +58,7 @@ def _parse_timestamp(timestamp: str) -> datetime.datetime:
return result


class RemoteServices(object):
class RemoteServices:
"""Trigger remote services on a vehicle."""

def __init__(self, account, vehicle):
Expand Down
6 changes: 3 additions & 3 deletions bimmer_connected/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _func_wrapper(self: 'VehicleState', *args, **kwargs):
return _func_wrapper


class VehicleState(object): # pylint: disable=too-many-public-methods
class VehicleState: # pylint: disable=too-many-public-methods
"""Models the state of a vehicle."""

def __init__(self, account, vehicle):
Expand Down Expand Up @@ -326,7 +326,7 @@ def has_check_control_messages(self) -> bool:
return len(self.check_control_messages) > 0


class Lid(object): # pylint: disable=too-few-public-methods
class Lid: # pylint: disable=too-few-public-methods
"""A lid of the vehicle.

Lids are: Doors + Trunk + Hatch
Expand Down Expand Up @@ -359,7 +359,7 @@ class Window(Lid): # pylint: disable=too-few-public-methods
pass


class ConditionBasedServiceReport(object): # pylint: disable=too-few-public-methods
class ConditionBasedServiceReport: # pylint: disable=too-few-public-methods
"""Entry in the list of condition based services."""

def __init__(self, data: dict):
Expand Down
2 changes: 1 addition & 1 deletion bimmer_connected/vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class LscType(Enum):
LSC_PHEV = 'LSC_PHEV'


class ConnectedDriveVehicle(object):
class ConnectedDriveVehicle:
"""Models state and remote services of one vehicle.

:param account: ConnectedDrive account this vehicle belongs to
Expand Down
8 changes: 4 additions & 4 deletions test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def load_response_json(filename: str) -> dict:
return json.load(json_file)


class BackendMock(object):
class BackendMock:
"""Mock for Connected Drive Backend."""

# pylint: disable=too-many-arguments
Expand All @@ -90,7 +90,7 @@ def __init__(self) -> None:
"""Constructor."""
self.last_request = []
self.responses = [
MockResponse('https://.+/webapi/oauth/token',
MockResponse('https://.+/gcdm/oauth/token',
headers=_AUTH_RESPONSE_HEADERS,
data_files=['G31_NBTevo/auth_response.json'],
status_code=200),
Expand Down Expand Up @@ -132,7 +132,7 @@ def setup_default_vehicles(self) -> None:
data_files=['{path}/status.json'.format(path=path)])


class MockRequest(object): # pylint: disable=too-few-public-methods
class MockRequest: # pylint: disable=too-few-public-methods
"""Stores the attributes of a request."""

# pylint: disable=too-many-arguments
Expand All @@ -146,7 +146,7 @@ def __init__(self, url, headers, data, request_type=None, allow_redirects=None,
self.params = params


class MockResponse(object):
class MockResponse:
"""Mocks requests.response."""

# pylint: disable=too-many-arguments
Expand Down