Closed relarson1 closed 5 years ago
@relarson1 - so you would want an md5 hash for the file available from the txtLink value in the granule summary. And you would like it displayed on the granules response.
I'm not sure if that information is readily available, but will discuss with developers.
@relarson1 -- this is now available
https://api.govinfo.gov/packages/HOB-2019/granules?offset=0&pageSize=5&api_key=DEMO_KEY:
{
"count": 3449,
"offset": 0,
"pageSize": 5,
"nextPage": "https://api.govinfo.gov/packages/HOB-2019/granules?offset=5&pageSize=5",
"previousPage": null,
"granules": [{
"title": "A bill to make improvements to certain defense and security assistance provisions and to authorize the appropriation of funds to Israel, to reauthorize the United States-Jordan Defense Cooperation Act of 2015, and to halt the wholesale slaughter of the Syrian people, and for other purposes",
"granuleId": "HOB-2019-s1",
"granuleLink": "https://api.govinfo.gov/packages/HOB-2019/granules/HOB-2019-s1/summary",
"md5": "BC35F3D4DFC2AAE1294FA482EB2848DD"
},
{
"title": "A bill to safeguard certain technology and intellectual property in the United States from export to or influence by the People's Republic of China and to protect United States industry from unfair competition by the People's Republic of China, and for other purposes",
"granuleId": "HOB-2019-s2",
"granuleLink": "https://api.govinfo.gov/packages/HOB-2019/granules/HOB-2019-s2/summary",
"md5": "8EB614D4E9B96CB5B01AE253BBF24B68"
},
{
"title": "A bill to bring stability to the individual insurance market, make insurance coverage more affordable, lower prescription drug prices, and improve Medicaid",
"granuleId": "HOB-2019-s3",
"granuleLink": "https://api.govinfo.gov/packages/HOB-2019/granules/HOB-2019-s3/summary",
"md5": "8AEEB9910149E197B7D61DCABC4338B0"
},
{
"title": "A bill to amend the Internal Revenue Code of 1986 to establish a refundable tax credit to increase the take-home pay of American workers and enhance their financial stability, and for other purposes",
"granuleId": "HOB-2019-s4",
"granuleLink": "https://api.govinfo.gov/packages/HOB-2019/granules/HOB-2019-s4/summary",
"md5": "D1583B622964EA4BEFEE29E2E61423FE"
},
{
"title": "A bill to amend the Internal Revenue Code of 1986 to allow a credit against tax for qualified elementary and secondary education tuition",
"granuleId": "HOB-2019-s5",
"granuleLink": "https://api.govinfo.gov/packages/HOB-2019/granules/HOB-2019-s5/summary",
"md5": "97030F26A0068A3D0B1B446989165D77"
}
]
}
I would still recommend grabbing the mods file whenever the package is updated.
Since these collections are published as one large update for all the granules we do not have a good way to determine if the data for individual granules has changed or deleted, we would be able to determine changes faster if there were an md5 hash for each granule (md5 of the the text of the granule). We could keep track of the previous md5 and compare it to the new one to see if things changed so we would not have to re-download every granule/file.
https://api.govinfo.gov/packages/HOB-2018/granules?offset=0&pageSize=100&api_key=
`
"count": 6550,
"offset": 0,
"pageSize": 100,
"nextPage": "https://api.govinfo.gov/packages/HOB-2018/granules?offset=100&pageSize=100",
"previousPage": null,
"granules": [
{
"title": "A bill to amend title 10 United States Code, to establish a punitive article in the Uniform Code of Military Justice on domestic violence, and for other purposes",
"granuleId": "HOB-2018-hr4639",
"granuleLink": "https://api.govinfo.gov/packages/HOB-2018/granules/HOB-2018-hr4639/summary"m
"md5": "123456789..."
},
`