AyOK-Code / oscn_scraper

MIT License
1 stars 1 forks source link

Add docket event links to json payload #27

Closed holdenmitchell closed 1 year ago

holdenmitchell commented 1 year ago

Description

Adds the links JSON to the docket events payload so that we can start scraping the links associated with a docket event. The payload is nested under the docket event like so:

{
    :event_number=>6,
    :date=>Tue, 14 Dec 2021,
    :code=>"P",
    :description=>
     "PETITION / FED / $ 1,818.60 Document Available (#1048798689) TIFF PDF",
    :count=>"",
    :party=>"",
    :amount=>"",
    :links=> [
       {
          :title=>"TIFF",
          :link=>"https://www.oscn.net/dockets/GetDocument.aspx?ct=Oklahoma&cn=SC-2021-17934&bc=1048798689&fmt=tif",
          :oscn_id=>"1048798689"},
      {
          :title=>"PDF",
          :link=> "https://www.oscn.net/dockets/GetDocument.aspx?ct=Oklahoma&bc=1048798689&cn=SC-2021-17934&fmt=pdf",
          :oscn_id=>"1048798689"
       }
    ]
},

This data is already set-up to be consumed by the oscn project. See:

DocketEventLink Importer DocketEvent Importer

However, the gem ref: will need to need to be updated once this change is deployed

How to test

Run the spec from the project root directory:

rspec spec/parsers/docket_events_spec.rb
github-actions[bot] commented 1 year ago

Simplecov Report

Covered Threshold
100% 90%