Exemplo n.º 1
0
class TwitcastChannelModel:
    id = doc.String("Twitcaster user id")
    name = doc.String("Twitcaster channel name.")
    description = doc.String("The Channel Description.")
    thumbnail = doc.String("The Channel profile picture.")
    followerCount = doc.Integer("The channels followers count.")
    level = doc.Integer("The channels level.")
Exemplo n.º 2
0
class LockLog:
    type = doc.String("lock or unlock")
    ip = doc.String("Locked ip")
    current_ip_owner = doc.Integer("Locked user's id")
    operator = doc.Integer("User's id who issues lock")
    lock_until = doc.String("lock or unlock date YYYY-mm-DD HH:MM:SS")
    id = doc.String("MongoDb id")
Exemplo n.º 3
0
class VideoSearchRequest:
    search_str = doc.String()
    channel_link = doc.String()
    order_by = doc.String()
    offset = doc.Integer()
    limit = doc.Integer()
    favorites = Trinary()
Exemplo n.º 4
0
def json_schema_obj2model_obj(agent, msg_type, obj):
    rv = {}
    # print('\n\n-- key: {}, obj {}'.format(k, ppjson(obj)))
    required = obj.get('required', [])
    if 'properties' in obj:
        for p in obj['properties']:
            if p == 'proxy-did':
                rv[p] = doc.String(description=p, required=proxy_did_required(agent, msg_type))
            elif obj['properties'][p]['type'] == 'string':
                rv[p] = doc.String(description=p, required=(p in required))
            elif obj['properties'][p]['type'] == 'integer':
                rv[p] = doc.Integer(description=p, required=(p in required))
            elif obj['properties'][p]['type'] == 'array':
                sample_items = []  # sanic_openapi 0.4.0 chokes on empty items
                if obj['properties'][p]['items']['type'] == 'string':
                    sample_items.append(doc.String(description=p, required=(p in required)))
                elif obj['properties'][p]['items']['type'] == 'integer':
                    sample_items.append(doc.Integer(description=p, required=(p in required)))
                elif obj['properties'][p]['items']['type'] == 'object':
                    sample_items.append({k: k for k in obj['properties'][p]['items']['properties']})
                else:
                    sample_items.append('sample')
                rv[p] = doc.List(description=p, items=sample_items, required=(p in required))
            elif obj['properties'][p]['type'] == 'object':
                rv[p] = json_schema_obj2model_obj(agent, msg_type, obj['properties'][p])
    else:
        rv = doc.Dictionary(description='', required=True)
    # print('\n-->> returning {}'.format(rv))
    return rv
Exemplo n.º 5
0
 class task_query(organization_team):
     start_date = doc.Integer(
         description=
         'The start date in form of timestamp from the epoch in milliseconds'
     )
     end_date = doc.Integer(
         description=
         'The end date in form of timestamp from the epoch in milliseconds')
Exemplo n.º 6
0
class TwitcastChannelModel:
    id = doc.String("Twitcaster user id")
    name = doc.String("Twitcaster channel name.")
    description = doc.String("The Channel Description.")
    thumbnail = doc.String("The Channel profile picture.")
    followerCount = doc.Integer("The channels followers count.")
    level = doc.Integer("The channels level.")
    platform = doc.String(description="(Ignore this)", choices=["twitcasting"])
Exemplo n.º 7
0
class TwitchChannelModel:
    id = doc.String("Twitch username")
    user_id = doc.String("Twitch user id.")
    name = doc.String("Twitch channel name.")
    description = doc.String("The Channel Description.")
    thumbnail = doc.String("The Channel profile picture.")
    followerCount = doc.Integer("The channels followers count.")
    viewCount = doc.Integer("The channels views count.")
Exemplo n.º 8
0
class Person:
    id = doc.Integer("ID")
    username = doc.String("Username")
    email = doc.String("Email", required=False)
    phone = doc.String("Phone", required=False)
    sex = doc.String("Sex")
    zone = doc.String("Zone", required=False)
    create_datetime = doc.Integer("Created", required=False)
Exemplo n.º 9
0
class Pagination:
    """
    Pagination
    """

    total = doc.Integer("total count")
    page = doc.Integer("current page number")
    last_page = doc.Integer("last page number")
    per_page = doc.Integer("number of results per page")
Exemplo n.º 10
0
class TwitchChannelModel:
    id = doc.String("Twitch username")
    user_id = doc.String("Twitch user id.")
    name = doc.String("Twitch channel name.")
    description = doc.String("The Channel Description.")
    thumbnail = doc.String("The Channel profile picture.")
    followerCount = doc.Integer("The channels followers count.")
    viewCount = doc.Integer("The channels views count.")
    platform = doc.String(description="(Ignore this)", choices=["twitch"])
