Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions predicthq/endpoints/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ class Place(Model):
class Options:
serialize_when_none = False

scope = ListType(IntType)
exact = ListType(IntType)
scope = ListType(StringType)
exact = ListType(StringType)


class DateTimeRange(Model):
Expand Down
2 changes: 1 addition & 1 deletion predicthq/endpoints/v1/events/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class TopEventsSearchParams(SortableMixin, Model):
class CalendarParams(SearchParams):

top_events = ModelType(TopEventsSearchParams)
view = StringType(choices=('active',))
view = StringType(choices=('active', 'start'))


class CalendarDay(Model):
Expand Down
6 changes: 4 additions & 2 deletions predicthq/endpoints/v1/signals/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from schematics.transforms import blacklist, wholelist, whitelist

from predicthq.endpoints.schemas import Model, StringType, ListType, ModelType, DateTimeType, ResultSet, ResultType, SortableMixin, FloatType, IntType, DictType, \
PaginatedMixin, DateTimeRange, StringListType, StringModelType, Area, BooleanType, DateType
PaginatedMixin, DateTimeRange, StringListType, StringModelType, Area, BooleanType, DateType, Place


class SignalsSearchParams(SortableMixin, Model):
Expand Down Expand Up @@ -94,7 +94,7 @@ class SignalResultSet(ResultSet):
class DataPoint(Model):

uid = StringType(required=True)
date = DateTimeType(requird=True)
date = DateTimeType(required=True)
latitude = FloatType(min_value=-90, max_value=90, required=True)
longitude = FloatType(min_value=-180, max_value=180, required=True)
initiated = DateTimeType()
Expand Down Expand Up @@ -202,4 +202,6 @@ class Options:
significance = IntType(min_value=0, max_value=100)
lead = BooleanType(default=False)
span = BooleanType(default=False)
place = ModelType(Place)

# @todo: Support custom dimensions from signal
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def read(*parts):
install_requires=[
"six>=1.9.0",
"requests>=2.7.0",
"schematics>=2.0.0.dev2",
"schematics==2.0.0.dev2",
"python-dateutil>=2.4.2",
"pytz>=2015.4",
],
Expand Down