caselaw: Class representing the case law API

Description Usage Details Methods

Description

Class representing the case law API

Class representing the case law API

Usage

1
cl <- cl_client$new()

Details

This class allows a user to interact with a case law API and provides utility functions for GETs including cursor pagination and the specifics of the case law query parameter structure

The constructor respects CASE_LAW_API_KEY environment variable if set, and will use it to authorize all requests

Methods

Public methods


Method new()

Usage
cl_client$new(base = "https://api.case.law", version = "v1")

Method raise_error()

Usage
cl_client$raise_error(res)

Method add_auth()

Usage
cl_client$add_auth()

Method add_url_params()

Usage
cl_client$add_url_params(path, params)

Method GET_PAGES()

Usage
cl_client$GET_PAGES(
  path,
  writer = httr::write_memory(),
  parser = "parsed",
  limit = Inf
)

Method GET()

Usage
cl_client$GET(path, writer = httr::write_memory(), parser = "parsed")

Method GET_URL()

Usage
cl_client$GET_URL(url, writer = httr::write_memory(), parser = "parsed")

Method GET_RESULT_URL()

Usage
cl_client$GET_RESULT_URL(url, writer = httr::write_memory())

Method clone()

The objects of this class are cloneable with this method.

Usage
cl_client$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


slopp/caselaw documentation built on Oct. 10, 2020, 3:55 a.m.