Ejemplo n.º 1
0
    'id': fields.Integer(),
    'title': fields.String(),
})

SPEAKER = api.model(
    'Speaker',
    {
        'id': fields.Integer(required=True),
        'name': fields.String(required=True),
        'photo': fields.Upload(),
        'small': fields.Upload(),
        'thumbnail': fields.Upload(),
        'icon': fields.Upload(),
        'short_biography': fields.String(),
        'long_biography': fields.String(),
        'email': fields.Email(required=True),
        'mobile': fields.String(),
        'featured': fields.Boolean(),
        'website': fields.Uri(),
        'twitter':
        fields.String(),  # not sure for now whether uri or string field
        'facebook': fields.String(),
        'github': fields.String(),
        'linkedin': fields.String(),
        'organisation': fields.String(required=True),
        'position': fields.String(),
        'country': fields.String(required=True),
        'sessions': fields.List(fields.Nested(SPEAKER_SESSION)),
        'city': fields.String(),
        'heard_from': fields.String(),
        'speaking_experience': fields.String(),
Ejemplo n.º 2
0
from app.helpers.ticketing import TicketingManager

from app.api.helpers.helpers import (requires_auth, can_access,
                                     replace_event_id)
from app.api.helpers.utils import POST_RESPONSES
from app.api.helpers.utils import Resource
from app.api.helpers import custom_fields as fields

api = Namespace('attendees', description='Attendees', path='/')

ATTENDEE = api.model(
    'TicketHolder', {
        'id': fields.Integer(),
        'firstname': fields.String(),
        'lastname': fields.String(),
        'email': fields.Email(),
        'checked_in': fields.Boolean(),
        'order': fields.Nested(ORDER, allow_null=False),
        'ticket': fields.Nested(TICKET, allow_null=False)
    })


@api.route('/events/<string:event_id>/attendees/')
class AttendeesList(Resource):
    @requires_auth
    @replace_event_id
    @can_access
    @api.doc('check_in_toggle', responses=POST_RESPONSES)
    @api.marshal_list_with(ATTENDEE)
    def get(self, event_id):
        """Get attendees of the event"""
Ejemplo n.º 3
0
SOCIAL_LINK_POST = api.clone('SocialLinkPost', SOCIAL_LINK)
del SOCIAL_LINK_POST['id']

EVENT = api.model(
    'Event', {
        'id':
        fields.Integer(required=True),
        'identifier':
        fields.String(),
        'name':
        fields.String(required=True),
        'event_url':
        fields.Uri(),
        'email':
        fields.Email(),
        'logo':
        fields.Upload(),
        'start_time':
        fields.DateTime(required=True),
        'end_time':
        fields.DateTime(required=True),
        'timezone':
        fields.String(),
        'latitude':
        fields.Float(),
        'longitude':
        fields.Float(),
        'background_image':
        fields.Upload(attribute='background_url'),
        'placeholder_url':