Created
January 11, 2011 01:16
-
-
Save konklone/773822 to your computer and use it in GitHub Desktop.
Real Time Congress API examples.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /api/v1/bills.json?apikey=[yourKey]§ions=_id,bill_id | |
{ | |
"bills": [ | |
{ | |
"_id": "4d288a0ee433b27bc6000006", | |
"bill_id": "hr217-112" | |
}, | |
{ | |
"_id": "4d288a0ee433b27bc6000001", | |
"bill_id": "hr212-112" | |
} | |
// ... | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"conditions": { | |
"state": "pass" | |
}, | |
"explain": { | |
"allPlans": [ | |
{ | |
"cursor": "BtreeCursor state_1", | |
"indexBounds": { | |
"state": [ | |
[ | |
"pass", | |
"pass" | |
] | |
] | |
} | |
}, | |
{ | |
"cursor": "BtreeCursor offered_at_1 reverse", | |
"indexBounds": { | |
"offered_at": [ | |
[ | |
{ | |
"$maxElement": 1 | |
}, | |
{ | |
"$minElement": 1 | |
} | |
] | |
] | |
} | |
}, | |
{ | |
"cursor": "BasicCursor", | |
"indexBounds": { | |
} | |
} | |
], | |
"cursor": "BtreeCursor offered_at_1 reverse", | |
"oldPlan": { | |
"cursor": "BtreeCursor offered_at_1 reverse", | |
"indexBounds": { | |
"offered_at": [ | |
[ | |
{ | |
"$maxElement": 1 | |
}, | |
{ | |
"$minElement": 1 | |
} | |
] | |
] | |
} | |
}, | |
"n": 20, | |
"millis": 0, | |
"nscanned": 78, | |
"indexBounds": { | |
"offered_at": [ | |
[ | |
{ | |
"$maxElement": 1 | |
}, | |
{ | |
"$minElement": 1 | |
} | |
] | |
] | |
}, | |
"nscannedObjects": 78 | |
}, | |
"order": [ | |
[ | |
"offered_at", | |
"desc" | |
] | |
], | |
"fields": null, | |
"page": { | |
"page": 1, | |
"per_page": 20 | |
}, | |
"count": 1241 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /api/v1/amendments.json?apikey=[yourKey]&callback=yourCallback | |
yourCallback({ | |
"amendments": [ | |
{ | |
"amendment_id": "s4921-111", | |
// etc. ... | |
} | |
] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"page": { | |
"page": 1, | |
"count": 20, | |
"per_page": 20 | |
}, | |
"count": 1049 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment