{"size": 1591, "ext": "js", "max_stars_repo_path": "getWeather/getWeather.js", "max_stars_repo_name": "paigeharriman/ccee-misty-specialskills", "max_stars_repo_stars_event_min_datetime": "2019-10-17T04:40:09.000Z", "max_stars_repo_stars_event_max_datetime": "2020-01-21T21:32:58.000Z", "max_issues_repo_path": "getWeather/getWeather.js", "max_issues_repo_name": "paigeharriman/ccee-misty-specialskills", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "getWeather/getWeather.js", "max_forks_repo_name": "paigeharriman/ccee-misty-specialskills", "max_forks_repo_forks_event_min_datetime": "2019-11-08T14:50:11.000Z", "max_forks_repo_forks_event_max_datetime": "2019-11-08T14:50:11.000Z"}
{"max_stars_count": 5, "max_issues_count": null, "max_forks_count": 1, "avg_line_length": 32.4693877551, "max_line_length": 131, "alphanum_fraction": 0.6869893149}
// Sends a message to debug listeners
misty.Debug("The Weather skill is starting! - External Request")
misty.SetDefaultVolume(20);

misty.SendExternalRequest(
    "GET",
    "http://api.weatherstack.com/current?access_key="+_params.access_key+"&query="+_params.query
    );

function _SendExternalRequest(data) {

    _data = JSON.parse(data.Result.ResponseObject.Data)

    _temperature = _data.current.temperature
    _weather_descriptions = _data.current.weather_descriptions

    _name = _data.location.name

    misty.Debug("Misty here! Just letting you know it's " + _temperature + " and " + _weather_descriptions + " in " + _name);
   
    //Misty Speaks!!!
    misty.Speak("Misty here! Just letting you know it is " + _temperature + " and " + _weather_descriptions + " in " + _name);
    
    showOff_getWeather();
}


function showOff_getWeather() { 
    
    misty.Debug("Showing Off the getWeather Skill");
    misty.Speak("Showing Off the getWeather Skill");
    
    //Set some fake variables to simulate the temperature and weather
    let showoff_temp = 72;
    let showoff_description = "Sunny and Nice";
    let showoff_city = "Chicago";


    //Debug message for console
    misty.Debug("Misty here! Just letting you know it's " + showoff_temp + " and " + showoff_description + " in " + showoff_city);

    //Misty Speaks!!!
    misty.Speak("Misty here! Just letting you know it is " + showoff_temp + " and " + showoff_description + " in " + showoff_city);
    
    misty.Pause(1000);
    misty.Debug("Ending Showing Off now");
    misty.Speak("Ending Showing Off now");
}
