business_lookup: Look up a business by Yelp ID

Description Usage Arguments Details Value Examples

View source: R/business-lookup.R

Description

Use the ID from a business search to get more details on that business.

Usage

1
2
business_lookup(businesses, locale = get_yelp_locale(),
  access_token = Sys.getenv("YELP_ACCESS_TOKEN", NA))

Arguments

businesses

A character vector describing the Yelp IDs of businesses, as returned by business_search, or the data frame returned by that API endpoint.

locale

A string naming the locale. See SUPPORTED_LOCALES for allowed values.

access_token

A string giving an access token to authenticate the API call. See get_access_token.

Details

If you pass multiple business IDs (either with a character vector with length greater than one or a data frame with multiple rows), this will result in multiple calls to the API, which you need to bear in mind if your usage is limited.

Value

A data frame with 28 columns. Each row corresponds to one business. In addition to the fields provided by the business search, you also get opening hours, URLs of up to 3 photos, whether or not the business has been claimed by its owner, and whether or not the business has been permanently closed.

Examples

1
2
3
## Marked as don't test because an access token is needed
ghostbusters <- business_lookup("jDPKMwOtvPA0lkqRwRvSJQ")
if(interactive()) View(ghostbusters) else str(ghostbusters)

richierocks/yelp documentation built on May 3, 2019, 4:08 p.m.