def testnearby(self):
     contacts.nearby(45, 50, another='parameter', dwollaparse='dwolla')
     contacts.r._get_without_token.assert_any_call(
         '/contacts/nearby', {
             'latitude': 45,
             'client_secret': 'SOME ID',
             'another': 'parameter',
             'client_id': 'SOME ID',
             'longitude': 50
         }, {'dwollaparse': 'dwolla'})
Esempio n. 2
0
 def testnearby(self):
     contacts.nearby(45, 50, another='parameter', dwollaparse='dwolla')
     contacts.r._get_without_token.assert_any_call('/contacts/nearby', {'latitude': 45, 'client_secret': 'SOME ID', 'another': 'parameter', 'client_id': 'SOME ID', 'longitude': 50}, {'dwollaparse': 'dwolla'})
Esempio n. 3
0
print(contacts.get())
# Return:
# [{u'City': u'Des Moines', u'Name': u'Dwolla, Inc.', u'Image': u'https://www.dwolla.com/avatars/812-616-9409', u'State': u'IA', u'Type': u'Dwolla', u'Id': u'812-616-9409'},
# {u'City': u'Elmhurst', u'Name': u'Gordon Zheng', u'Image': u'https://www.dwolla.com/avatars/812-687-7049', u'State': u'NY', u'Type': u'Dwolla', u'Id': u'812-687-7049'}]

# Example 2: Get the first 2 contacts from the user
# associated with the current OAuth token.

print(contacts.get(limit=2))
# Return:
# Same as above (David has only two contacts)

# Example 3: Get Dwolla spots near NYC's official
# coordinates.

print(contacts.nearby(40.7127, 74.0059))
# Return:
# [
#        {
#            "Name": "ThelmasTreats",
#            "Id": "812-608-8758",
#            "Type": "Dwolla",
#            "Image": "https://www.dwolla.com/avatars/812-608-8758",
#            "Latitude": 41.590043,
#            "Longitude": -93.62095,
#            "Address": "615 3rd Street\n",
#            "City": "Des Moines",
#            "State": "IA",
#            "PostalCode": "50309",
#            "Group": "812-608-8758",
#            "Delta": 0.0009069999999908873
Esempio n. 4
0
 def testnearby(self):
     contacts.nearby(45, 50, {'another': 'parameter'})
     contacts.r._get.assert_any_call('/contacts/nearby', {'latitude': 45, 'client_secret': 'SOME ID', 'another': 'parameter', 'client_id': 'SOME ID', 'longitude': 50})
Esempio n. 5
0
# [{u'City': u'Des Moines', u'Name': u'Dwolla, Inc.', u'Image': u'https://www.dwolla.com/avatars/812-616-9409', u'State': u'IA', u'Type': u'Dwolla', u'Id': u'812-616-9409'}, 
# {u'City': u'Elmhurst', u'Name': u'Gordon Zheng', u'Image': u'https://www.dwolla.com/avatars/812-687-7049', u'State': u'NY', u'Type': u'Dwolla', u'Id': u'812-687-7049'}]


# Example 2: Get the first 2 contacts from the user
# associated with the current OAuth token.

print(contacts.get(limit=2))
# Return: 
# Same as above (David has only two contacts)


# Example 3: Get Dwolla spots near NYC's official
# coordinates.

print(contacts.nearby(40.7127, 74.0059))
# Return:
# [
#        {
#            "Name": "ThelmasTreats",
#            "Id": "812-608-8758",
#            "Type": "Dwolla",
#            "Image": "https://www.dwolla.com/avatars/812-608-8758",
#            "Latitude": 41.590043,
#            "Longitude": -93.62095,
#            "Address": "615 3rd Street\n",
#            "City": "Des Moines",
#            "State": "IA",
#            "PostalCode": "50309",
#            "Group": "812-608-8758",
#            "Delta": 0.0009069999999908873