Skip to content

ameykshirsagar/zomato-js-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zomato-jquery-sdk

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.

Version

1.0.0

Dependencies

This library depends on jQuery library.

Initialisation

Load the zomato.js:

Zomato.init("<YOUR-ZOMATO-API-KEY>");

For example

Zomato.init("8c2run923ur9n23ur92nc93uer8932ue"); //its a fake one ;-)

Geocode

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 
})

Restaurant details

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 
})

Todos

  • Add more functions for more API handles
  • Create a pure Javascript library

License

MIT

Free Software, Hell Yeah!

About

A jQuery library for Zomato's API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published