Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request for HOB and CRI #10

Closed
relarson1 opened this issue Sep 14, 2018 · 2 comments
Closed

Feature Request for HOB and CRI #10

relarson1 opened this issue Sep 14, 2018 · 2 comments
Assignees
Milestone

Comments

@relarson1
Copy link

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..."
},

`

@jonquandt
Copy link
Member

@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.

@jonquandt jonquandt self-assigned this Oct 25, 2018
@jonquandt jonquandt added the Features Items currently under consideration by the govinfo team for development. label Oct 25, 2018
@jonquandt jonquandt added the Upcoming Items currently under development and will be available in our next release label Jan 25, 2019
@jonquandt jonquandt added this to the March 2019 milestone Jan 25, 2019
@jonquandt jonquandt removed Features Items currently under consideration by the govinfo team for development. Upcoming Items currently under development and will be available in our next release labels Apr 1, 2019
@jonquandt
Copy link
Member

jonquandt commented Apr 1, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants