fetch_notices: Fetch notices from the Hilma API

Description Usage Arguments Value

View source: R/dl.R

Description

Fetches the notices specified in the query-argument from the API and formats the result in a tibble. Errors if the results changes (ie. someone publishes a notice that matches the query) during the execution.

Usage

1
2
3
4
5
6
7
fetch_notices(
  query,
  api_key,
  include_search_score = FALSE,
  verbose = FALSE,
  delay = 1
)

Arguments

query

The query parameters as a list that will be encoded as JSON with httr::POST() using encode = "json". Can be constructed with query-helpers.

api_key

Your personal API-key. Can be obtained from https://hns-hilma-prod-apim.portal.azure-api.net.

include_search_score

Whether to return the search score (ie. how well the result matches the query) or not. Defaults to FALSE.

verbose

Whether to print the progress or not. Defaults to FALSE.

delay

Delay between the fetches in seconds if the query needs to be split into multiple fetches. Defaults to 1.

Value

A tibble that contains the result of the query.


hansel-oy/hilma documentation built on Feb. 20, 2020, 3:20 a.m.