1

I'm attempting to use the Department Of Labor Basic Mining data (developer .dol .gov/health-and-safety/basic-mine-info/). I have two issues:

1)The SendingRequest method is marked as deprecated, but the current SDK GOVDataUtil object doesn't support the new SendingRequest2 method

2)If I do use the deprecated SendingRequest I get the first 100 records, but I don't see any documentation on how to query it. Poking around I found this page http://developer.dol.gov/accessing-the-apis-using-http-requests/#filter_multi wich seems to indicated you can pass filters to the Uri, but doing so I receive an exception "Expected an absolute, well formatted URL with out query or fragment"

Unfortunately their documentation page is a dead link http://developer.dol.gov/DOL-MINE-ADDRESS-OF-RECORD-DATASET.htm

Update: On #2, querying the data. I finally determined that you just use LINQ on the object, which will append the filter info for you. So the following will work:

var mshaMines = new BasicMineInfo(new Uri("http://api.dol.gov/V1/Mining/BasicMineInfo/"));
mshaMines.SendingRequest +=new EventHandler<SendingRequestEventArgs>(GOVDataUtil.service_SendingRequest);
var minesQuery = mshaMines.MSHA_addressOfRecord.Where(m => m.stateAbbr == "TX").OrderBy(m => m.mineName);
  • You may want to put your update as an answer for future users. – fgregg Apr 29 '16 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.