Public Member Functions | Static Private Attributes | List of all members
mycroft.api.DeviceApi Class Reference
Inheritance diagram for mycroft.api.DeviceApi:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self)
 
def activate (self, state, token)
 
def delete_skill_metadata (self, uuid)
 
def get (self)
 
def get_code (self, state)
 
def get_location (self)
 
def get_oauth_token (self, dev_cred)
 
def get_settings (self)
 
def get_skill_settings (self)
 
def get_subscriber_voice_url (self, voice=None)
 
def get_subscription (self)
 
def is_subscriber (self)
 
def report_metric (self, name, data)
 
def send_email (self, title, body, sender)
 
def update_version (self)
 
def upload_skill_metadata (self, settings_meta)
 
def upload_skills_data (self, data)
 
- Public Member Functions inherited from mycroft.api.Api
def __init__ (self, path)
 
def add_authorization (self, headers)
 
def add_content_type (self, headers)
 
def build_data (self, params)
 
def build_headers (self, params)
 
def build_json (self, params)
 
def build_path (self, params)
 
def build_query (self, params)
 
def build_url (self, params)
 
def check_token (self)
 
def get_data (self, response)
 
def get_response (self, response, no_refresh=False)
 
def refresh_token (self)
 
def request (self, params)
 
def send (self, params, no_refresh=False)
 

Static Private Attributes

 _skill_settings = None
 
 _skill_settings_lock = Lock()
 

Additional Inherited Members

- Public Attributes inherited from mycroft.api.Api
 identity
 
 old_params
 
 path
 
 url
 
 version
 
- Static Public Attributes inherited from mycroft.api.Api
dictionary etag_to_response = {}
 
dictionary params_to_etag = {}
 

Detailed Description

Web API wrapper for obtaining device-level information 

Definition at line 220 of file scripts/mycroft/api/__init__.py.

Constructor & Destructor Documentation

def mycroft.api.DeviceApi.__init__ (   self)

Definition at line 225 of file scripts/mycroft/api/__init__.py.

Member Function Documentation

def mycroft.api.DeviceApi.activate (   self,
  state,
  token 
)

Definition at line 234 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.delete_skill_metadata (   self,
  uuid 
)
Delete the current skill metadata from backend

    TODO: Real implementation when method exists on backend
Args:
    uuid (str): unique id of the skill

Definition at line 391 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get (   self)
Retrieve all device information from the web backend 

Definition at line 294 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_code (   self,
  state 
)

Definition at line 228 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_location (   self)
Retrieve device location information from the web backend

Returns:
    str: JSON string with user location.

Definition at line 310 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_oauth_token (   self,
  dev_cred 
)
    Get Oauth token for dev_credential dev_cred.

    Argument:
dev_cred:   development credentials identifier

    Returns:
json string containing token and additional information

Definition at line 350 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_settings (   self)
Retrieve device settings information from the web backend

Returns:
    str: JSON string with user configuration information.

Definition at line 300 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_skill_settings (   self)
Fetch all skill settings. 

Definition at line 365 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_subscriber_voice_url (   self,
  voice = None 
)

Definition at line 342 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.get_subscription (   self)
    Get information about type of subscrition this unit is connected
    to.

    Returns: dictionary with subscription information

Definition at line 320 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.is_subscriber (   self)
    status of subscription. True if device is connected to a paying
    subscriber.

Definition at line 331 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.report_metric (   self,
  name,
  data 
)

Definition at line 287 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.send_email (   self,
  title,
  body,
  sender 
)

Definition at line 280 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.update_version (   self)

Definition at line 258 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.upload_skill_metadata (   self,
  settings_meta 
)
Upload skill metadata.

Arguments:
    settings_meta (dict): settings_meta typecasted to suite the backend

Definition at line 379 of file scripts/mycroft/api/__init__.py.

def mycroft.api.DeviceApi.upload_skills_data (   self,
  data 
)
Upload skills.json file. This file contains a manifest of installed
and failed installations for use with the Marketplace.

Arguments:
     data: dictionary with skills data from msm

Definition at line 408 of file scripts/mycroft/api/__init__.py.

Member Data Documentation

mycroft.api.DeviceApi._skill_settings = None
staticprivate

Definition at line 223 of file scripts/mycroft/api/__init__.py.

mycroft.api.DeviceApi._skill_settings_lock = Lock()
staticprivate

Definition at line 222 of file scripts/mycroft/api/__init__.py.


The documentation for this class was generated from the following file:


mycroft_ros
Author(s):
autogenerated on Mon Apr 26 2021 02:35:40