Skip to content

Commit

Permalink
formatted test_request with black
Browse files Browse the repository at this point in the history
  • Loading branch information
GitThisJoel committed Apr 14, 2022
1 parent 8a23487 commit c9c7e74
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions test_request/test_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@
access_cred = json.load(f)
f.close()

client_id = access_cred['client_id']
client_secret = access_cred['client_secret']
redirect_uri="https://httpbin.org/get"
client_id = access_cred["client_id"]
client_secret = access_cred["client_secret"]
redirect_uri = "https://httpbin.org/get"

url = "https://purchase.izettle.com/purchases/v2"

authorization_base_url = "https://oauth.zettle.com/authorize"
token_url = "https://oauth.zettle.com/token"
scope = ["READ:PURCHASE"]

zettle = OAuth2Session(client_id,
scope=scope,
redirect_uri=redirect_uri)
zettle = OAuth2Session(client_id, scope=scope, redirect_uri=redirect_uri)

authrization_url, state = zettle.authorization_url(authorization_base_url)

Expand All @@ -28,15 +26,12 @@

print(client_id)

ret = zettle.fetch_token(token_url,
include_client_id=True,
client_secret=client_secret,
authorization_response=redirect_response
)
ret = zettle.fetch_token(
token_url,
include_client_id=True,
client_secret=client_secret,
authorization_response=redirect_response,
)

r = zettle.get("https://purchase.izettle.com/purchases/v2?limit=50&descending=true")
print(r)




0 comments on commit c9c7e74

Please sign in to comment.