You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename the file name by appending your name to "npa2023-final-example.py" (e.g., npa2023-final-example-chotipat.py).
Clone your GitHub repository to your local computer repository.
Complete all 12 tasks below by replacing code to all <!!!REPLACEME!!!!> in "npa2023-final-example-yourname.py".
Commit "npa2023-final-example-yourname.py" to your local repository occasionally or whenever you complete some of the 12 tasks. Be sure to make good commit messages.
Push your local repository to your GitHub repository.
This program
Use the hard-coded access token.
Monitor the NPA2023 Webex Team room for the "/yourname location" message every second.- Extract the location (city name) from a message starting with "/yourname location" (e.g. /chotipat Washington, DC -> Washington, DC).
Discover GPS coordinates (latitude and longitude) for the "location" using openweather Geocoding API.
Discover the current weather description and temperature in degrees Celsius of the specified latitude and longitude using OpenWeatherMap API.
Format and send the results back to the NPA2023 Webex Teams room
The examinee will
Import libraries for API requests, JSON formatting, and time.
Assign the Webex hard-coded access token to the variable accessToken.
Prepare GetParameters to get the latest message for messages API.
Provide the URL to the Webex Teams messages API and extract location from the received message.
Provide your openweather Geocoding APIGetParameters.
Provide the URL to the openweather Geocoding address API.
Provide the openweather Geocoding key values for latitude and longitude.
Prepare openweatherAPIGetParameters for OpenWeather API; current weather data for one location by geographic coordinates
Provide the URL to the OpenWeather API; current weather data for one location.
Complete the code to get weather description and weather temperature.
Complete the code to format the response message.
Complete the code to post the message to the Webex Teams room.