예제 #1
0
def dotransform(request, response):

    client = login()

    user = client.users(request.fields['affiliation.uid']).get('user', {})

    if 'contact' in user and 'phone' in user['contact']:
        e = PhoneNumber(user['contact']['phone'])
        response += e

    return response
예제 #2
0
def dotransform(request, response):

    client = login()

    user = client.users(request.fields['affiliation.uid']).get('user', {})

    if 'contact' in user and 'phone' in user['contact']:
        e = PhoneNumber(user['contact']['phone'])
        response += e

    return response
예제 #3
0
def dotransform(request, response):

    client = login()

    for f in client.users.friends(request.fields['affiliation.uid'])['friends']['items']:
        if 'type' not in f:
            e = AffiliationFoursquare('%s %s' % (f['firstName'], f.get('lastName', '')))
            e.profileurl = 'https://foursquare.com/user/%s' % f['id']
            e.network = 'Foursquare'
            e.uid = f['id']
            response += e

    return response
예제 #4
0
def dotransform(request, response):

    client = login()

    user = client.users.search({'twitter' : request.value})['results']

    for u in user:
        e = AffiliationFoursquare('%s %s' % (u['firstName'], u.get('lastName', '')))
        e.uid = u['id']
        e.network = 'Foursquare'
        e.profileurl = 'https://foursquare.com/user/%s' % u['id']
        response += e

    return response
예제 #5
0
def dotransform(request, response):

    client = login()

    user = client.users(request.fields['affiliation.uid']).get('user', {})

    if 'contact' in user and 'twitter' in user['contact']:
        e = AffiliationTwitter(user['contact']['twitter'])
        e.profileurl = 'http://twitter.com/%s' % user['contact']['twitter']
        e.network = 'Twitter'
        e.uid = user['contact']['twitter']
        response += e

    return response
예제 #6
0
def dotransform(request, response):

    client = login()

    user = client.users(request.fields['affiliation.uid']).get('user', {})

    if 'contact' in user and 'twitter' in user['contact']:
        e = AffiliationTwitter(user['contact']['twitter'])
        e.profileurl = 'http://twitter.com/%s' % user['contact']['twitter']
        e.network = 'Twitter'
        e.uid = user['contact']['twitter']
        response += e

    return response
def dotransform(request, response):

    client = login()

    user = client.users(request.fields['affiliation.uid']).get('user', {})

    if 'contact' in user and 'facebook' in user['contact']:
        e = AffiliationFacebook('%s %s' % (user['firstName'], user.get('lastName', '')))
        e.profileurl = 'https://facebook.com/%s' % user['contact']['facebook']
        e.uid = user['contact']['facebook']
        e.network = 'Facebook'
        response += e

    return response
예제 #8
0
def dotransform(request, response):

    client = login()

    user = client.users(request.fields['affiliation.uid']).get('user', {})

    if 'contact' in user and 'facebook' in user['contact']:
        e = AffiliationFacebook('%s %s' %
                                (user['firstName'], user.get('lastName', '')))
        e.profileurl = 'https://facebook.com/%s' % user['contact']['facebook']
        e.uid = user['contact']['facebook']
        e.network = 'Facebook'
        response += e

    return response