예제 #1
0
def api_sina_follow(key, secret, id=SINA_FOLLOW):
    return api_sina(
        '/friendships/create.json',
        {'user_id': id},
        key,
        secret,
        'POST',
    )
예제 #2
0
def api_sina_follow(key, secret, id=SINA_FOLLOW):
    return api_sina(
                '/friendships/create.json',
                {'user_id':id},
                key,
                secret,
                'POST',
            )
예제 #3
0
def api_sina_verify(key, secret, oauth_id):
    res = api_network_http(*api_sina(
        '/users/show.json', {'user_id': SINA_FOLLOW}, key, secret, 'GET'))
    if json.loads(res):
        m = json.loads(res)
        if int(m.get('error_code', '0')) == 401:
            oauth_rm_by_oauth_id(oauth_id)
        else:
            return True
예제 #4
0
def api_sina_verify(key, secret, oauth_id):
    res = api_network_http(*api_sina(
            '/users/show.json',
            {'user_id':SINA_FOLLOW},
            key,
            secret,
            'GET'
            ))
    if json.loads(res):
        m = json.loads(res)
        if int(m.get('error_code', '0')) == 401:
            oauth_rm_by_oauth_id(oauth_id)
        else:
            return True