Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zomato.js

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zomato.js - npm Package Compare versions

Comparing version 1.0.4 to 1.1.0

8

lib/zomato.js

@@ -236,5 +236,7 @@ 'use strict';

return this.get('reviews', _querystring2.default.stringify(params)).then(function (data) {
return data.user_reviews.map(function (o) {
var reviews = data.user_reviews.map(function (o) {
return o.review;
});
data.user_reviews = reviews;
return data;
});

@@ -255,5 +257,7 @@ }

return this.get('search', _querystring2.default.stringify(params)).then(function (data) {
return data.restaurants.map(function (o) {
var restaurants = data.restaurants.map(function (o) {
return o.restaurant;
});
data.restaurants = restaurants;
return data;
});

@@ -260,0 +264,0 @@ }

{
"name": "zomato.js",
"version": "1.0.4",
"version": "1.1.0",
"description": "zomato.js is a simple promise based JS wrapper for the Zomato API",

@@ -5,0 +5,0 @@ "author": {

@@ -32,3 +32,2 @@ # zomato.js [![NPM Version][npm-image]][npm-url] [![Build Status][travis-image]][travil-url]

---
### categories

@@ -72,13 +71,13 @@ Get lists of categories

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `q` | String | Query by city name | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `city_ids` | String | Comma separated `city_id` values | No |
| `count` | Number | The number of max results to display | No |
| Name | Type | Description | Required |
| :--------: | :----: | :----------------------------------: | :------: |
| `q` | String | Query by city name | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `city_ids` | String | Comma separated `city_id` values | No |
| `count` | Number | The number of max results to display | No |

@@ -128,12 +127,12 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `city_id` | Number | The id of the city | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `count` | Number | The number of max results to display | No |
| Name | Type | Description | Required |
| :--------:| :----: | :----------------------------------: | :-------:|
| `city_id` | Number | The id of the city | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `count` | Number | The number of max results to display | No |

@@ -199,11 +198,11 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :--------:| :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `city_id` | Number | id of the city for which the cuisines are needed | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| Name | Type | Description | Required |
| :-------: | :----: | :----------------------------------------------: | :------: |
| `city_id` | Number | id of the city for which the cuisines are needed | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |

@@ -261,11 +260,11 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `city_id` | Number | The id of the city | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| Name | Type | Description | Required |
| :-------: | :----: | :----------------: | :------: |
| `city_id` | Number | The id of the city | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |

@@ -313,10 +312,10 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `lat` | Number | Latitude | Yes |
| `lon` | Number | Longitude | Yes |
| Name | Type | Description | Required |
| :---: | :----: | :---------: | :------: |
| `lat` | Number | Latitude | Yes |
| `lon` | Number | Longitude | Yes |

@@ -390,12 +389,12 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `query` | String | Suggestion for location name | Yes |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `count` | Number | Max number of requests to fetch | No |
| Name | Type | Description | Required |
| :-----: | :----: | :-----------------------------: | :------: |
| `query` | String | Suggestion for location name | Yes |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `count` | Number | Max number of requests to fetch | No |

@@ -452,10 +451,10 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `entity_id` | Number | Location id obtained from locations api | Yes |
| `entity_type` | String | Location type obtained from locations api | Yes |
| Name | Type | Description | Required |
| :-----------: | :----: | :---------------------------------------: | :------: |
| `entity_id` | Number | Location id obtained from locations api | Yes |
| `entity_type` | String | Location type obtained from locations api | Yes |

@@ -530,9 +529,9 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `res_id` | Number | Id of restaurant whose details are required | Yes |
| Name | Type | Description | Required |
| :------: | :----: | :-----------------------------------------: | :------: |
| `res_id` | Number | Id of restaurant whose details are required | Yes |

@@ -594,9 +593,9 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `res_id` | Number | Id of restaurant whose details are required | Yes |
| Name | Type | Description | Required |
| :------: | :----: | :-----------------------------------------: | :------: |
| `res_id` | Number | Id of restaurant whose details are required | Yes |

@@ -629,11 +628,11 @@ ##### Returns

##### Parameters
| Name | Type | Description
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `res_id` | Number | Id of restaurant whose details are required | Yes |
| `start` | Number | Fetch results after this offset | Yes |
| `count` | Number | Max number of results to retrieve | Yes |
| Name | Type | Description | Required |
| :------: | :----: | :-----------------------------------------: | :------: |
| `res_id` | Number | Id of restaurant whose details are required | Yes |
| `start` | Number | Fetch results after this offset | Yes |
| `count` | Number | Max number of results to retrieve | Yes |

@@ -747,22 +746,22 @@ ##### Returns

##### Parameters
| Name | Type | Description |
| ---- | ---- | -------- | ----------- |
| Name | Type | Description |
| :-------: | :----: | :-------------------------------------: |
| `options` | Object | `options` containing the params to send |
##### Options
| Name | Type | Description | Required |
| ---- | ---- | -------- | ----------- | ---- |
| `entity_id` | Number | The location id | No |
| `entity_type` | Number | The location type (`city`, `subzone`, `zone`, `landmark`, `metro`, `group`) | No |
| `q` | Number | Search keyword | No |
| `start` | Number | Fetch results after this offset | No |
| `count` | Number | Max number of results to retrieve | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `radius` | Number | The radius around (`lat`,`lon`); to define search area, defined in meters(M) | No |
| `cuisines` | String | The list of cuisine id's separated by comma | No |
| `establishment_type` | String | The establishment id obtained from establishments call | No |
| `collection_id` | Number | The collection id obtained from collections call | No |
| `category` | String | The category ids obtained from categories call | No |
| `sort` | String | sort restaurants by `cost`, `rating`, `real_distance` | No |
| `order` | String | Used with 'sort' parameter to define ascending(`asc`) / descending(`desc`) | No |
| Name | Type | Description | Required |
| :------------------: | :----: | :--------------------------------------------------------------------------: | :------: |
| `entity_id` | Number | The location id | No |
| `entity_type` | Number | The location type (`city`, `subzone`, `zone`, `landmark`, `metro`, `group`) | No |
| `q` | Number | Search keyword | No |
| `start` | Number | Fetch results after this offset | No |
| `count` | Number | Max number of results to retrieve | No |
| `lat` | Number | Latitude | No |
| `lon` | Number | Longitude | No |
| `radius` | Number | The radius around (`lat`,`lon`); to define search area, defined in meters(M) | No |
| `cuisines` | String | The list of cuisine id's separated by comma | No |
| `establishment_type` | String | The establishment id obtained from establishments call | No |
| `collection_id` | Number | The collection id obtained from collections call | No |
| `category` | String | The category ids obtained from categories call | No |
| `sort` | String | sort restaurants by `cost`, `rating`, `real_distance` | No |
| `order` | String | Used with 'sort' parameter to define ascending(`asc`) / descending(`desc`) | No |
##### Returns

@@ -769,0 +768,0 @@ `Promise`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc