This is a Zomato's jQuery SDK to connect with the Zomato's API.
- Just load the zomato.js along with jQuery library.
- Initialize the Zomato's SDK with the key you got when you signed up.
- Execute the respective api function respective to the api handler specified in the Zomato's API.
1.0.0
This library depends on jQuery library.
Load the zomato.js:
Zomato.init("<YOUR-ZOMATO-API-KEY>");
For example
Zomato.init("8c2run923ur9n23ur92nc93uer8932ue"); //its a fake one ;-)
If you want to find nearby restaurants based on your location co-ordinates, here is the function to get the JSON formatted data. The number of entries are limited to 10 by default.
Zomato.geocode({latitide:<latitude co-ordinate>, longitude:<longitude co-ordinate>},function(restaurants){
//do your logic for restaurants data.
},function(error){
//on error here is the logic for on error
})
If you want to get all the details regarding a particular restaurant, here is the function to access the /restaurant API handle.
Zomato.restaurant(<restaurant_id>,function(restaurant){
//do your logic for restaurant's data.
},function(error){
//on error here is the logic for on error
})
- Add more functions for more API handles
- Create a pure Javascript library
MIT
Free Software, Hell Yeah!