Package 'fulcrumr'

Title: R Interface to Fulcrum API
Description: R interface to Fulcrum API. Currently, only interfaces with Fulcrum Query API.
Authors: Travis Hinkelman
Maintainer: Travis Hinkelman <[email protected]>
License: MIT + file LICENSE
Version: 0.1.4
Built: 2025-01-30 04:22:17 UTC
Source: https://github.com/EnvironmentalScienceAssociates/fulcrumr

Help Index


Get Fulcrum tables

Description

Get all available Fulcrum tables

Usage

fulcrum_all_tables(api_key = get_api_key(), col_types = NULL)

Arguments

api_key

Fulcrum authentication key

col_types

One of NULL, a cols() specification, or a string. See vignette("readr") for more details.

Value

A data frame with name, type, etc. of all available Fulcrum tables


Get Fulcrum photo

Description

Submit GET request to Fulcrum Photo API to get individual photo metadata

Usage

fulcrum_photo(
  photo_id,
  api_key = get_api_key(),
  base_url = "https://api.fulcrumapp.com/api/v2/photos/"
)

Arguments

photo_id

Photo ID from Fulcrum

api_key

Fulcrum authentication key

base_url

Base URL for Fulcrum Photo API

Value

If request is successful (i.e. the request was successfully performed and a response with HTTP status code <400 was recieved), an HTTP response; otherwise throws an error.


Query Fulcrum API

Description

Submit GET request to Fulcrum Query API based on SQL query string

Usage

fulcrum_query(
  query_string,
  api_key = get_api_key(),
  base_url = "https://api.fulcrumapp.com/api/v2/query/"
)

Arguments

query_string

SQL statement as string

api_key

Fulcrum authentication key

base_url

Base URL for Fulcrum Query API

Value

If request is successful (i.e. the request was successfully performed and a response with HTTP status code <400 was recieved), an HTTP response; otherwise throws an error.


Get Fulcrum table

Description

Get Fulcrum table with specified table_name

Usage

fulcrum_table(table_name, api_key = get_api_key(), col_types = NULL)

Arguments

table_name

Name of Fulcrum table

api_key

Fulcrum authentication key

col_types

One of NULL, a cols() specification, or a string. See vignette("readr") for more details.

Value

A data frame for specified Fulcrum table


Set or get Fulcrum API key

Description

Set or get Fulcrum API key as environmental variable in .Renviron

Usage

set_api_key(api_key = NULL)

get_api_key()

Arguments

api_key

Fulcrum authentication key