api.congress.gov icon indicating copy to clipboard operation
api.congress.gov copied to clipboard

feat(committee and congress list API): add and sort by `updateDate`

Open ryparker opened this issue 2 years ago • 11 comments

It would be helpful to have updateDate on the list APIs where it is missing and to sort by that value (just like how the other list APIs are setup). This would allow us to cache by updateDate and only query details on items that have changed. Currently I have to query every item's detail API regularly if I want to keep my dataset up to date.

List APIs missing updateDate:

  • committee
  • congress

Related: https://github.com/LibraryOfCongress/api.congress.gov/issues/61

ryparker avatar Jul 17 '23 14:07 ryparker

Thanks for your comment. We'll add this to our list for possible future development.

mnewatloc avatar Jul 18 '23 14:07 mnewatloc

Thanks Mike. Am I correct in assuming other list APIs that have updateDate (e.g. /nomination) are sorted by this value in descending order (most recently updated are first)?

ryparker avatar Jul 18 '23 17:07 ryparker

Would you consider adding this to Near term backlog? The committee API is one of the only APIs that does not offer the updateDate on the list response. Even if it's not sorted by updateDate, it's faster to regularly check all list items (4 requests) for updateDate changes, rather than check each individual committee detail API (811 requests).

I'd be happy to split this up into multiple issues:

  • add updateDate to committee list response
  • sort committee list response by updateDate
  • add updateDate to congress list response
  • sort congress list response by updateDate

The congress API requests are not as important since I don't expect the data to change except every 2 years.

ryparker avatar Apr 11 '24 14:04 ryparker

Howdy, @ryparker - thanks for following up on this. I am going to add these to the near-term backlog milestone. Please check the change log for any updates related to these once they are scheduled. Thanks!

apreiter18 avatar Apr 11 '24 14:04 apreiter18

Thank you!

ryparker avatar Apr 11 '24 14:04 ryparker

Committee endpoint work is tentatively scheduled to be released on September 3, 2024. Check the change log for relevant updates. Thanks!

apreiter18 avatar Jul 01 '24 14:07 apreiter18

This has been divided up, just FYI:

  1. The <updateDate> element for the committee list-level endpoint will be released, tentatively, in October 2024.
  2. The default sort by <updateDate> for the committee endpoint will be released, tentatively, in early November 2024.

apreiter18 avatar Aug 12 '24 14:08 apreiter18

The <updateDate> element for the congress list-level endpoint will be released, tentatively, in December 2024.

apreiter18 avatar Oct 15 '24 13:10 apreiter18