-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapiary.apib
208 lines (175 loc) · 7.6 KB
/
apiary.apib
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
FORMAT: 1A
HOST: http://politicianhub.me
# Politician Hub
Politican Hub is an API for receiving information on the people serving in Congress, Congressional committees, and recent bills that have been introduced.
## Legislators [/api/v1/legislators]
### List All Legislators [GET]
Optional arguments to filter by (i.e. GET /api/v1/legislators?chamber=house&state=IL):
bio_guide, birthday, chamber, first_name, gender, id, last_name, party, state, twitter
+ Response 200 (application/json)
{
"legislators": [
{
"bio_guide": "B001236",
"birthday": "1966-10-04",
"chamber": "house",
"committees": [19, 21],
"contact_form": "http://contact-me.gov",
"first_name": "Darin",
"gender": "M",
"id": 1,
"image": "https://raw.githubusercontent.com/unitedstates/images/gh-pages/congress/450x550/A000014.jpg"
"last_name": "LaHood",
"party": "Republican",
"state": "IL",
"twitter": null,
"votes": [
{
"bill_id": 6,
"result": "Yea"
}
],
"website": "https://lahood.house.gov/"
},
{
"bio_guide": "B001135",
"birthday": "1973-02-08",
"chamber": "house",
"committees": [18],
"contact_form": "http://contact-reptrentkelly.gov",
"first_name": "Trent",
"gender": "M",
"id": 2,
"image": "https://raw.githubusercontent.com/unitedstates/images/gh-pages/congress/450x550/A000012.jpg"
"last_name": "Kelly",
"party": "Republican",
"state": "MS",
"twitter": "reptrentkelly",
"votes": [],
"website": "http://franks.house.gov"
}
]
}
## Legislator [/api/v1/legislators/{legislator_id}]
### Get a Single Legislator [GET]
Optional argument verbose (i.e. GET/api/v1/legislators/{legislator_id}?verbose=true): gets data for foreign keys "committees" and "bill_id" and replaces with corresponding JSON objects
+ Response 200 (application/json)
{
"bio_guide": "B001236",
"birthday": "1966-10-04",
"chamber": "house",
"committees": [19, 21],
"contact_form": "http://contact-me.gov",
"first_name": "Darin",
"gender": "M",
"id": 1,
"image": "https://raw.githubusercontent.com/unitedstates/images/gh-pages/congress/450x550/A000014.jpg"
"last_name": "LaHood",
"party": "Republican",
"state": "IL",
"twitter": null,
"votes": [
{
"bill_id": 6,
"result": "Yea"
}
],
"website": "https://lahood.house.gov/"
}
## Committees [/api/v1/committees]
### List All Committees [GET]
Optional arguments to filter by (i.e. GET /api/v1/committees?chamber=senate):
chair, chamber, committee_id, id, is_subcommittee, name
+ Response 200 (application/json)
[
{
"chair": 57,
"chamber": "senate",
"committee_id": "SSFI",
"id": 180,
"is_subcommittee": false,
"jurisdiction": "The Federal Spending Oversight and Emergency Management is responsible for...",
"name": "Federal Spending Oversight and Emergency Management",
"website": "http://hsgac.senate.gov/"
},
{
"chair": null,
"chamber": "house",
"committee_id": "HSAP19",
"id": 18,
"is_subcommittee": true,
"jurisdiction": "The Federal Lands Committee is responsible for...",
"name": "Federal Lands",
"website": "http://naturalresources.house.gov/",
}
]
## Committee [/api/v1/committees/{committee_id}]
### Get a Single Committee [GET]
Optional argument verbose (i.e. GET/api/v1/committees/{committee_id}?verbose=true): gets data for foreign key "chair" and replaces with corresponding JSON object
+ Response 200 (application/json)
{
"chair": 57,
"chamber": "senate",
"committee_id": "SSFI",
"id": 180,
"is_subcommittee": false,
"jurisdiction": "The Federal Spending Oversight and Emergency Management is responsible for...",
"name": "Federal Spending Oversight and Emergency Management",
"website": "http://hsgac.senate.gov/"
}
## Bills [/api/v1/bills]
### List All Bills [GET]
Optional arguments to filter by (i.e. GET /api/v1/bills?senate_status=pass):
bill_id, bill_type, current_status, date_intro, house_status, id, senate_status, sponsor
+ Response 200 (application/json)
[
{
"bill_id": "s1482-114",
"bill_type": "house_bill",
"committees": [104, 188],
"current_status": "enacted_signed",
"current_status_description": "This bill was enacted after being signed by the President on December 19, 2014",
"current_status_label": "Enacted — Signed by the President",
"date_intro": "2015-02-04",
"house_status": "pass",
"id": 18,
"link": "https://www.govtrack.us/congress/bills/114/s1482",
"name": "To adapt to changing crude oil market conditions.",
"senate_status": "pass",
"sponsor": 126
},
{
"bill_id": "s994-114",
"bill_type": "house_bill",
"committees": [88],
"current_status": "enacted_signed",
"current_status_description": "This bill was enacted after being signed by the President on July 20, 2015.",
"current_status_label": "Enacted — Signed by the President",
"date_intro": "2015-01-26",
"house_status": "pass",
"id": 300,
"link": "https://www.govtrack.us/congress/bills/114/s994",
"name": "Native American Energy Act",
"senate_status": "fail",
"sponsor": 196
}
]
## Bill [/api/v1/bills/{bill_id}]
### Get a Single Bill [GET]
Optional argument verbose (i.e. GET /api/v1/bills/{bill_id}?verbose=true): gets data for foreign keys "sponsor" and "committees" and replaces with corresponding JSON objects
+ Response 200 (application/json)
{
"bill_id": "s1482-114",
"bill_type": "house_bill",
"committees": [104, 188],
"current_status": "enacted_signed",
"current_status_description": "This bill was enacted after being signed by the President on December 19, 2014",
"current_status_label": "Enacted — Signed by the President",
"date_intro": "2015-02-04",
"house_status": "pass",
"id": 18,
"link": "https://www.govtrack.us/congress/bills/114/s1482",
"name": "To adapt to changing crude oil market conditions.",
"senate_status": "pass",
"sponsor": 126
}