def preferences(self, request, segments): """/addresses/<email>/preferences""" if len(segments) != 0: return NotFound(), [] if self._address is None: return NotFound(), [] child = Preferences(self._address.preferences, 'addresses/{0}'.format(self._address.email)) return child, []
def preferences(self, request, segments): """/members/<id>/preferences""" if len(segments) != 0: return NotFound(), [] if self._member is None: return NotFound(), [] child = Preferences(self._member.preferences, 'members/{0}'.format(self._member.member_id.int)) return child, []
def preferences(self, request, segments): """/addresses/<email>/preferences""" if len(segments) != 0: return BadRequest(), [] if self._user is None: return NotFound(), [] child = Preferences(self._user.preferences, 'users/{0}'.format(self._user.user_id.int)) return child, []
def preferences(self, context, segments): """/users/<id>/preferences""" if len(segments) != 0: return BadRequest(), [] if self._user is None: return NotFound(), [] child = Preferences( self._user.preferences, 'users/{}'.format(self.api.from_uuid(self._user.user_id))) return child, []
def preferences(self, context, segments): """/members/<id>/preferences""" if len(segments) != 0: return NotFound(), [] if self._member is None: return NotFound(), [] member_id = self.api.from_uuid(self._member_id) child = Preferences(self._member.preferences, 'members/{}'.format(member_id)) return child, []