'Initialize NZBGet API and set headers needed later.'

def __init__(self, api_url, username=None, password=None):

    self.api_url = api_url
    self.status = None
    self.headers = {'content-type': CONTENT_TYPE_JSON}
    if ((username is not None) and (password is not None)):
        self.auth = (username, password)
    else:
        self.auth = None
    self.update()
