import urllib2
URL_TO_AC_API = "https://my_ac_site/public/api.php"
TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
PATH_INFO = "/projects/2/milestones"
FORMAT = "xml"
# Put together a request with GET data:
req = urllib2.Request(URL_TO_AC_API+"?path_info="+PATH_INFO+"&token="+TOKEN+"&format="+FORMAT)
# Then add the POST data:
req.add_data("submitted=submitted")
f = urllib2.urlopen(req)
print f.read()
I am trying to use the API using Python. I've tried a few things, but can't seem to add any objects (reading seems to work fine). If you have any examples that you could share I'd appreciate it.
Casper