Skip to content

Commit

Permalink
Merge pull request #3 from CorradoLanera/develop
Browse files Browse the repository at this point in the history
google_maps_reviews
  • Loading branch information
CorradoLanera authored Jul 19, 2024
2 parents 947e153 + 6f2c87f commit bcbc810
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 328 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: outscrapr
Title: Unofficial Uncompleted Outscraper API
Version: 0.0.1
Version: 0.0.2
Authors@R:
person("Corrado", "Lanera", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0002-0520-7428"))
Expand Down
31 changes: 22 additions & 9 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ library(outscrapr)
query <- "restaurants, Brooklyn 11203"
restaurants <- google_maps_search(query = query, limit = 2)
restaurants
restaurants |>
tibble::as_tibble()
restaurants$working_hours
restaurants$about
restaurants$about |>
tibble::as_tibble()
restaurants$about$`Popular for`
restaurants$reviews_per_score
```
Expand All @@ -68,9 +70,13 @@ queries <- c(
# Results' limit refers to the number of places to retrieve for each
# query. The results of all queries are combined into a single tibble.
multi_restaurants <- google_maps_search(query = queries, limit = 2)
multi_restaurants
multi_restaurants |>
tibble::as_tibble()
multi_restaurants$working_hours
multi_restaurants$about
multi_restaurants$about |>
tibble::as_tibble()
multi_restaurants$about$Highlights
multi_restaurants$reviews_per_score
```
Expand All @@ -85,16 +91,23 @@ library(outscrapr)
query <- "restaurants, Brooklyn 11203"
restaurant <- google_maps_search(query = query, limit = 1)
restaurant
restaurant |>
tibble::as_tibble()
reviews <- restaurant[["place_id"]] |>
google_maps_reviews(reviews_limit = 2)
reviews
reviews |>
tibble::as_tibble()
identical(reviews$place_id, restaurant$place_id)
reviews$reviews
reviews$reviews_data
reviews$reviews |>
tibble::as_tibble()
reviews$reviews_data[[1]] |>
tibble::as_tibble()
reviews$reviews_data[[1]]$review_text
reviews$reviews_data[[1]]$review_questions
Expand Down
Loading

0 comments on commit bcbc810

Please sign in to comment.