From 9c500c5b0d6fce27255afa252325df04317a1c91 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 2 Oct 2012 16:28:47 -0400 Subject: [PATCH] Rename /api/v1/get_updates to /api/v1/get_messages. (imported from commit f856637158cf9fda64ba333b532a5941de8fcbab) --- common.py | 2 +- examples/curl-examples | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 examples/curl-examples diff --git a/common.py b/common.py index 76d9a36..eaa221e 100644 --- a/common.py +++ b/common.py @@ -26,7 +26,7 @@ class HumbugAPI(): options["email"] = self.email options["api-key"] = self.api_key submit_data = urllib.urlencode([(k, v.encode('utf-8')) for k,v in options.items()]) - res = self.browser.open(self.base_url + "/api/v1/get_updates", submit_data) + res = self.browser.open(self.base_url + "/api/v1/get_messages", submit_data) return simplejson.loads(res.read())['zephyrs'] def call_on_each_message(self, callback, options = {}): diff --git a/examples/curl-examples b/examples/curl-examples old mode 100644 new mode 100755 index b12ee10..db6b43a --- a/examples/curl-examples +++ b/examples/curl-examples @@ -1,4 +1,7 @@ #!/bin/sh # Two quick API tests using curl -curl 127.0.0.1:8000/api/send_message -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com" -d "type=personal" -d "new_zephyr=test" -d "recipient=tabbott@humbughq.com" -curl 127.0.0.1:8000/api/get_updates_new -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com +curl -k --digest -u tabbott:xxxxxxxxxxxxxxxxx https://app.humbughq.com/api/v1/send_message -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com" -d "type=personal" -d "new_zephyr=test" -d "recipient=tabbott@humbughq.com" +curl -k --digest -u "tabbott:xxxxxxxxxxxxxxxxx" https://app.humbughq.com/api/v1/get_messages -d "api-key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" -d "email=tabbott@humbughq.com" + +# Replace '-k --digest -u tabbott:xxxxxxxxxxxxxxxxx https://app.humbughq.com' +# with "http://127.0.0.1:8000" for local testing