-
Notifications
You must be signed in to change notification settings - Fork 4
Get recent bills does not include congressional session within each bill #241
Comments
@ndawg We could add that. In the meantime, you can get the congress from the |
Yep, that's what I've done for now! I think it'd be good for consistency though 👍 |
@dwillis Something else I've just noticed is that the recent bills endpoint requires the congressional session while the get recent votes endpoint doesn't. Any reason for that? |
@ndawg No, not a good reason, at least. We can see about deprecating that and adding an endpoint more like the recent votes one. |
@ndawg I'd like to amend my previous answers here:
I can see the inconsistency here, but because we have scoped bills to a congress (with good reason), I'm not sure that making recent bills more like recent votes makes sense. Thoughts? |
data class PublicaAPIResponse<T>(
val status: String,
val copyright: String,
val results: T?,
val errors: String?) This allows top-level error handling for all endpoints, for example. You can imagine it would get quite tedious to have a custom response type for every endpoint, although it is do-able. To me, it makes more sense to return the same data for each bill no matter what the request context was.
|
Although the get recent bills endpoint requires a value for congress, it does not seem to include the value of the congressional session for each bill, like other similar endpoints do. For example, consider one of the returned bills:
As you can see there is no
congress
field in the returned JSON. Even though the request takes a congressional session ID itself, it would be really helpful for deserialization purposes to include this within the response.The text was updated successfully, but these errors were encountered: