sunlightcongress 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/sunlightcongress.rb +5 -7
  2. metadata +1 -1
@@ -83,10 +83,8 @@ class SunlightCongress
83
83
 
84
84
  # Get all events (hearings, votes, bills, amendments, floor updates) for a congressperson and output JSON
85
85
  def get_events(name)
86
- id = legislator_id(name)
87
-
88
86
  # Get votes
89
- votes = JSON.parse(get_votes(id))
87
+ votes = JSON.parse(get_votes(name))
90
88
  votearray = Array.new
91
89
  votes.each do |v|
92
90
  savehash = Hash.new
@@ -101,7 +99,7 @@ class SunlightCongress
101
99
  end
102
100
 
103
101
  # Get amendments
104
- amendments = JSON.parse(get_amendments(id))
102
+ amendments = JSON.parse(get_amendments(name))
105
103
  amendmentarray = Array.new
106
104
  amendments.each do |a|
107
105
  savehash = Hash.new
@@ -116,7 +114,7 @@ class SunlightCongress
116
114
  end
117
115
 
118
116
  # Get bills
119
- bills = JSON.parse(get_bills(id))
117
+ bills = JSON.parse(get_bills(name))
120
118
  billarray = Array.new
121
119
  bills.each do |b|
122
120
  savehash = Hash.new
@@ -131,7 +129,7 @@ class SunlightCongress
131
129
  end
132
130
 
133
131
  # Get updates
134
- updates = JSON.parse(get_updates(id))
132
+ updates = JSON.parse(get_updates(name))
135
133
  updatearray = Array.new
136
134
  updates.each do |u|
137
135
  savehash = Hash.new
@@ -146,7 +144,7 @@ class SunlightCongress
146
144
  end
147
145
 
148
146
  # Get hearings
149
- hearings = JSON.parse(get_hearings_json(get_committees(id)))
147
+ hearings = JSON.parse(get_hearings_json(get_committees(name)))
150
148
  hearingarray = Array.new
151
149
  hearings.each do |h|
152
150
  savehash = Hash.new
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sunlightcongress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: