Skip to content

Commit

Permalink
closed #36
Browse files Browse the repository at this point in the history
- indices functions for data retrieval added to investpy
- tests/ updated in order to improve codecov by covering indices retrieval functions
- tests/test_investpy.py functions splitted in order to be more clear
- coversion to dict and json objects added to Data class
- docs/ generated
  • Loading branch information
Álvaro Bartolomé del Canto committed Sep 24, 2019
1 parent 9ba82fb commit 73f043e
Show file tree
Hide file tree
Showing 7 changed files with 1,073 additions and 81 deletions.
Binary file modified docs/_build/doctrees/environment.pickle
Binary file not shown.
22 changes: 22 additions & 0 deletions investpy/Data.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,25 @@ def etf_as_json(self):
'close': self.close,
'currency': self.currency,
}

def index_to_dict(self):
return {
'Date': self.date,
'Open': self.open,
'High': self.high,
'Low': self.low,
'Close': self.close,
'Volume': self.volume,
'Currency': self.currency,
}

def index_as_json(self):
return {
'date': self.date.strftime('%d/%m/%Y'),
'open': self.open,
'high': self.high,
'low': self.low,
'close': self.close,
'volume': self.volume,
'currency': self.currency,
}
Loading

0 comments on commit 73f043e

Please sign in to comment.