Created
July 29, 2013 19:10
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@MisterRayCo maybe useful...