Skip to content

Commit 3039f00

Browse files
committed
remove antweb egs, #202
1 parent 2eb62c6 commit 3039f00

File tree

5 files changed

+3
-14
lines changed

5 files changed

+3
-14
lines changed

R/antweb_helpers.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ aw_data2 <- function(genus = NULL, species = NULL, scientific_name = NULL,
1717
species <- strsplit(scientific_name, " ")[[1]][2]
1818
}
1919

20-
base_url <- "http://www.antweb.org"
20+
# base_url <- "http://www.antweb.org"
21+
base_url <- "http://api.antweb.org"
2122
original_limit <- limit
2223
args <- sc(as.list(c(genus = genus, species = species, bbox = bbox,
2324
min_elevation = min_elevation,
@@ -26,7 +27,7 @@ aw_data2 <- function(genus = NULL, species = NULL, scientific_name = NULL,
2627
min_date = min_date, max_date = max_date, limit = 1,
2728
offset = offset, georeferenced = georeferenced)))
2829
cli <- crul::HttpClient$new(url = base_url, opts = callopts)
29-
out <- cli$get(path = "api/v2", query = args)
30+
out <- cli$get(path = "v3.1/specimens", query = args)
3031
out$raise_for_status()
3132
data <- jsonlite::fromJSON(out$parse("UTF-8"), FALSE)
3233
data <- sc(data) # Remove NULL

R/inspect.R

-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@
2424
#' # from occkeys
2525
#' key <- as.gbif(res$key[1])
2626
#' inspect(key)
27-
#' key <- as.antweb("amsat-94817")
28-
#' inspect(key)
2927
#'
3028
#' # idigbio
3129
#' spnames <- c('Accipiter striatus', 'Spinus tristis')

R/occ2df.R

-4
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@
4848
#' spnames <- c('Accipiter striatus', 'Spinus tristis')
4949
#' out <- occ(query=spnames, from='gbif', limit=2)
5050
#' occ2df(out$gbif)
51-
#'
52-
#' spp <- c("Linepithema humile", "Crematogaster brasiliensis")
53-
#' out <- occ(query=spp, from='antweb', limit=2)
54-
#' occ2df(out$antweb)
5551
#' }
5652
occ2df <- function(obj, what = "data") {
5753
UseMethod("occ2df")

man/inspect.Rd

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/occ2df.Rd

-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)