Skip to content

adelevie/permafrast

 
 

Repository files navigation

Permafrast

A human-centric approach to the Fastcase Public API, originally built by @vdavez with substantial contributions of @TalkingQuickly and @adelevie.

What is this?

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.

Usage

The permafrast API responds to both html and json requests. E.g:

  • /:volume/:reporter/:starting_page for html
  • /:volume/:reporter/:starting_page.json for json
  • /:volume/:reporter/:starting_page/redirect will automatically redirect the user to the reported opinion url

The 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:

  1. The volume of the reporter (an integer)
  2. The reporter abbreviation (e.g., U.S.)
  3. The starting page of the opinion (an integer)

So, 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.

Full text

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.

Source Code and Contributions

Build Status

The source code for permafrast is available at https://github.com/vzvenyach/permafrast. Please feel free to submit PRs or open issues.

Development

Database

In development SQLite is used, use bundle exec rake db:create && db:migrate to create it.

Installation

You can easily run your own instance of Permafrast.

  1. Clone the repo.
  2. cp .env.example .env.
  3. Add your Fastcase API key to .env. If you don't have one, tweet to Josh Auriemma.
  4. Run bundle.
  5. Run the server locally with bundle exec rackup -p 4567.
  6. Run tests with bundle exec rspec

License

MIT

About

Until I have a better name

http://permafrast.herokuapp.com/info/600/F.3d/642

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%