generate_favicon: Generate favicons from an image

Description Usage Arguments Value Examples

View source: R/generate.R

Description

Using the realfavicongenerator.net API, this function sends a request to the API with the supplied parameters and downloads the result to a provided save location.

Usage

1
2
3
4
5
6
7
8
9
generate_favicon(
  image,
  save_loc,
  api_key = NULL,
  override_type = NULL,
  favicon_design = build_favicon_design(),
  settings = build_settings(),
  versioning = build_versioning()
)

Arguments

image

character; either a URL to an image or a local path. Type is guessed based on whether the string contains "http/s" or "www", but can you can override this with the override_type parameter.

save_loc

character; path to a save folder to save the returned images.

api_key

character; NULL to use the API set by set_api_key() or a character string to override with new value

favicon_design

list; the favicon design parameters as an embedded list that will eventually be converted to json. To help with the building of this complex list, use the build_favicon_design() function.

settings

list; another embedded list of parameters to be passed to the API. To help with this, use the build_settings() function.

versioning

list; an embedded list of versionining parameters to be sent to the API. Help creating this is provided with the build_versioning() function.

Value

path; the path to the saved file is returned invisibly

Examples

1
2
3
4
5
6
## Not run: 
generate_favicon(image = "http://test.image.location", save_loc = "Me/MyDownloads",
favicon_design = build_favicon_design(coast = NULL), settings = build_settings(),
versioning = build_versioning())

## End(Not run)

ARawles/faviconR documentation built on July 23, 2020, 1:30 p.m.