Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Feb 19, 2018
1 parent ca6d112 commit 4e2ee38
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions infusionsoft/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"""
client_id = "kbj7nhv3b7yezsrxck2cc749"
client_secret = "UMtN6PGPud"
access_token = "p2de6mybxsbgs3xu393r7teh"
refresh_token = "v4vvdcuqk7ddwajucjsfk7ra"
access_token = "x2x35pf95s9eenz65fq58r83"
refresh_token = "9qyw5spgzwsmtnc6mvh68ajw"
callback = ""
petition = Client(access_token)
petition = Client(client_id=client_id, client_secret=client_secret, token=access_token)

"""
OAUTH URL
Expand All @@ -24,7 +24,7 @@
REFRESH TOKEN
here you can refresh the token, are obligatory the client id, client secret and the refresh token
"""
# refresh_token = petition.refresh_token(client_id, client_secret, refresh_token)
# refresh_token = petition.refresh_token(refresh_token)
# print(refresh_token)

"""
Expand All @@ -34,6 +34,7 @@
"""
# data = petition.get_data('contacts', order="id", order_direction="descending", limit=1)
# print(data)
# print(type(data))

"""
CREATE DATA
Expand All @@ -43,22 +44,33 @@
endpoint = "contacts"
data = petition.create_data(endpoint, **data)
"""
# data = {'email_addresses': [{'email': '[email protected]', 'field': 'EMAIL1'}], 'given_name': 'MYNAME'}
# create = petition.create_data("contacts", **data)
# print(type(create))

"""
UPDATE DATA
call the method update_data and send "endpoint", the id of the thing to update, and the data to update
Example:
data = {'email_addresses': [{'email': '[email protected]', 'field': 'EMAIL1'}], 'given_name': 'CHANGENAME'}
endpoint = "contacts"
data = petition.update_data(endpoint, 100, **data)
data = petition.update_data(endpoint, 216, **data)
"""
# data = {'email_addresses': [{'email': '[email protected]', 'field': 'EMAIL1'}], 'given_name': 'CHANGENAME'}
# endpoint = "contacts"
# update = petition.update_data(endpoint, 216, **data)
# print(update)
# print(type(update))

"""
DELETE DATA
just call the method delete_data, send "endpoint" and the id of the thing to delete
Example:
data = petition.delete_data(endpoint, 100)
"""
# data = petition.delete_data("contacts", 216)
# print(data)
# print(type(data))

"""
CONTACT TEST
Expand Down Expand Up @@ -123,7 +135,7 @@
# list_opportunities = petition.get_opportunities()
# print(list_opportunities)

""" ***here you can list all t3jpyhrhu2r9ac6cw4uta7sf9he opportunities in pipeline, not receive anyshit"""
""" ***here you can list all the opportunities in pipeline, not receive anyshit"""
# list_all_opportunities = petition.get_opportunities_pipeline()
# print(list_all_opportunities)

Expand Down

0 comments on commit 4e2ee38

Please sign in to comment.