cc-2182: Convert back to restful design

-done
This commit is contained in:
martin 2011-05-02 16:33:37 -04:00
parent 9e01e389ea
commit 8e2019a935
10 changed files with 9 additions and 8 deletions

View file

@ -222,11 +222,12 @@ class AirTimeApiClient(ApiClientInterface):
try:
#src = "http://%s:%s/%s/%s" % \
#(self.config["base_url"], str(self.config["base_port"]), self.config["api_base"], self.config["get_media_url"])
src = uri
src = uri + "/api_key/%%api_key%%"
logger.info("try to download from %s to %s", src, dst)
src = src.replace("%%api_key%%", self.config["api_key"])
# check if file exists already before downloading again
filename, headers = urllib.urlretrieve(src, dst)
logger.info(headers)
except Exception, e:
logger.error("%s", e)