add_recipe: Add a new recipe

Description Usage Arguments Value See Also Examples

View source: R/add_recipe.R

Description

Adds a newly created recipe to the database. This new recipe is empty (i.e., does not contain steps). Also, this new recipe f

Usage

1
2
3
4
5
6
7
8
9
add_recipe(
  connection,
  name,
  recipe_owner,
  description = "",
  active = FALSE,
  cookies = FALSE,
  interval = 15
)

Arguments

connection

A connection object, as retrieved from connect_scrapebot().

name

Character string identifying the recipe.

recipe_owner

The email address of the ScrapeBot user who will be the owner of the new recipe as character string. If this one does not exist, it will be created (in this case, a text will be raised).

description

Character string to describe the recipe even further; default is an empty string.

active

Boolean to indicate whether the recipe should be active; default is FALSE.

cookies

Boolean to indicate whether the recipe should store cookies; default is FALSE.

interval

Integer to indicate the number of minutes after which a recipe should be run; default is 15.

Value

The uid (integer) of the newly created recipe or an integer NA in case of error.

See Also

get_recipes(), add_recipe_step()

Examples

1
2
3
4
5
6
7
8
## Not run: 

connection <- connect('my_db on localhost')
add_recipe(connection, 'visit my website', 'mario@haim.it')
add_recipe(connection, 'visit my website', 'mario@haim.it', active = T)
disconnect(connection)

## End(Not run)

MarHai/ScrapeBotR documentation built on March 10, 2021, 10:10 a.m.