Skip to content

Instantly share code, notes, and snippets.

@tristansokol
Created September 27, 2017 19:06
Show Gist options
  • Save tristansokol/3c7b4355ced16ee9aaee5ccd12ce8c70 to your computer and use it in GitHub Desktop.
Save tristansokol/3c7b4355ced16ee9aaee5ccd12ce8c70 to your computer and use it in GitHub Desktop.
# use Square's SDK to make your job easier
import squareconnect
from squareconnect.apis.locations_api import LocationsApi
# setup authorization with your access token
squareconnect.configuration.access_token = 'XXXXXXXXXXXXX'
# create an instance of the Location API class
api_instance = LocationsApi()
# call the API to list available locations and print the results
api_response = api_instance.list_locations()
print (api_response.locations)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment