Class: Hdo::StortingImporter::DiskDataSource

Inherits:
DataSource
  • Object
show all
Defined in:
lib/hdo/storting_importer/disk_data_source.rb

Instance Method Summary collapse

Constructor Details

#initialize(root) ⇒ DiskDataSource

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

#categoriesObject



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) ⇒ Object



13
14
15
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 13

def committees(session_id)
  fetch "eksport/komiteer/index.html?SesjonId=#{session_id}"
end

#districtsObject



17
18
19
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 17

def districts
  fetch "eksport/fylker/index.html"
end

#parliament_issues(session_id) ⇒ Object



33
34
35
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 33

def parliament_issues(session_id)
  fetch "eksport/saker/index.html?sesjonid=#{session_id}"
end

#parliament_periodsObject



25
26
27
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 25

def parliament_periods
  fetch "eksport/stortingsperioder"
end

#parliament_sessionsObject



29
30
31
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 29

def parliament_sessions
  fetch "eksport/sesjoner"
end

#parties(session_id) ⇒ Object



9
10
11
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 9

def parties(session_id)
  fetch "eksport/partier/index.html?sesjonid=#{session_id}"
end

#propositions_for(vote_id) ⇒ Object



49
50
51
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 49

def propositions_for(vote_id)
  fetch "eksport/voteringsforslag/index.html?voteringid=#{vote_id}"
end

#representatives(period) ⇒ Object



37
38
39
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 37

def representatives(period)
  fetch "eksport/representanter/index.html?StortingsPeriodeId=#{period}"
end

#representatives_todayObject



41
42
43
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 41

def representatives_today
  fetch 'eksport/dagensrepresentanter/index.html'
end

#vote_results_for(vote_id) ⇒ Object



53
54
55
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 53

def vote_results_for(vote_id)
  fetch "eksport/voteringsresultat/index.html?voteringid=#{vote_id}"
end

#votes_for(issue_id) ⇒ Object



45
46
47
# File 'lib/hdo/storting_importer/disk_data_source.rb', line 45

def votes_for(issue_id)
  fetch "eksport/voteringer/index.html?sakid=#{issue_id}"
end