Skip to content

Commit

Permalink
Add entities to events
Browse files Browse the repository at this point in the history
  • Loading branch information
mbonnefoy committed Jul 4, 2019
1 parent db2f113 commit 51fc43b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions predicthq/endpoints/v1/events/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,17 @@ class Options:
brand_unsafe = ModelType(BrandUnsafe)


class Entities(Model):

class Options:
serialize_when_none = True

entity_id = StringType()
name = StringType()
type = StringType()
formatted_address = StringType()


class Event(Model):

class Options:
Expand All @@ -55,6 +66,7 @@ class Options:
country = StringType()
rank = IntType()
local_rank = IntType()
entities = ListType(ModelType(Entities))
location = GeoJSONPointType()
place_hierarchies = ListType(ListType(StringType()))
scope = StringType()
Expand Down

0 comments on commit 51fc43b

Please sign in to comment.