list_nodes: list_nodes

Description Usage Arguments Value Examples

View source: R/list_nodes.R

Description

Returns list of nodes

Usage

1
2
3
list_nodes(url = get_url(), credentials = list(cookie =
  dkanr::get_cookie(), token = dkanr::get_token()), fields = NULL,
  filters = NULL, pagesize = NULL, page = NULL, as = "json", ...)

Arguments

url

character: The DKAN site URL

credentials

Optional list parameter. Default values are Cookie and Token generated by dkan_setup()

fields

character vector: fields to be returned by the request

filters

named character vector: filters to be applied to the search

pagesize

numeric: Number of records to get per page (max = 20).

page

numeric: The zero-based index of the page to get, defaults to 0.

as

character: Output format. Options are: 'json', 'list', or 'df' (data frame)

...

Other optional parameters to be passed to the underlying GET request

Value

json, dkan_node (list), or data frame

Examples

1
2
3
4
5
6
7
## Not run: 
list_nodes(url = "http://demo.getdkan.com")
list_nodes(url = "http://demo.getdkan.com",
               fields = c('nid', 'type', 'uri'),
               filters = c(type='resource'))
               
## End(Not run)

tonyfujs/dkanr documentation built on May 28, 2019, 4:03 p.m.