get_food_info: Method definitions for the FoodSearch Class

Description Usage Arguments Examples

Description

Method definitions for the FoodSearch Class

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
get_food_info(
  object,
  target = "description",
  page_number = 1,
  sort_field = "publishedDate",
  sort_direction = "asc",
  brand_owner = NULL,
  ...
)

## S4 method for signature 'FoodSearch'
get_food_info(
  object,
  target = "description",
  page_number = 1,
  sort_field = "publishedDate",
  sort_direction = "asc",
  brand_owner = NULL
)

Arguments

object

An object of class FoodSearch

target

Target field to extract, can be a vector. Defaults to "description"

page_number

Page number of results to return. Defaults to 1

sort_field

Character specifying what field to use for sorting. Defaults to publicationDate

sort_direction

One of 'asc' or 'desc' to sort results in ascending or descending order respectively.

brand_owner

Brand owner.

...

Ignored.

Examples

1
2
3
4
5
## Not run: 
my_object <- make_object("FoodSearch",search_phrase="indomie")
get_food_info(my_object,"description")

## End(Not run)

Nelson-Gon/rfdc documentation built on Nov. 14, 2021, 3:23 a.m.