'Initialize OctoPrint API and set headers needed later.'

def __init__(self, api_url, key):

    self.api_url = api_url
    self.headers = {'content-type': CONTENT_TYPE_JSON, 'X-Api-Key': key}
    self.printer_last_reading = [{}, None]
    self.job_last_reading = [{}, None]
    self.job_available = False
    self.printer_available = False
    self.available = False
    self.printer_error_logged = False
    self.job_error_logged = False
