publishers_25.py 383 B

12345678910
  1. def patch(self, where, item_id, **update):
  2. """Returns True if successful; otherwise, False"""
  3. body = json.dumps(update, cls=JSONEncoder)
  4. item_uri = self.uri % (where, str(item_id))
  5. h = httplib2.Http()
  6. response, content = h.request(
  7. item_uri, method="PATCH", body=body, headers=self.headers
  8. )
  9. return response["status"] == "202", response, content