Zomato API with React Native

Zomato API using React Native find nearest restaurants.

Zomato API using React Native find nearest restaurants

Create your API key form this Link:https://developers.zomato.com/documentation


 await fetch(`https://developers.zomato.com/api/v2.1/geocode?lat=`+lati+`&`+`lon=`+long, {method: 'GET',
     headers: {
               'Accept': 'application/json',
               "user-key": "xxxxxxxxxxxxxxxxxxxxxxxx"
           }})
       .then((response) => response.json())
       .then((responseJson) => {

           Alert.alert(responseJson["location"].title+" , "+responseJson['location'].city_name+" , "+responseJson['location'].country_name);
           console.log(responseJson);
           console.log("subzone "+responseJson["popularity"].subzone);
           location=responseJson["location"].title+" ,"+responseJson['location'].city_name+" ,"+responseJson['location'].country_name;

       })
       .catch((error) => {
           console.error(error);
       });   
Zomato API using React Native find nearest restaurants
Zomato API using React Native

You may like these posts