def post(self, name=None, author=None): """ ' PURPOSE ' Given a trip name and author identifier, create ' a new trip. Returns the identifier of the new trip. ' PARAMETERS ' <str name> ' <str author> identifier ' RETURNS ' dict( id ) ' id -> the identifier of the created trip """ author_key = UserModel.key_from_id(author) trip = TripModel(name=name, author=author_key).save() return { 'id': trip.key.id }