Skip to content

Commit

Permalink
Add historical endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
augusthorlen0 committed Feb 21, 2024
1 parent bd93619 commit 58b372c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tap_estr/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,14 @@ class EstrLatest(TapEstrStream):
th.Property("date", th.StringType),
th.Property("value", th.NumberType),
).to_dict()

class EstrHistorical(TapEstrStream):
"""To fetch the latest €STR"""

name = "historical"
path = "/historical"
primary_keys: t.ClassVar[list[str]] = ["date"]
schema = th.PropertiesList(
th.Property("date", th.StringType),
th.Property("value", th.NumberType),
).to_dict()
1 change: 1 addition & 0 deletions tap_estr/tap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ def discover_streams(self) -> list[streams.TapEstrStream]:
"""
return [
streams.EstrLatest(self),
streams.EstrHistorical(self),
]


Expand Down

0 comments on commit 58b372c

Please sign in to comment.