def getOauthToken(token_only=True): oauthtoken = PLUGIN.get_setting('oauth_token', unicode) if not oauthtoken: PLUGIN.open_settings() oauthtoken = PLUGIN.get_setting('oauth_token', unicode) if oauthtoken: if token_only: oauthtoken = oauthtoken.replace('oauth:', '') else: if not oauthtoken.lower().startswith('oauth:'): oauthtoken = 'oauth:{0}'.format(oauthtoken) return oauthtoken
def getUserName(): username = PLUGIN.get_setting('username', unicode).lower() if not username: PLUGIN.open_settings() username = PLUGIN.get_setting('username', unicode).lower() return username
def showSettings(): PLUGIN.open_settings()
def getOauthToken(): oauthtoken = PLUGIN.get_setting('oauth_token', unicode) if not oauthtoken: PLUGIN.open_settings() oauthtoken = PLUGIN.get_setting('oauth_token', unicode) return oauthtoken