Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/earowang/romato

Query the Zomato API with R
https://github.com/earowang/romato

Last synced: 23 days ago
JSON representation

Query the Zomato API with R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r setup, include = FALSE}
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](https://github.com/earowang/romato) with:

``` r
devtools::install_github("earowang/romato")
```

## Usage

First of all, you need an API key to access Zomato, which you can sign up [here](https://developers.zomato.com/api).

```{r example}
library(romato)
zmt <- zomato$new(api_key = "your-api-key")
zmt
```

```r
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)
```