mindat_extract_response_body: mindat_extract_response_body

View source: R/mindat_response_data_parse.R

mindat_extract_response_bodyR Documentation

mindat_extract_response_body

Description

.

Usage

mindat_extract_response_body (response)

Arguments

response

response json

Value

if status of the response is sucess (200),return the all_data_text(the content of response). Otherwise,report the errors.

Examples

## Not run: 
library(httr)
uri<- "https://api.mindat.org/v1/geomaterials/?id_in=&hardness_min=9.3&fields=name,+
hardness&page_size=1500"
api_token<- "9ce67655d74bcd981e937be80dcea9cb"
response <- GET(uri,add_headers('Authorization'= paste('Token ',api_token,sep = "")))
raw_data <- mindat_extract_response_body(response)

## End(Not run)

OpenMindat documentation built on June 8, 2025, 1:47 p.m.