Exemplo n.º 11
0
 class test_result_query:
     page = doc.Integer(
         description='The page number of the whole test report list')
     limit = doc.Integer(description='The item number of a page')
     title = doc.String(description='The test suite name')
     priority = doc.Integer(description='The priority of the task')
     endpoint = doc.String(description='The endpoint that runs the test')
     sort = doc.String(description='The sort field')  #default='-run_date'
     start_date = doc.String(description='The start date')
     end_date = doc.String(description='The end date')
Exemplo n.º 12
0
 class _task_stat_of_a_day:
     succeeded = doc.Integer(
         description='The count of tasks ran successfully in the day'
     )
     failed = doc.Integer(
         description='The count of tasks failed to run in the day')
     running = doc.Integer(
         description='The count of tasks running right now')
     waiting = doc.Integer(
         description='The count of tasks waiting right now')
Exemplo n.º 13
0
 class endpoint_query(organization_team):
     page = doc.Integer(
         description='The page number of the whole test report list'
     )  #default=1,
     limit = doc.Integer(
         description='The item number of a page')  #default=10,
     title = doc.String(description='The test suite name')
     forbidden = doc.String(
         description='Get endpoints that are forbidden to connect')
     unauthorized = doc.String(
         description='Get endpoints that have not authorized to connect')
Exemplo n.º 14
0
class TwitcastLiveModel:
    id = doc.String("A twitcasting stream ID")
    title = doc.String("The stream title.")
    startTime = doc.Integer(
        "Scheduled/Real stream start time in UTC.",
        choices=[int(datetime.now(pytz.timezone("UTC")).timestamp())],
    )
    channel = doc.String("Twitcaster channel ID.")
    viewers = doc.Integer("Current viewers for this stream.")
    peakViewers = doc.Integer("Peak viewers for this stream.")
    platform = doc.String(description="(Ignore this)", choices=["twitcasting"])
class ExposureInfo:
    """
    Documentation class for the exposure info's entries.
    """

    date = doc.Date(required=True)
    duration = doc.Integer(required=True)
    attenuation_value = doc.Integer(required=True)
    attenuation_durations = doc.List(int, required=True)
    transmission_risk_level = doc.Integer(required=True)
    total_risk_score = doc.Integer(required=True)
Exemplo n.º 16
0
class YouTubeChannelModel:
    id = doc.String("A youtube channel ID")
    name = doc.String("The channel name.")
    description = doc.String("The channel description.")
    publishedAt = doc.String("The channel publication date.")
    subscriberCount = doc.Integer("The channel subscriber count.")
    videoCount = doc.Integer("The channel video/upload count.")
    viewCount = doc.Integer("The channel total views count.")
    thumbnail = doc.String("The channel profile picture.")
    group = doc.String("The livers group.")
    platform = doc.String(description="(Ignore this)", choices=["youtube"])
Exemplo n.º 17
0
class UserModel:
    id = doc.String('사용자 오브젝트 id')
    name = doc.String('이름')
    school = doc.String('학교')
    grade = doc.Integer('학년')
    klass = doc.Integer('반')
    number = doc.Integer('번호')
    photo = doc.String('프로필 사진')  # URL for profile
    user_type = doc.String('회원 종류')  # S / T
    email = doc.String('이메일')
    password = doc.String('패스워드')
class ExposureDetectionSummary:
    """
    Documentation class for the exposure_detection_summaries' entries.
    """

    date = doc.Date(required=True)
    matched_key_count = doc.Integer(required=True)
    days_since_last_exposure = doc.Integer(required=True)
    attenuation_durations = doc.List(int, required=True)
    maximum_risk_score = doc.Integer(required=True)
    exposure_info = doc.List(ExposureInfo, required=True)
Exemplo n.º 19
0
 class _package_summary:
     name = doc.String()
     summary = doc.String()
     description = doc.String()
     stars = doc.Integer()
     download_times = doc.Integer()
     package_type = doc.String()
     versions = doc.List(doc.String())
     upload_date = doc.Integer(
         description=
         'The upload date in form of timestamp from the epoch in milliseconds'
     )
Exemplo n.º 20
0
class BiliChannelsModel:
    id = doc.String("An User/Channel/Space BiliBili ID.",
                    choices=["123456789"])
    room_id = doc.String("BiliBili Live Room ID the streamer will use.",
                         choices=["12345678"])
    name = doc.String("BiliBili Channel/Space/User name.")
    description = doc.String("The Channel Signature/Description.")
    thumbnail = doc.String("The Channel profile picture.")
    subscriberCount = doc.Integer("The channels subscription/followers count.")
    viewCount = doc.Integer("The channels views count.")
    videoCount = doc.Integer("The channels published/uploaded videos count.")
    live = doc.Boolean("Is the channel currently live or not.",
                       choices=[True, False])
