Exemple #1
0
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
Exemple #2
0
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
Exemple #3
0
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()
Exemple #5
0
def showSettings():
    PLUGIN.open_settings()
Exemple #6
0
def getOauthToken():
    oauthtoken = PLUGIN.get_setting('oauth_token', unicode)
    if not oauthtoken:
        PLUGIN.open_settings()
        oauthtoken = PLUGIN.get_setting('oauth_token', unicode)
    return oauthtoken
Exemple #7
0
def getUserName():
    username = PLUGIN.get_setting('username', unicode).lower()
    if not username:
        PLUGIN.open_settings()
        username = PLUGIN.get_setting('username', unicode).lower()
    return username
Exemple #8
0
def getOauthToken():
    oauthtoken = PLUGIN.get_setting('oauth_token', unicode)
    if not oauthtoken:
        PLUGIN.open_settings()
        oauthtoken = PLUGIN.get_setting('oauth_token', unicode)
    return oauthtoken