Class: Hdo::StortingImporter::DiskDataSource
- Inherits:
-
DataSource
- Object
- DataSource
- Hdo::StortingImporter::DiskDataSource
show all
- Defined in:
- lib/hdo/storting_importer/disk_data_source.rb
Constant Summary
Constants inherited
from DataSource
Hdo::StortingImporter::DataSource::DEFAULT_PERIOD, Hdo::StortingImporter::DataSource::DEFAULT_SESSION
Instance Method Summary
collapse
Constructor Details
Returns a new instance of DiskDataSource.
5
6
7
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 5
def initialize(root)
@root = Pathname.new(root)
end
|
Instance Method Details
#categories ⇒ Object
21
22
23
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 21
def categories
fetch "eksport/emner/index.html"
end
|
#committees(session_id = DEFAULT_SESSION) ⇒ Object
13
14
15
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 13
def committees(session_id = DEFAULT_SESSION)
fetch "eksport/komiteer/index.html?SesjonId=#{session_id}"
end
|
#districts ⇒ Object
17
18
19
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 17
def districts
fetch "eksport/fylker/index.html"
end
|
#issues(session_id = DEFAULT_SESSION) ⇒ Object
25
26
27
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 25
def issues(session_id = DEFAULT_SESSION)
fetch "eksport/saker/index.html?sesjonid=#{session_id}"
end
|
#parties(session_id = DEFAULT_SESSION) ⇒ Object
9
10
11
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 9
def parties(session_id = DEFAULT_SESSION)
fetch "eksport/partier/index.html?sesjonid=#{session_id}"
end
|
#propositions_for(vote_id) ⇒ Object
41
42
43
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 41
def propositions_for(vote_id)
fetch "eksport/voteringsforslag/index.html?voteringid=#{vote_id}"
end
|
#representatives(period = DEFAULT_PERIOD) ⇒ Object
29
30
31
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 29
def representatives(period = DEFAULT_PERIOD)
fetch "eksport/representanter/index.html?StortingsPeriodeId=#{period}"
end
|
#representatives_today ⇒ Object
33
34
35
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 33
def representatives_today
fetch 'eksport/dagensrepresentanter/index.html'
end
|
#vote_results_for(vote_id) ⇒ Object
45
46
47
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 45
def vote_results_for(vote_id)
fetch "eksport/voteringsresultat/index.html?voteringid=#{vote_id}"
end
|
#votes_for(issue_id) ⇒ Object
37
38
39
|
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 37
def votes_for(issue_id)
fetch "eksport/voteringer/index.html?sakid=#{issue_id}"
end
|