示例#1
0
def oauth_verify_by_oauth_id(oauth_id):
    out = oauth_token_by_oauth_id(oauth_id)
    if out:
        cid, key, secret = out
        if cid not in DICT_API_VERIFY:
            return
        re = DICT_API_VERIFY[cid](key, secret, oauth_id)
        return re
示例#2
0
def oauth_verify_by_oauth_id(oauth_id):
    out = oauth_token_by_oauth_id(oauth_id)
    if out:
        cid, key, secret = out
        if cid not in DICT_API_VERIFY:
            return
        re = DICT_API_VERIFY[cid](key, secret, oauth_id)
        return re
示例#3
0
def oauth_follow_by_oauth_id(oauth_id):
    out = oauth_token_by_oauth_id(oauth_id)
    if out:
        cid, key, secret = out
        if cid not in DICT_API_FOLLOW:
            return
        re = DICT_API_FOLLOW[cid](key, secret)
        mes = api_network_http(*re)
        return mes
示例#4
0
def oauth_follow_by_oauth_id(oauth_id):
    out = oauth_token_by_oauth_id(oauth_id)
    if out:
        cid, key, secret = out
        if cid not in DICT_API_FOLLOW:
            return
        re = DICT_API_FOLLOW[cid](key, secret)
        mes = api_network_http(*re)
        return mes
示例#5
0
def sync_by_oauth_id(oauth_id, txt, url=None, name=None):
    out = oauth_token_by_oauth_id(oauth_id)
    if out:
        cid, key, secret = out
        url = url_short(url)
        if name:
            txt = '#%s# %s'%(name.replace(' ', '_'), txt)

        txt = oauth_txt_cat(cid, txt, url)
        re = DICT_API_SAY[cid](key, secret, txt)

        if cid == OAUTH_KAIXIN:
            conn = httplib.HTTPSConnection
        else:
            conn = httplib.HTTPConnection

        if re:
            mes = api_network_http( *re)
            #oauth_res_check(mes, oauth_id)
            return mes