Description Usage Arguments Details Value References Examples
Get the Yelp reviews associated with a business ID.
1 2 | reviews(businesses, locale = get_yelp_locale(),
access_token = Sys.getenv("YELP_ACCESS_TOKEN", NA))
|
businesses |
A character vector describing the Yelp IDs of businesses,
as returned by |
locale |
A string naming the locale. See |
access_token |
A string giving an access token to authenticate the API
call. See |
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.
A data frame with 6 columns. Each row corresponds to one review of the specified business.
https://www.yelp.com/developers/documentation/v3/business_reviews
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Marked as don't test because an access token is needed
# First lookup businesses
theaters_in_chicago <- business_search("theater", "chicago")
# Get the reviews using the business ID
reviews_of_chicago_theater_id <- reviews(theaters_in_chicago$business_id[1L])
# ...or the alias
reviews_of_chicago_theater_alias <- reviews(theaters_in_chicago$alias[1L])
identical(
reviews_of_chicago_theater_id,
reviews_of_chicago_theater_alias
)
if(interactive())
View(reviews_of_chicago_theater_id) else str(reviews_of_chicago_theater_id)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.