cowboybike package¶
Submodules¶
cowboybike.cowboybike module¶
This module provides access to the Cowboy Bike’s API (https://cowboy.bike)
-
class
cowboybike.cowboybike.Authentication(email, password)¶ Bases:
objectRepresents a Cowboy API authentication
Parameters: - email (str) – The user’s email.
- password (str) – The users’s password.
-
getaccesstoken()¶ Returns the user’s access token
-
getclient()¶ Returns the user’s client identifier
-
getuid()¶ Returns the user’s uid (should be the same as the user’s email)
-
class
cowboybike.cowboybike.Bike(bike)¶ Bases:
objectRepresents a Cowboy Bike
Parameters: bike (dict) – The bike object fetched from the api. -
getFirmwareVersion()¶
-
getId()¶
-
getNickname()¶
-
getPosition()¶
-
getStateOfCharge()¶
-
getStateOfChargeInternal()¶
-
getTotalCO2Saved()¶
-
getTotalDistance()¶
-
getTotalDuration()¶
-
isStolen()¶
-
-
class
cowboybike.cowboybike.Cowboy(auth)¶ Bases:
objectRepresents the
Parameters: - email (str) – The user’s email.
- password (str) – The users’s password.
-
getBike()¶
-
getTotalCO2Saved()¶
-
getTotalDistance()¶
-
getTotalDuration()¶
-
refreshData()¶
-
classmethod
with_auth(email, password)¶
-
cowboybike.cowboybike.userExists(email)¶ Checks that a user exists
Parameters: email (str) – The user email to check Returns: User exists Return type: bool