hs_resource: List resources

Description Usage Arguments Details Value

View source: R/hs_resource.R

Description

This is the primary function for querying the HydroShare API /hsapi/resource endpoint. It will return a tibble corresponding to the given parameters. Endpoint is chosen algorithmically based on passed parameters.

Usage

1

Arguments

...

See details.

Details

Below is a sectioned list of all possible parameters that hs_resource can parse, and the corresponding HydroShare API endpoint(s)/functions used.

Parameters marked with an asterisk (*) are required for that endpoint.

Searching Resources (hs_search)

Endpoint:
Parameters:
Parameter Data/Object Type Description
page integer A page number within the paginated result set.
count integer Number of results to return per page.
creator character The first author (name or email)
author character vector List of authors (name or email)
group character A group name (requires edit_permissions = TRUE)
user character Viewable by user (name or email)
owner character Owned by user (name or email)
from_date Date To get a list of resources created on or after this date
to_date Date To get a list of resources created on or before this date
subject character vector Comma separated list of subjects
full_text_search character Get a list of resources with this text
edit_permission logical Filter by edit permissions of user/group/owner?
published logical Filter by published resources?
type character vector List of resources of the specified resource types. See below possible values.
coverage_type character To get a list of resources that fall within the specified tial coverage boundary. Either: "box" or "point"
coordinates character vector List of spatial coordinates in the form of (north, south, t, west)
include_obselete logical Include replaced resources?

For available resource types, see hs_types.

Getting Resource Information by ID (hs_sysmeta)

Endpoints:
Parameters:
Parameters Data/Object Type Description
id* character Resource Alphanumeric ID
Return:
Column Description
resource_title Title of the resource
resource_type Resource type
resource_id ID of the resource
abstract Resource abstract
authors Authors of resource
creator Creator of resource
doi Resource DOI ID
public Indicates if resource if public
discoverable Indicates if resource is discoverable
shareable Indicates if resource is shareable
immutable Indicates if resource is immutable
published Indicates if resource is published
date_created Date resource was created
date_last_updated Date resource was last updated
bag_url URL to resource download, can be passed to download.file
science_metadata_url URL to science metadata
resource_map_url URL to resource map
resource_url URL to resource
content_types Resource content types, see hs_content_types

Getting Resource Access Permissions (hs_access)

Endpoint:
Parameters:
Parameter Data/Object Type Description
id* character Resource Alphanumeric ID
access* logical Must be TRUE for access query
Return:
Column Description
id Resource Alphanumeric ID
privilege User's privilege level
user User to be granted privilege
resource Resource to which privilege applies
grantor Grantor of privilege

Getting Resource File List (hs_files)

Endpoint:
Parameters:
Parameter Data/Object Type Description
id* character Resource Alphanumeric ID
files* logical Must be TRUE for files query
page integer Page of results to return
count integer Number of files to return per page
Return:
Column Description
file_name The filename, including the path
url The url to download the file
size The size of the file
content_type The content type of the file
logical_file_type The logical file type
modified_time The last modified time of the file
checksum The file's checksum

Getting Resource Folder(s) (hs_folder)

Endpoint:
Parameters:
Parameter Data/Object Type Description
id* character Resource Alphanumeric ID
pathname* character Path to folder in resource's contents
Return:
Column Description
resource_id Resource Alphanumeric ID
path Path to folder in resource's contents
contents Nested tibble with files and folders within path

Getting Resource Science Metadata (hs_scimeta)

Endpoints:
Parameters:
Parameter Data/Object Type Description
id* character Resource Alphanumeric ID
scimeta* logical Must be TRUE for scimeta query
Return:
Column Description
id Resource Alphanumeric ID
title Resource Title
citation Resource Bibliography Citation
creators Nested tibble of resource creator(s)
sources Nested tibble of resource source(s)
metadata Nested tibble with additional resource metadata

Value

A tibble. See details.


program--/HSClientR documentation built on April 14, 2021, 8:40 a.m.