🍁Connect to EXTERNAL ENVIRONMENTS!

As you can see that below code is able to connect for getting data from external environments. The important thing is system will need to fetch at least 11 different nodes defined endpoint url.

 async function init(typeOfCoffee)
{
const allCoffee=await Tools.getData("https://api.sampleapis.com/coffee/hot");

//return allCoffee;
        if (allCoffee)
        {
            if (Array.isArray(allCoffee.data))
            {

                for (let i=0;i<allCoffee.data.length;i++)
                    if (allCoffee.data[i].title===typeOfCoffee)
                    {
                        return "You choosed Title :"+allCoffee.data[i].title+
                        " This Item Description : "+
                        allCoffee.data[i].description;
                    }
            }
        }
        return "You defined title , Not found!";
}

Last updated