Beispiel #1
0
class SearchParams(PaginatedMixin, SortableMixin, Model):

    class Options:
        serialize_when_none = False

    id = ListType(StringType)
    q = StringType()
    label = ListType(StringType)
    category = ListType(StringType)
    start = ModelType(DateTimeRange)
    start_around = ModelType(DateAround)
    end = ModelType(DateTimeRange)
    end_around = ModelType(DateAround)
    active = ModelType(DateTimeRange)
    updated = ModelType(DateTimeRange)
    state = StringType(choices=('active', 'deleted'))
    local_rank_level = ListType(IntType(min_value=1, max_value=5))
    local_rank = ModelType(IntRange)
    rank_level = ListType(IntType(min_value=1, max_value=5))
    rank = ModelType(IntRange)
    country = ListType(StringType)
    location_around = ModelType(LocationAround)
    within = StringListType(StringModelType(Area), separator="+")
    place = ModelType(Place)
    signal = ModelType(Signal)
    relevance = ListType(StringType)
Beispiel #2
0
class Event(Model):
    class Options:
        serialize_when_none = True

    id = StringType()
    title = StringType()
    description = StringType()
    start = DateTimeType()
    end = DateTimeType()
    timezone = StringType()
    duration = IntType()
    category = StringType()
    labels = ListType(StringType())
    country = StringType()
    rank = IntType()

    # `local_rank`, `aviation_rank`, and `phq_attendance` are paid features.
    # They will only show up in your response body if you
    # have subscribed to them.
    local_rank = IntType()
    aviation_rank = IntType()
    phq_attendance = IntType()

    entities = ListType(ModelType(Entities))
    location = GeoJSONPointType()
    place_hierarchies = ListType(ListType(StringType()))
    scope = StringType()
    relevance = FloatType()
    state = StringType()
    first_seen = DateTimeType()
    updated = DateTimeType()
    deleted_reason = StringType()
    duplicate_of_id = StringType()
Beispiel #3
0
class SearchParams(PaginatedMixin, SortableMixin, Model):
    class Options:
        serialize_when_none = False

    id = ListType(StringType)
    q = StringType()
    label = ListType(StringType)
    category = ListType(StringType)
    start = ModelType(DateTimeRange)
    start_around = ModelType(DateAround)
    end = ModelType(DateTimeRange)
    end_around = ModelType(DateAround)
    active = ModelType(DateTimeRange)
    updated = ModelType(DateTimeRange)
    state = StringType(choices=('active', 'deleted'))
    rank = ModelType(IntRange)
    rank_level = ListType(IntType(min_value=1, max_value=5))

    # `local_rank` and `aviation_rank` are paid features.
    # If you haven't subscribed to a paid feature, using it as a
    # search param will have no effect on your search results.
    local_rank = ModelType(IntRange)
    local_rank_level = ListType(IntType(min_value=1, max_value=5))
    aviation_rank = ModelType(IntRange)
    aviation_rank_level = ListType(IntType(min_value=1, max_value=5))

    country = ListType(StringType)
    location_around = ModelType(LocationAround)
    within = StringListType(StringModelType(Area), separator="+")
    place = ModelType(Place)
    signal = ModelType(Signal)
    relevance = ListType(StringType)
    brand_unsafe = ModelType(BrandUnsafe)
    entity = ModelType(Entity)
Beispiel #4
0
class Event(Model):
    class Options:
        serialize_when_none = True

    id = StringType()
    title = StringType()
    description = StringType()
    start = DateTimeType()
    end = DateTimeType()
    timezone = StringType()
    duration = IntType()
    category = StringType()
    labels = ListType(StringType())
    country = StringType()
    rank = IntType()
    local_rank = IntType()
    entities = ListType(ModelType(Entities))
    location = GeoJSONPointType()
    place_hierarchies = ListType(ListType(StringType()))
    scope = StringType()
    relevance = FloatType()
    state = StringType()
    first_seen = DateTimeType()
    updated = DateTimeType()
    deleted_reason = StringType()
    duplicate_of_id = StringType()
Beispiel #5
0
class NumberDimension(Model):

    type = StringType()
    count = IntType()
    min = IntType()
    max = IntType()
    avg = FloatType()
    std_deviation = FloatType()
Beispiel #6
0
class ImpactDay(Model):

    date = DateType()
    count = IntType()
    impact = IntType()

    rank_levels = DictType(IntType, export_level=NONEMPTY)
    rank_levels_impact = DictType(IntType, export_level=NONEMPTY)

    aviation_rank_levels = DictType(IntType, export_level=NONEMPTY)
    aviation_rank_levels_impact = DictType(IntType, export_level=NONEMPTY)

    categories = DictType(IntType)
    categories_impact = DictType(IntType)
Beispiel #7
0
class AccessToken(Model):

    access_token = StringType()
    token_type = StringType()
    scope = StringListType(StringType, separator=" ")
    refresh_token = StringType(serialize_when_none=False)
    expires_in = IntType(serialize_when_none=False)
Beispiel #8
0
class CountResultSet(Model):

    count = IntType()
    top_rank = FloatType()
    rank_levels = DictType(IntType)
    categories = DictType(IntType)
    labels = DictType(IntType)
Beispiel #9
0
class CalendarDay(Model):

    date = DateType()
    count = IntType()
    top_rank = FloatType()
    rank_levels = DictType(IntType)
    categories = DictType(IntType)
    labels = DictType(IntType)
    top_events = ModelType(EventResultSet)
Beispiel #10
0
class TopEventsSearchParams(SortableMixin, Model):

    limit = IntType(min_value=0, max_value=10)
Beispiel #11
0
class CountAnalysisComponent(Model):

    count = IntType()
    expected = FloatType()
    excess = FloatType()
Beispiel #12
0
class CategoryDimensionComponent(Model):

    name = StringType()
    count = IntType()
Beispiel #13
0
class DateDimension(Model):

    type = StringType()
    count = IntType()
    min = DateTimeType()
    max = DateTimeType()
Beispiel #14
0
class SignalDataPoints(Model):

    id = StringType(required=True)
    data_points = ListType(ModelType(DataPoint), required=True)
    chunk_size = IntType(default=1000, max_value=5000, required=True)