Class: Repositories::Timeline
- Inherits:
-
BaseRepository
- Object
- BaseRepository
- Repositories::Timeline
- Defined in:
- lib/covid19/lib/repositories/virus_tracker/timeline_repository.rb
Constant Summary
Constants inherited from BaseRepository
BaseRepository::DEFAULT_RESOURCE, BaseRepository::GLOBAL_STATS_URL
Instance Attribute Summary
Attributes inherited from BaseRepository
Instance Method Summary collapse
Methods inherited from BaseRepository
Constructor Details
This class inherits a constructor from BaseRepository
Instance Method Details
#by_country(country:) ⇒ Object
9 10 11 |
# File 'lib/covid19/lib/repositories/virus_tracker/timeline_repository.rb', line 9 def by_country(country:) retrieve(resource: DEFAULT_RESOURCE, query: { countryTimeline: country&.upcase }) end |
#global ⇒ Object
5 6 7 |
# File 'lib/covid19/lib/repositories/virus_tracker/timeline_repository.rb', line 5 def global retrieve(resource: 'timeline/map-data.json', query: {}) end |