Skip to content

Instantly share code, notes, and snippets.

@tom-henderson
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tom-henderson/d7db9adf6caf4c7c3fbf to your computer and use it in GitHub Desktop.
Save tom-henderson/d7db9adf6caf4c7c3fbf to your computer and use it in GitHub Desktop.
Eventfinda quick start.
import base64
import requests
from pprint import pprint
url = "http://api.eventfinder.co.nz/v2/events.json"
username = "xxxxx"
password = "xxxxx"
auth = base64.encodestring('%s:%s' % (username, password)).replace('\n','')
headers = {'Authorization': "Basic %s" % auth }
payload = {'rows': 1} # Number of results
result = requests.get(url, params=payload, headers=headers)
pprint(result.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment