Skip to content

Instantly share code, notes, and snippets.

@alq666
Created July 29, 2013 19:10
Show Gist options
  • Save alq666/6106884 to your computer and use it in GitHub Desktop.
Save alq666/6106884 to your computer and use it in GitHub Desktop.
Simple python script to pull json out of desk (in this case, just cases)
import simplejson as json
import pycurl
# Run pip install pycurl before
url = "https://datadog.desk.com/api/v2/cases"
c = pycurl.Curl()
c.setopt(pycurl.URL, url)
c.setopt(pycurl.HTTPHEADER, ["Accept: application/json"])
c.setopt(pycurl.USERPWD, "username:password")
data = c.perform()
print json.loads(data)
@alq666
Copy link
Author

alq666 commented Jul 29, 2013

@MisterRayCo maybe useful...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment