Exemplo n.º 1
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
Exemplo n.º 2
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