[schema] Add a Client model keeping track of the sending client.

(imported from commit 31a430b1de14ce973addafd5d13ace049a8f8091)
This commit is contained in:
Tim Abbott 2012-10-19 15:30:42 -04:00
parent 1ffc2c1cb7
commit 77f286ca02
2 changed files with 3 additions and 0 deletions

View file

@ -18,6 +18,8 @@ class HumbugAPI():
def do_api_query(self, request, url):
request["email"] = self.email
request["api-key"] = self.api_key
if "client" not in request:
request["client"] = "API"
while True:
try:
res = requests.post(urlparse.urljoin(self.base_url, url), data=request, verify=True)

View file

@ -99,6 +99,7 @@ def send_humbug(zeph):
elif isinstance(zeph[key], str):
zeph[key] = zeph[key].decode("utf-8")
zeph['client'] = "zephyr_mirror"
return humbug_client.send_message(zeph)
def fetch_fullname(username):