knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Query the Zomato API with R
You can install the development version of romato from Github with:
devtools::install_github("earowang/romato")
First of all, you need an API key to access Zomato, which you can sign up here.
library(romato) zmt <- zomato$new(api_key = "your-api-key") zmt
mugen <- zmt$search(query = "Mugen Ramen & Bar", lat = -37.81, lon = 144.96) zmt$reviews(res_id = mugen$id[1]) zmt$restaurant(res_id = mugen$id[1]) zmt$locations(query = "Melbourne", -37.8136, 144.9631) zmt$location_details(93747, "zone") zmt$categories() zmt$cities(query = "Melbourne") zmt$collections(259) zmt$cuisines(259) zmt$establishments(259) zmt$geocode(-37.8136, 144.9631)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.