def new_instance(cls, session=None): """Initialize an instance using values from the configuration""" if not session: session = sessions.FuturesSession() return cls( session, settings.ANALYTICS_ENDPOINT, utils.deobfuscate(settings.ANALYTICS_TOKEN) )
def load(cls, session=None): """Initialize an instance using values from lbry.io.""" if not session: session = sessions.FuturesSession() return cls( session, conf.ANALYTICS_ENDPOINT, utils.deobfuscate(conf.ANALYTICS_TOKEN) )
def new_instance(cls, session=None): """Initialize an instance using values from the configuration""" if not session: session = Session() return cls(session, conf.settings['ANALYTICS_ENDPOINT'], utils.deobfuscate(conf.settings['ANALYTICS_TOKEN']))
def new_instance(cls, session=None): """Initialize an instance using values from the configuration""" if not session: session = sessions.FuturesSession() return cls(session, settings.ANALYTICS_ENDPOINT, utils.deobfuscate(settings.ANALYTICS_TOKEN))