make_term_endpoint: Making the endpoint for searching Noun Project by Term

Description Usage Arguments Value Examples

Description

Making the endpoint for searching Noun Project by Term

Usage

1
2
make_term_endpoint(term, limit_to_public_domain = 1, num_of_imgs = 2,
  offset = 0)

Arguments

term

word to use for search

limit_to_public_domain

restrict licence, change to 0 for not limit

num_of_imgs

the number of images required

offset

how many images to ignore, if you want to get different ones

Value

an url to use with get_nouns_api()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
# assemble the url to get 4 dog icons
url <- nounprojectR::make_term_endpoint("dog", num_of_imgs = 4)
# obtain information from the Noun Project server 
res <- get_nouns_api(url)
# extract the JSON file
result <- httr::content(res)
# show the images
get_pngs_and_show(result)

## End(Not run)

CaRdiffR/nounprojectR documentation built on May 4, 2019, 9:49 a.m.