Coverage for marvin.views.entries : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" marvin.views.entries ~~~~~~~~~~~~~~~~~~~~
CRUD endpoints for stream entries.
""" # pylint: disable=no-self-use
""" RUD interface to entries. """
""" Get the entry with the given ID. """ 'entry': entry.to_json(), }
def put(self, entry_id): """ Update the entry with the given ID. """ 'msg': 'Entry updated.', 'entry': entry.to_json(), } 'msg': 'Some attributes did not pass validation.', 'errors': form.errors, }, 400 else: 'msg': "Only the stream creator can edit it's entries.", }, 403
def delete(self, entry_id): """ Delete the entry with the given ID. """ else: 'msg': 'Only the stream creator can delete entries.', }, 403
""" Create interface to entries. """
def post(self, stream_id): """ Create new entry. """ 'msg': 'Entry created.', 'entry': entry.to_json(), }, 201 'msg': 'Some attributes did not pass validation.', 'errors': form.errors, }, 400 else: 'msg': 'Only the creator can add entries to streams', }, 403 |