Skip to content

Commit

Permalink
Connection: Be more compliant to the Space-Market API v1.
Browse files Browse the repository at this point in the history
  • Loading branch information
YtvwlD committed Sep 13, 2017
1 parent 09158d5 commit 9b3e90f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions metecli/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_user(self, uid):

def modify_user(self, user):
"""Modifys an existing user."""
r = requests.patch(urljoin(self._base_url, "/users/{}.json").format(user["id"]), json={"user": user})
r = requests.patch(urljoin(self._base_url, "/users/{}.json").format(user["id"]), json=user)
assert r.ok

def delete_user(self, uid):
Expand All @@ -61,7 +61,7 @@ def buy(self, uid, did):

def pay(self, uid, amount):
"""Pay an amount."""
r = requests.get(urljoin(self._base_url, "/users/{}/payment.json?amount={}".format(uid, amount))) # TODO: pay.json
r = requests.get(urljoin(self._base_url, "/users/{}/payment.json?amount={}".format(uid, amount)))
print(r.text)
assert r.ok

Expand All @@ -78,7 +78,7 @@ def drinks(self):

def modify_drink(self, drink):
"""Modifys an existing drink."""
r = requests.patch(urljoin(self._base_url, "/drinks/{}.json").format(drink["id"]), json={"drink": drink})
r = requests.patch(urljoin(self._base_url, "/drinks/{}.json").format(drink["id"]), json=drink)
assert r.ok

def get_drink_defaults(self):
Expand Down

0 comments on commit 9b3e90f

Please sign in to comment.