Skip to content

Instantly share code, notes, and snippets.

@almost
Created October 24, 2012 12:56
Show Gist options
  • Save almost/3945900 to your computer and use it in GitHub Desktop.
Save almost/3945900 to your computer and use it in GitHub Desktop.
Allocate API example in Python
# Using the "requests" library http://docs.python-requests.org/en/latest/
import requests
token = 'yourtoken'
response = requests.get('https://example.allocate.co.uk/api/v2/offers/1', auth=(token, 'x'))
assert response.status_code == 200
print response.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment