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
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
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