Exemplo n.º 21
0
class UploadedTemporaryExposureKey:
    """
    Documentation class for Uploaded Temporary Exposure Key.
    """

    key_data = doc.String(
        "The base64-encoded version of the 16-bytes key data.", required=True)
    rolling_start_number = doc.Integer(
        "The start number of the key's rolling period: timestamp / 600.",
        required=True)
    rolling_period = doc.Integer(
        "The key's validity period in rolling periods of 10 minutes. "
        "The field is optional, and defaults to 144.")
Exemplo n.º 22
0
class YouTubeScheduleModel:
    id = doc.String("A youtube video ID")
    title = doc.String("The video title.")
    startTime = doc.Integer(
        "Scheduled/Real stream start time in UTC.",
        choices=[int(datetime.now(pytz.timezone("UTC")).timestamp())],
    )
    channel = doc.String("YouTube Channel ID.")
    status = doc.String("Status of streams",
                        choices=["live", "upcoming", "past"])
    thumbnail = doc.String("Thumbnail of the stream.")
    viewers = doc.Integer("Current viewers for this stream.")
    group = doc.String("The livers group.")
    platform = doc.String(description="(Ignore this)", choices=["youtube"])
Exemplo n.º 23
0
 class _test_report_summary:
     id = doc.String(description='The task id')
     test_id = doc.String(
         description='The test id of the associated task')
     test_suite = doc.String(description='The test suite name')
     testcases = doc.List(doc.String())
     comment = doc.String()
     priority = doc.Integer(description='The priority of the task')
     run_date = doc.Integer(
         description=
         'The date in form of timestamp from the epoch in milliseconds'
     )
     tester = doc.String()
     status = doc.String()
Exemplo n.º 24
0
class Video:
    id = doc.Integer()
    description_path = doc.String()
    ext = doc.String()
    poster_path = doc.String()
    source_id = doc.String()
    title = doc.String()
    upload_date = doc.Date()
    video_path = doc.String()
    name = doc.String()
    caption_path = doc.String()
    idempotency = doc.String()
    info_json_path = doc.String()
    channel_id = doc.Integer()
Exemplo n.º 25
0
class ItemPutRequest:
    id = doc.Integer()  # Ignored in favor of URL
    brand = doc.String()
    name = doc.String(required=True)
    item_size = doc.Float(required=True)
    unit = doc.String(required=True)
    count = doc.Float(required=True)
    serving = doc.Float()
    category = doc.String()
    subcategory = doc.String()
    expiration_date = doc.Date()
    purchase_date = doc.Date()
    created_at = doc.DateTime()
    deleted_at = doc.DateTime()
    inventory_id = doc.Integer(required=True)
Exemplo n.º 26
0
            class _queuing_tasks:
                class _queuing_task:
                    endpoint = doc.String(description="The endpoint name")
                    endpoint_uid = doc.String(description="The endpoint uid")
                    priority = doc.Integer()
                    task = doc.String(description="The test name")
                    task_id = doc.String(description="The task id")
                    status = doc.String()

                endpoint_uid = doc.String(description="The endpoint uid")
                endpoint = doc.String(description="The endpoint name")
                priority = doc.Integer()
                waiting = doc.Integer()
                status = doc.String()
                tasks = doc.List(doc.Object(_queuing_task))
Exemplo n.º 27
0
class ChatModel:
    id = doc.String('대화 오브젝트 id')
    type = doc.String()  # image, text
    question_id = doc.String()
    sender = doc.String()  # mentor, mentee
    message = doc.String()
    timestamp = doc.Integer()
Exemplo n.º 28
0
class Model:
    name = doc.String(required=True)
    count = doc.Integer(required=True)
    fish = doc.Tuple()
    on = doc.Boolean()
    obj = doc.Dictionary()
    many = doc.Float()
Exemplo n.º 29
0
class FeedbackModel:
    id = doc.String('대화 오브젝트 id')
    question_id = doc.String()
    sender = doc.String()  # mentor, mentee
    user_id = doc.String()
    message = doc.String()
    timestamp = doc.Integer()
Exemplo n.º 30
0
class TeacherRequestModel:
    id = doc.String('선생님 리뷰 요청 오브젝트 id')
    question_id = doc.String()
    chat_id = doc.String()
    school = doc.String('학교 이름')
    message = doc.String('메세지')
    timestamp = doc.Integer()