Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/earowang/romato
- Owner: earowang
- License: other
- Created: 2018-05-12T09:16:19.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-23T05:40:01.000Z (almost 6 years ago)
- Last Synced: 2023-10-20T19:34:37.021Z (about 1 year ago)
- Language: R
- Homepage:
- Size: 14.6 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
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%"
)
```
# romatoQuery 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)
```