knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

romato

Query the Zomato API with R

Installation

You can install the development version of romato from Github with:

devtools::install_github("earowang/romato")

Usage

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)


earowang/romato documentation built on May 29, 2019, 4:46 a.m.