class LinkedLoungeSchema(LoungeSchema): href = ma.URLFor('lounge_ep', lounge_id = '<id>') loungeUsers = ma.Hyperlinks({ 'href': ma.URLFor('lounge_users_ep', lounge_id = '<id>') }) pictures = ma.Hyperlinks({ 'href': ma.URLFor('lounge_pictures_ep', lounge_id = '<id>') }) web = ma.Hyperlinks({ 'href': ma.URLFor('log', lounge_id = '<id>') })
class LinkedUserSchema(RoledUserSchema): href = ma.URLFor('user_ep', user_id = '<id>') key = ma.Hyperlinks({ 'href': ma.URLFor('key_ep', user_id = '<id>') }) userLounges = ma.Hyperlinks({ 'href': ma.URLFor('user_lounges_ep', user_id = '<id>') }) hostApplications = ma.Hyperlinks({ 'href': ma.URLFor('user_host_applications_ep', user_id = '<id>') }) web = ma.Hyperlinks({ 'href': ma.URLFor('host_preview', host_id = '<id>') })
class UserLoungeListSchema(ma.Schema): items = ma.Nested(LinkedUserLoungeSchema, many = True, attribute = 'user_lounges') href = ma.URLFor('user_lounges_ep', user_id = '<user_id>')
class LinkedUserLoungeSchema(UserLoungeSchema): href = ma.URLFor('user_lounge_ep', user_id = '<user_id>', lounge_id = '<lounge_id>')
class UserLoungeSchema(UserLoungeBaseSchema): lounge = ma.Hyperlinks({ 'href': ma.URLFor('lounge_ep', lounge_id = '<lounge_id>') }, required = True)
class LoungeListSchema(ma.Schema): items = ma.Nested(LinkedLoungeSchema, many = True, attribute = 'lounges') href = ma.URLFor('lounges_ep')
class UserPictureSchema(ma.Schema): href = ma.URLFor('picture_ep', picture_id = '<id>') id = ma.String('picture_ep', picture_id = '<id>') image = ma.URLFor('picture_image_ep', picture_id = '<id>')
class PictureListSchema(ma.Schema): items = ma.Nested(PictureSchema, many = True, attribute = 'pictures') href = ma.URLFor('pictures_ep')
class LinkedLoungePictureSchema(LoungePictureSchema): href = ma.URLFor('lounge_picture_ep', picture_id = '<id>', lounge_id = '<lounge_id>')
class KeySchema(ma.Schema): key = ma.String(required = True) href = ma.URLFor('key_ep', user_id = '<user.id>')
class PictureSchema(ma.Schema): href = ma.URLFor('picture_ep', picture_id = '<id>') image = ma.URLFor('picture_image_ep', picture_id = '<id>')
class UserHostApplicationListSchema(ma.Schema): items = ma.Nested(LinkedUserHostApplicationSchema, many = True, attribute = 'user_host_applications') href = ma.URLFor('user_host_applications_ep', user_id = '<user_id>')
class UserListSchema(ma.Schema): items = ma.Nested(UserSchema, many = True, attribute = 'users') href = ma.URLFor('users_ep')
class LinkedUserHostApplicationSchema(UserHostApplicationSchema): href = ma.URLFor('user_host_application_ep', host_application_id = '<id>', user_id = '<user.id>')
class LoungeUserSchema(UserLoungeBaseSchema): user = ma.Hyperlinks({ 'href': ma.URLFor('user_ep', user_id = '<user_id>') }, required = True)
class LoungePictureListSchema(ma.Schema): items = ma.Nested(LinkedLoungePictureSchema, many = True, attribute = 'lounge_pictures') href = ma.URLFor('lounge_pictures_ep', lounge_id = '<lounge_id>')
class LinkedLoungeUserSchema(LoungeUserSchema): href = ma.URLFor('lounge_user_ep', user_id = '<user_id>', lounge_id = '<lounge_id>')
class LoungeUserListSchema(ma.Schema): items = ma.Nested(LinkedLoungeUserSchema, many = True, attribute = 'lounge_users') href = ma.URLFor('lounge_users_ep', lounge_id = '<lounge_id>')