-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from LautaroParada/fundamental-econnomical-api
Implementarion of Economic events api
- Loading branch information
Showing
3 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
eod/fundamental_economic_data/economic_events_data_api/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Tue Jan 4 16:27:44 2022 | ||
@author: lauta | ||
""" | ||
|
||
from .economic_events_data import EconomicEventsData |
18 changes: 18 additions & 0 deletions
18
eod/fundamental_economic_data/economic_events_data_api/economic_events_data.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
Created on Tue Jan 4 16:28:22 2022 | ||
@author: lauta | ||
""" | ||
|
||
from eod.request_handler_class import RequestHandler | ||
|
||
class EconomicEventsData(RequestHandler): | ||
def __init__(self, api_key:str, timeout:int): | ||
# base URL's of the API | ||
self.URL_ECONOMIC_EVENT_DATA = 'https://eodhistoricaldata.com/api/economic-events/' | ||
super().__init__(api_key, timeout) | ||
|
||
def get_economic_events(self, **query_params): | ||
self.endpoint = self.URL_ECONOMIC_EVENT_DATA | ||
return super().handle_request(self.endpoint, query_params) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters