Fastcase recently disclosed that it has a public API for any member of the public to see a reported judicial opinion without going behind the paywall. This is a breakthrough.
The API requires a user to set headers and pass a data object. This is good, but I'm lazy and just want to work from the browser's address bar. So, I built a human-centric wrapper around the API.
The permafrast API responds to both html and json requests. E.g:
/:volume/:reporter/:starting_page/redirectwill automatically redirect the user to the reported opinion url
html response gives a clickable link with the full citation for the opinion. The
json response gives a json object associated with the opinion.
For both endpoints, you must pass three parameters associated with a reported judicial opinion:
http://permafrast.herokuapp.com/:volume/:reporter/:starting_page. For example, see https://permafrast.herokuapp.com/600/F.3d/642 or https://permafrast.herokuapp.com/600/F.3d/642.json.
By default, HTML routes will display the full text of the citation. For JSON routes, you can add
?fulltext=true to the URL. Example https://permafrast.herokuapp.com/600/F.3d/642.json?fulltext=true.
In development SQLite is used, use
bundle exec rake db:create && db:migrate to create it.
You can easily run your own instance of Permafrast.
cp .env.example .env.
.env. If you don't have one, tweet to Josh Auriemma.
bundle exec rackup -p 4567.
bundle exec rspec