After you get familiar with the base app, you create a Neutrinos Modelr flow and UI Services.
Create a Modelr flow to call the weather API and fetch weather data. Perform the following steps:
Property | Value |
Method | GET |
URL | /weather |
Name | call weather api |
Once you click Done, the information gets reflected in the Information section to the right. call weather api is an API endpoint that we have created using Modelr to fetch the weather data.
Property | Value |
Name | construct request params |
Function |
msg.url = `http://api.openweathermap.org/data/2.5/weather?q=${msg.payload.cityName}&APPID=your_app_id`; return msg; //Replace your_app_id with your registered API key. |
Outputs | 1 |
Property | Value |
Method | GET |
Return | a parsed JSON object |
Property | Value |
Object | complete msg object |
To | debug window |
Deploy the Modelr flow. Click on the top right corner of the screen.