Пример #1
0
Файл: api.py Проект: lbryio/lbry
 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)
     )
Пример #2
0
 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)
     )
Пример #3
0
 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']))
Пример #4
0
 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))