How do I read data into text from this open weather api?

0 favourites
  • 3 posts
From the Asset Store
10 Orchestral Soundtracks / ~2 mins each / 11 audio clips in total
  • Hi Friends,

    I need help in inserting result of this weather api into a text box. Api is openweather api. Iam not good into reading api. Can you please help me in extracting api result value in text box.

    	<html>
    		<body>
    api : "https://api.openweathermap.org/data/2.5/weather?q=mumbai&units=imperial&appid=d5bce51716019821834a169506c4fce6"
    		</body>
    	</html>
    

    "https://api.openweathermap.org/data/2.5/weather?q=mumbai&units=imperial&appid=d5bce51716019821834a169506c4fce6"

    Please help guys. Need this urgently.

    Thanks in advance.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • The correct way to parse response from the weather server is to feed it into JSON plugin, but if you only need to retrieve a couple of values, you can use this method:

    dropbox.com/s/n8oo19a0aa2bauu/WeatherData.capx

    If this doesn't work in preview mode, open browser console. If you see "Origin localhost is not allowed by Access-Control-Allow-Origin" or similar error there, this is CORS issue, search the forum for solutions.

  • The correct way to parse response from the weather server is to feed it into JSON plugin, but if you only need to retrieve a couple of values, you can use this method:

    https://www.dropbox.com/s/n8oo19a0aa2bauu/WeatherData.capx?dl=0

    If this doesn't work in preview mode, open browser console. If you see "Origin localhost is not allowed by Access-Control-Allow-Origin" or similar error there, this is CORS issue, search the forum for solutions.

    Dop, right now I am feeling like you are savior god for me. This worked exactly as was my requirement. Thanks a ton ton and tons. God bless you in everyway you wish. You r the best.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)