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