diff --git a/.gitignore b/.gitignore index 3be6088..ff8333e 100644 --- a/.gitignore +++ b/.gitignore @@ -188,3 +188,4 @@ node_modules /libpeerconnection.log npm-debug.log testem.log +/lib/newdata.json diff --git a/app/js/todayv2.js b/app/js/todayv2.js index d09286e..71faab1 100644 --- a/app/js/todayv2.js +++ b/app/js/todayv2.js @@ -7,7 +7,7 @@ */ (function($) { - var TodayDataModel = Backbone.Model.extend({ + let TodayDataModel = Backbone.Model.extend({ initialize: function() { this.set('url', '/today/data'); @@ -17,15 +17,15 @@ }); - var webSocketModel = new SOCKETMANAGER(); + const webSocketModel = new SOCKETMANAGER(); webSocketModel.turnOn(); - var clock = new Clock({model: new ClockModel()}); - var weatherModel = new WeatherModel({lat: 55.95, long: -4.5666667}); - var weather = new Weather({model: weatherModel}); + window.clock = new Clock({model: new ClockModel()}); + let weatherModel = new WeatherModel({geo:{coords:{latitude: 55.95, longitude: -4.5666667}}}); + window.weather = new Weather({model: weatherModel}); - var trainModel = new TrainModel(); - var train = new Train({model: trainModel}); + let trainModel = new TrainModel({from:'hym', to:'dbe'}); + window.train = new Train({model: trainModel}); webSocketModel.setWeather(weatherModel); webSocketModel.setTrain(trainModel); @@ -36,3 +36,4 @@ }, 500); })(jQuery); + diff --git a/app/js/websocket.js b/app/js/websocket.js index 39c5e2e..eee454e 100644 --- a/app/js/websocket.js +++ b/app/js/websocket.js @@ -2,13 +2,14 @@ var WEBSOCKET = function(model) { var wsUrl = ['localhost','silvrtree.co.uk']; var wsPort = '9000'; + let useUrl = 0; if ('https:' === document.location.protocol) { - wsUrl = 'wss://' + wsUrl[1] + ''; + wsUrl = 'wss://' + wsUrl[useUrl] + ''; wsPort = ''; } else { //wsUrl = 'ws://localhost:3001'; - wsUrl = 'ws://' + wsUrl[1] + ''; + wsUrl = 'ws://' + wsUrl[useUrl] + ''; wsPort = ''; } diff --git a/config/config.json b/config/config.json index c016210..64a5467 100644 --- a/config/config.json +++ b/config/config.json @@ -12,7 +12,7 @@ "tokenPath": "/oauth2/token" }, "authorization_uri": { - "redirect_uri": "http://www.silvrtree.co.uk/fitbit_auth_callback/", + "redirect_uri": "https://www.silvrtree.co.uk/fitbit_auth_callback/", "response_type": "code", "scope": "activity nutrition profile settings sleep social weight heartrate", "state": "3(#0/!~" diff --git a/lib/newdata.json b/lib/newdata.json index 3829585..7a535aa 100644 --- a/lib/newdata.json +++ b/lib/newdata.json @@ -1 +1 @@ -{"last":1491823110912,"data":{"trains":{"last":"2017-04-10T09:29:04.602Z","data":[{"title":"Alterations to services between Glasgow Queen Street and Mallaig","description":"Due to a landslip between Possilpark & Parkhouse and Gilshochill the line is closed. Disruption is expected until the end of the day on 11/04/17. Train services between Glasgow Queen Street and Mallaig will be terminated at and started back from Crianlarich. Ardlui, Arrochar & Tarbet, Garelochhead, Helensburgh Upper, Dumbarton Central and Glasgow Queen Street will not be served. Customer Advice: Rail services between Glasgow Queen Street - Crianlarich have been suspended. Customers traveling direct to Crianlarich and connecting into train services towards Fort William, Mallaig and Oban buses will depart from Glasgow Queen Street. Customers wishing to travel from Glasgow Queen Street to intermediate stops between Glasgow and Crianlarich. The following train services will connect into buses at Dalmuir calling at Dumbarton Central, Helensburgh Upper, Garelochead, Arrochar and Tarbet, Ardlui and Crianlarich. 0731 from Queen Street Low Level to Dalmuir will connect in with the 0815 bus. 0936 from Queen Street Low Level to Dalmuir will connect in with the 1030 bus. 1136 from Queen Street Low Level to Dalmuir will connect in with the 1218 bus. 1536 from Queen Street Low Level to Dalmuir will connect in with the 1630 bus. 1731 from Queen Street Low Level to Dalmuir will connect in with the 1810 bus. Buses will be departing 20 minutes earlier than the scheduled train time so we ask everyone to plan ahead and arrive at the station in plenty of time for their journey Our electric services are running as booked via Queen Street low level. For any further timetable details please visit the service news part of our website. Work is underway to stabilise the slope and remove the footbridge before the line can be safely reopened. The estimate for the line to be reopened is the start of service Wednesday 12th April. The plan is under daily review and may be subject to change all of which will be communicated widely. For live journey updates download the free ScotRail App or check our website at http://www.journeycheck.com/ScotRail. You can also tweet and follow us @ScotRail"},{"title":"Alterations to services between Glasgow Queen Street and Oban","description":"Due to a landslip between Possilpark & Parkhouse and Gilshochill the line is closed. Disruption is expected until the end of the day on 11/04/17. Train services between Glasgow Queen Street and Oban will be terminated at and started back from Crianlarich. Ardlui, Arrochar & Tarbet, Garelochhead, Helensburgh Upper, Dumbarton Central and Glasgow Queen Street will not be served. Customer Advice: Rail services between Glasgow Queen Street - Crianlarich have been suspended. Customers traveling direct to Crianlarich and connecting into train services towards Fort William, Mallaig and Oban buses will depart from Glasgow Queen Street. Customers wishing to travel from Glasgow Queen Street to intermediate stops between Glasgow and Crianlarich. The following train services will connect into buses at Dalmuir calling at Dumbarton Central, Helensburgh Upper, Garelochead, Arrochar and Tarbet, Ardlui and Crianlarich. 0731 from Queen Street Low Level to Dalmuir will connect in with the 0815 bus. 0936 from Queen Street Low Level to Dalmuir will connect in with the 1030 bus. 1136 from Queen Street Low Level to Dalmuir will connect in with the 1218 bus. 1536 from Queen Street Low Level to Dalmuir will connect in with the 1630 bus. 1731 from Queen Street Low Level to Dalmuir will connect in with the 1810 bus. Buses will be departing 20 minutes earlier than the scheduled train time so we ask everyone to plan ahead and arrive at the station in plenty of time for their journey Our electric services are running as booked via Queen Street low level. For any further timetable details please visit the service news part of our website. Work is underway to stabilise the slope and remove the footbridge before the line can be safely reopened. The estimate for the line to be reopened is the start of service Wednesday 12th April. The plan is under daily review and may be subject to change all of which will be communicated widely. For live journey updates download the free ScotRail App or check our website at http://www.journeycheck.com/ScotRail. You can also tweet and follow us @ScotRail"},{"title":"Alterations to services between Glasgow Queen Street and Fort William","description":"Due to a landslip between Possilpark & Parkhouse and Gilshochill the line is closed. Disruption is expected until the end of the day on 11/04/17. Train services between Glasgow Queen Street and Fort William will be terminated at and started back from Crianlarich. Ardlui, Arrochar & Tarbet, Garelochhead, Helensburgh Upper, Dumbarton Central and Glasgow Queen Street will not be served. Customer Advice: Rail services between Glasgow Queen Street - Crianlarich have been suspended. Customers traveling direct to Crianlarich and connecting into train services towards Fort William, Mallaig and Oban buses will depart from Glasgow Queen Street. Customers wishing to travel from Glasgow Queen Street to intermediate stops between Glasgow and Crianlarich. The following train services will connect into buses at Dalmuir calling at Dumbarton Central, Helensburgh Upper, Garelochead, Arrochar and Tarbet, Ardlui and Crianlarich. 0731 from Queen Street Low Level to Dalmuir will connect in with the 0815 bus. 0936 from Queen Street Low Level to Dalmuir will connect in with the 1030 bus. 1136 from Queen Street Low Level to Dalmuir will connect in with the 1218 bus. 1536 from Queen Street Low Level to Dalmuir will connect in with the 1630 bus. 1731 from Queen Street Low Level to Dalmuir will connect in with the 1810 bus. Buses will be departing 20 minutes earlier than the scheduled train time so we ask everyone to plan ahead and arrive at the station in plenty of time for their journey Our electric services are running as booked via Queen Street low level. For any further timetable details please visit the service news part of our website. Work is underway to stabilise the slope and remove the footbridge before the line can be safely reopened. The estimate for the line to be reopened is the start of service Wednesday 12th April. The plan is under daily review and may be subject to change all of which will be communicated widely. For live journey updates download the free ScotRail App or check our website at http://www.journeycheck.com/ScotRail. You can also tweet and follow us @ScotRail"}]},"weather":{"currently":"Partly Cloudy. Around 5 to 10 degrees.","today":"Light rain in the morning and overnight.","later":"Light rain throughout the week, with temperatures bottoming out at 9°C on Saturday.","alerts":{},"data":{"latitude":55.95,"longitude":-4.566667,"timezone":"Europe/London","offset":1,"currently":{"time":1491816544,"summary":"Partly Cloudy","icon":"partly-cloudy-day","nearestStormDistance":43,"nearestStormBearing":302,"precipIntensity":0,"precipProbability":0,"temperature":9.16,"apparentTemperature":6.76,"dewPoint":4.43,"humidity":0.72,"windSpeed":9.97,"windBearing":261,"visibility":7.9,"cloudCover":0.28,"pressure":1025.52,"ozone":342.82},"minutely":{"summary":"Partly cloudy for the hour.","icon":"partly-cloudy-day","data":[{"time":1491816540,"precipIntensity":0,"precipProbability":0},{"time":1491816600,"precipIntensity":0,"precipProbability":0},{"time":1491816660,"precipIntensity":0,"precipProbability":0},{"time":1491816720,"precipIntensity":0,"precipProbability":0},{"time":1491816780,"precipIntensity":0,"precipProbability":0},{"time":1491816840,"precipIntensity":0,"precipProbability":0},{"time":1491816900,"precipIntensity":0,"precipProbability":0},{"time":1491816960,"precipIntensity":0,"precipProbability":0},{"time":1491817020,"precipIntensity":0,"precipProbability":0},{"time":1491817080,"precipIntensity":0,"precipProbability":0},{"time":1491817140,"precipIntensity":0,"precipProbability":0},{"time":1491817200,"precipIntensity":0,"precipProbability":0},{"time":1491817260,"precipIntensity":0,"precipProbability":0},{"time":1491817320,"precipIntensity":0,"precipProbability":0},{"time":1491817380,"precipIntensity":0,"precipProbability":0},{"time":1491817440,"precipIntensity":0,"precipProbability":0},{"time":1491817500,"precipIntensity":0,"precipProbability":0},{"time":1491817560,"precipIntensity":0,"precipProbability":0},{"time":1491817620,"precipIntensity":0,"precipProbability":0},{"time":1491817680,"precipIntensity":0,"precipProbability":0},{"time":1491817740,"precipIntensity":0,"precipProbability":0},{"time":1491817800,"precipIntensity":0,"precipProbability":0},{"time":1491817860,"precipIntensity":0,"precipProbability":0},{"time":1491817920,"precipIntensity":0,"precipProbability":0},{"time":1491817980,"precipIntensity":0,"precipProbability":0},{"time":1491818040,"precipIntensity":0,"precipProbability":0},{"time":1491818100,"precipIntensity":0,"precipProbability":0},{"time":1491818160,"precipIntensity":0,"precipProbability":0},{"time":1491818220,"precipIntensity":0,"precipProbability":0},{"time":1491818280,"precipIntensity":0,"precipProbability":0},{"time":1491818340,"precipIntensity":0,"precipProbability":0},{"time":1491818400,"precipIntensity":0,"precipProbability":0},{"time":1491818460,"precipIntensity":0,"precipProbability":0},{"time":1491818520,"precipIntensity":0,"precipProbability":0},{"time":1491818580,"precipIntensity":0,"precipProbability":0},{"time":1491818640,"precipIntensity":0,"precipProbability":0},{"time":1491818700,"precipIntensity":0,"precipProbability":0},{"time":1491818760,"precipIntensity":0,"precipProbability":0},{"time":1491818820,"precipIntensity":0,"precipProbability":0},{"time":1491818880,"precipIntensity":0,"precipProbability":0},{"time":1491818940,"precipIntensity":0,"precipProbability":0},{"time":1491819000,"precipIntensity":0,"precipProbability":0},{"time":1491819060,"precipIntensity":0,"precipProbability":0},{"time":1491819120,"precipIntensity":0,"precipProbability":0},{"time":1491819180,"precipIntensity":0,"precipProbability":0},{"time":1491819240,"precipIntensity":0,"precipProbability":0},{"time":1491819300,"precipIntensity":0,"precipProbability":0},{"time":1491819360,"precipIntensity":0,"precipProbability":0},{"time":1491819420,"precipIntensity":0,"precipProbability":0},{"time":1491819480,"precipIntensity":0,"precipProbability":0},{"time":1491819540,"precipIntensity":0,"precipProbability":0},{"time":1491819600,"precipIntensity":0,"precipProbability":0},{"time":1491819660,"precipIntensity":0,"precipProbability":0},{"time":1491819720,"precipIntensity":0,"precipProbability":0},{"time":1491819780,"precipIntensity":0,"precipProbability":0},{"time":1491819840,"precipIntensity":0,"precipProbability":0},{"time":1491819900,"precipIntensity":0,"precipProbability":0},{"time":1491819960,"precipIntensity":0,"precipProbability":0},{"time":1491820020,"precipIntensity":0,"precipProbability":0},{"time":1491820080,"precipIntensity":0,"precipProbability":0},{"time":1491820140,"precipIntensity":0,"precipProbability":0}]},"hourly":{"summary":"Light rain starting tonight, continuing until tomorrow morning.","icon":"rain","data":[{"time":1491814800,"summary":"Clear","icon":"clear-day","precipIntensity":0,"precipProbability":0,"temperature":9.2,"apparentTemperature":6.96,"dewPoint":4.32,"humidity":0.72,"windSpeed":9.25,"windBearing":262,"visibility":7.1,"cloudCover":0.23,"pressure":1025.23,"ozone":343.48},{"time":1491818400,"summary":"Partly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":8.51,"apparentTemperature":5.81,"dewPoint":3.97,"humidity":0.73,"windSpeed":10.74,"windBearing":261,"visibility":8.75,"cloudCover":0.33,"pressure":1025.82,"ozone":342.11},{"time":1491822000,"summary":"Partly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":9.71,"apparentTemperature":7.26,"dewPoint":5.1,"humidity":0.73,"windSpeed":11.01,"windBearing":259,"visibility":10,"cloudCover":0.44,"pressure":1026.3,"ozone":339.97},{"time":1491825600,"summary":"Partly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":10.86,"apparentTemperature":10.86,"dewPoint":6.01,"humidity":0.72,"windSpeed":12.06,"windBearing":256,"visibility":10,"cloudCover":0.58,"pressure":1026.68,"ozone":337.88},{"time":1491829200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":10.93,"apparentTemperature":10.93,"dewPoint":5.91,"humidity":0.71,"windSpeed":12.49,"windBearing":255,"visibility":10,"cloudCover":0.62,"pressure":1027.01,"ozone":336.01},{"time":1491832800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":10.33,"apparentTemperature":10.33,"dewPoint":5.19,"humidity":0.7,"windSpeed":12.65,"windBearing":257,"visibility":10,"cloudCover":0.68,"pressure":1027.27,"ozone":334.19},{"time":1491836400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":9.67,"apparentTemperature":6.96,"dewPoint":4.09,"humidity":0.68,"windSpeed":12.48,"windBearing":257,"visibility":10,"cloudCover":0.73,"pressure":1027.45,"ozone":332.81},{"time":1491840000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":8.64,"apparentTemperature":5.75,"dewPoint":3.39,"humidity":0.7,"windSpeed":11.98,"windBearing":254,"visibility":10,"cloudCover":0.77,"pressure":1027.5,"ozone":332.15},{"time":1491843600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":7.88,"apparentTemperature":4.92,"dewPoint":3.13,"humidity":0.72,"windSpeed":11.32,"windBearing":251,"visibility":10,"cloudCover":0.8,"pressure":1027.47,"ozone":331.92},{"time":1491847200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0203,"precipProbability":0.01,"precipType":"rain","temperature":7.67,"apparentTemperature":4.81,"dewPoint":3.27,"humidity":0.74,"windSpeed":10.46,"windBearing":247,"visibility":10,"cloudCover":0.82,"pressure":1027.45,"ozone":331.63},{"time":1491850800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.1219,"precipProbability":0.2,"precipType":"rain","temperature":7.42,"apparentTemperature":4.72,"dewPoint":3.86,"humidity":0.78,"windSpeed":9.44,"windBearing":239,"visibility":10,"cloudCover":0.83,"pressure":1027.51,"ozone":331.22},{"time":1491854400,"summary":"Drizzle","icon":"rain","precipIntensity":0.16,"precipProbability":0.29,"precipType":"rain","temperature":7.27,"apparentTemperature":4.82,"dewPoint":4.52,"humidity":0.83,"windSpeed":8.25,"windBearing":226,"visibility":10,"cloudCover":0.83,"pressure":1027.53,"ozone":330.76},{"time":1491858000,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0.0914,"precipProbability":0.13,"precipType":"rain","temperature":7.07,"apparentTemperature":4.65,"dewPoint":5.02,"humidity":0.87,"windSpeed":7.91,"windBearing":215,"visibility":10,"cloudCover":0.85,"pressure":1027.35,"ozone":330},{"time":1491861600,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0.0889,"precipProbability":0.12,"precipType":"rain","temperature":7.03,"apparentTemperature":4.43,"dewPoint":5.27,"humidity":0.89,"windSpeed":8.64,"windBearing":208,"visibility":10,"cloudCover":0.84,"pressure":1026.9,"ozone":328.8},{"time":1491865200,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0.1168,"precipProbability":0.19,"precipType":"rain","temperature":7.12,"apparentTemperature":4.32,"dewPoint":5.38,"humidity":0.89,"windSpeed":9.57,"windBearing":203,"visibility":10,"cloudCover":0.84,"pressure":1026.28,"ozone":327.31},{"time":1491868800,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0.1219,"precipProbability":0.2,"precipType":"rain","temperature":7.24,"apparentTemperature":4.24,"dewPoint":5.6,"humidity":0.89,"windSpeed":10.66,"windBearing":201,"visibility":10,"cloudCover":0.85,"pressure":1025.64,"ozone":325.7},{"time":1491872400,"summary":"Light Rain","icon":"rain","precipIntensity":0.2489,"precipProbability":0.5,"precipType":"rain","temperature":7.46,"apparentTemperature":4.37,"dewPoint":5.86,"humidity":0.9,"windSpeed":11.4,"windBearing":203,"visibility":10,"cloudCover":0.85,"pressure":1024.98,"ozone":323.85},{"time":1491876000,"summary":"Light Rain","icon":"rain","precipIntensity":0.3734,"precipProbability":0.56,"precipType":"rain","temperature":7.68,"apparentTemperature":4.56,"dewPoint":6.15,"humidity":0.9,"windSpeed":11.92,"windBearing":205,"visibility":10,"cloudCover":0.85,"pressure":1024.3,"ozone":321.88},{"time":1491879600,"summary":"Light Rain","icon":"rain","precipIntensity":0.5994,"precipProbability":0.63,"precipType":"rain","temperature":7.74,"apparentTemperature":4.61,"dewPoint":6.23,"humidity":0.9,"windSpeed":12.04,"windBearing":214,"visibility":10,"cloudCover":0.84,"pressure":1023.78,"ozone":320.39},{"time":1491883200,"summary":"Light Rain","icon":"rain","precipIntensity":0.5867,"precipProbability":0.63,"precipType":"rain","temperature":7.62,"apparentTemperature":4.43,"dewPoint":6.18,"humidity":0.91,"windSpeed":12.19,"windBearing":220,"visibility":10,"cloudCover":0.85,"pressure":1023.51,"ozone":319.79},{"time":1491886800,"summary":"Light Rain","icon":"rain","precipIntensity":0.3327,"precipProbability":0.55,"precipType":"rain","temperature":7.53,"apparentTemperature":4.29,"dewPoint":6.11,"humidity":0.91,"windSpeed":12.32,"windBearing":225,"visibility":10,"cloudCover":0.84,"pressure":1023.35,"ozone":319.67},{"time":1491890400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0838,"precipProbability":0.11,"precipType":"rain","temperature":7.53,"apparentTemperature":4.28,"dewPoint":6.12,"humidity":0.91,"windSpeed":12.46,"windBearing":228,"visibility":10,"cloudCover":0.89,"pressure":1023.11,"ozone":319.36},{"time":1491894000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":7.94,"apparentTemperature":4.65,"dewPoint":6.26,"humidity":0.89,"windSpeed":13.27,"windBearing":236,"visibility":10,"cloudCover":0.81,"pressure":1022.79,"ozone":318.95},{"time":1491897600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0381,"precipProbability":0.03,"precipType":"rain","temperature":8.49,"apparentTemperature":5.31,"dewPoint":6.53,"humidity":0.87,"windSpeed":13.53,"windBearing":235,"visibility":10,"cloudCover":0.79,"pressure":1022.47,"ozone":318.39},{"time":1491901200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0584,"precipProbability":0.06,"precipType":"rain","temperature":9.13,"apparentTemperature":6.07,"dewPoint":6.85,"humidity":0.86,"windSpeed":13.87,"windBearing":234,"visibility":10,"cloudCover":0.78,"pressure":1022.12,"ozone":317.78},{"time":1491904800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0432,"precipProbability":0.04,"precipType":"rain","temperature":9.74,"apparentTemperature":6.77,"dewPoint":7.32,"humidity":0.85,"windSpeed":14.37,"windBearing":232,"visibility":10,"cloudCover":0.77,"pressure":1021.78,"ozone":317.23},{"time":1491908400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0305,"precipProbability":0.02,"precipType":"rain","temperature":10.39,"apparentTemperature":10.39,"dewPoint":7.81,"humidity":0.84,"windSpeed":14.93,"windBearing":231,"visibility":10,"cloudCover":0.76,"pressure":1021.42,"ozone":316.84},{"time":1491912000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0229,"precipProbability":0.01,"precipType":"rain","temperature":10.91,"apparentTemperature":10.91,"dewPoint":8.21,"humidity":0.83,"windSpeed":15.56,"windBearing":230,"visibility":10,"cloudCover":0.84,"pressure":1021.05,"ozone":316.7},{"time":1491915600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":11.2,"apparentTemperature":11.2,"dewPoint":8.26,"humidity":0.82,"windSpeed":16.14,"windBearing":232,"visibility":10,"cloudCover":0.78,"pressure":1020.47,"ozone":317.21},{"time":1491919200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":11.18,"apparentTemperature":11.18,"dewPoint":8.05,"humidity":0.81,"windSpeed":16.86,"windBearing":235,"visibility":10,"cloudCover":0.78,"pressure":1019.82,"ozone":318.35},{"time":1491922800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0356,"precipProbability":0.03,"precipType":"rain","temperature":11.09,"apparentTemperature":11.09,"dewPoint":7.83,"humidity":0.8,"windSpeed":17.46,"windBearing":237,"visibility":10,"cloudCover":0.78,"pressure":1019.12,"ozone":319.67},{"time":1491926400,"summary":"Light Rain","icon":"rain","precipIntensity":0.2819,"precipProbability":0.52,"precipType":"rain","temperature":10.64,"apparentTemperature":10.64,"dewPoint":7.72,"humidity":0.82,"windSpeed":17.51,"windBearing":237,"visibility":10,"cloudCover":0.78,"pressure":1018.4,"ozone":321.1},{"time":1491930000,"summary":"Light Rain","icon":"rain","precipIntensity":0.6198,"precipProbability":0.63,"precipType":"rain","temperature":10.15,"apparentTemperature":10.15,"dewPoint":7.61,"humidity":0.84,"windSpeed":17.36,"windBearing":236,"visibility":10,"cloudCover":0.77,"pressure":1017.64,"ozone":322.71},{"time":1491933600,"summary":"Light Rain","icon":"rain","precipIntensity":0.8763,"precipProbability":0.68,"precipType":"rain","temperature":9.63,"apparentTemperature":6.29,"dewPoint":7.48,"humidity":0.86,"windSpeed":17.08,"windBearing":235,"visibility":9.51,"cloudCover":0.82,"pressure":1016.98,"ozone":324.28},{"time":1491937200,"summary":"Light Rain","icon":"rain","precipIntensity":1.0109,"precipProbability":0.7,"precipType":"rain","temperature":9.28,"apparentTemperature":5.87,"dewPoint":7.52,"humidity":0.89,"windSpeed":16.84,"windBearing":234,"visibility":8.23,"cloudCover":0.87,"pressure":1016.49,"ozone":325.71},{"time":1491940800,"summary":"Light Rain","icon":"rain","precipIntensity":1.0668,"precipProbability":0.7,"precipType":"rain","temperature":8.96,"apparentTemperature":5.49,"dewPoint":7.59,"humidity":0.91,"windSpeed":16.5,"windBearing":233,"visibility":6.95,"cloudCover":0.94,"pressure":1016.09,"ozone":327.1},{"time":1491944400,"summary":"Light Rain","icon":"rain","precipIntensity":1.0084,"precipProbability":0.7,"precipType":"rain","temperature":8.64,"apparentTemperature":5.11,"dewPoint":7.59,"humidity":0.93,"windSpeed":16.32,"windBearing":231,"visibility":5.67,"cloudCover":1,"pressure":1015.7,"ozone":328.59},{"time":1491948000,"summary":"Light Rain","icon":"rain","precipIntensity":0.7468,"precipProbability":0.66,"precipType":"rain","temperature":8.48,"apparentTemperature":4.94,"dewPoint":7.42,"humidity":0.93,"windSpeed":15.95,"windBearing":235,"visibility":5.87,"cloudCover":1,"pressure":1015.31,"ozone":329.81},{"time":1491951600,"summary":"Light Rain","icon":"rain","precipIntensity":0.3658,"precipProbability":0.56,"precipType":"rain","temperature":8.33,"apparentTemperature":4.77,"dewPoint":7.21,"humidity":0.93,"windSpeed":15.83,"windBearing":240,"visibility":6.08,"cloudCover":1,"pressure":1014.94,"ozone":331.14},{"time":1491955200,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0813,"precipProbability":0.11,"precipType":"rain","temperature":8.19,"apparentTemperature":4.6,"dewPoint":6.97,"humidity":0.92,"windSpeed":15.73,"windBearing":244,"visibility":6.28,"cloudCover":0.99,"pressure":1014.61,"ozone":333.77},{"time":1491958800,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":7.79,"apparentTemperature":4.16,"dewPoint":6.32,"humidity":0.9,"windSpeed":15.33,"windBearing":246,"visibility":9.85,"cloudCover":0.83,"pressure":1014.31,"ozone":338.98},{"time":1491962400,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":7.39,"apparentTemperature":3.7,"dewPoint":5.64,"humidity":0.89,"windSpeed":14.88,"windBearing":249,"visibility":10,"cloudCover":0.74,"pressure":1014.06,"ozone":345.5},{"time":1491966000,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0.0254,"precipProbability":0.01,"precipType":"rain","temperature":7.11,"apparentTemperature":3.39,"dewPoint":5.11,"humidity":0.87,"windSpeed":14.53,"windBearing":251,"visibility":10,"cloudCover":0.68,"pressure":1013.84,"ozone":350.75},{"time":1491969600,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":7.06,"apparentTemperature":3.3,"dewPoint":4.93,"humidity":0.86,"windSpeed":14.66,"windBearing":251,"visibility":10,"cloudCover":0.64,"pressure":1013.64,"ozone":353.84},{"time":1491973200,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":7.11,"apparentTemperature":3.34,"dewPoint":4.9,"humidity":0.86,"windSpeed":14.86,"windBearing":250,"visibility":10,"cloudCover":0.71,"pressure":1013.48,"ozone":355.65},{"time":1491976800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":7.19,"apparentTemperature":3.41,"dewPoint":4.88,"humidity":0.85,"windSpeed":15.11,"windBearing":250,"visibility":10,"cloudCover":0.77,"pressure":1013.39,"ozone":356.34},{"time":1491980400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":7.77,"apparentTemperature":4.12,"dewPoint":5.3,"humidity":0.84,"windSpeed":15.39,"windBearing":254,"visibility":10,"cloudCover":0.82,"pressure":1013.4,"ozone":355.82},{"time":1491984000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":8.38,"apparentTemperature":4.84,"dewPoint":5.73,"humidity":0.83,"windSpeed":15.8,"windBearing":258,"visibility":10,"cloudCover":0.86,"pressure":1013.48,"ozone":354.18},{"time":1491987600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":8.99,"apparentTemperature":5.57,"dewPoint":6.12,"humidity":0.82,"windSpeed":16.26,"windBearing":262,"visibility":10,"cloudCover":0.93,"pressure":1013.59,"ozone":351.73}]},"daily":{"summary":"Light rain throughout the week, with temperatures bottoming out at 9°C on Saturday.","icon":"rain","data":[{"time":1491778800,"summary":"Light rain in the morning and overnight.","icon":"rain","sunriseTime":1491801979,"sunsetTime":1491851695,"moonPhase":0.48,"precipIntensity":0.0508,"precipIntensityMax":0.2921,"precipIntensityMaxTime":1491800400,"precipProbability":0.53,"precipType":"rain","temperatureMin":5.96,"temperatureMinTime":1491789600,"temperatureMax":10.93,"temperatureMaxTime":1491829200,"apparentTemperatureMin":2.43,"apparentTemperatureMinTime":1491789600,"apparentTemperatureMax":10.93,"apparentTemperatureMaxTime":1491829200,"dewPoint":4.24,"humidity":0.78,"windSpeed":10.32,"windBearing":245,"visibility":10,"cloudCover":0.59,"pressure":1024.75,"ozone":338},{"time":1491865200,"summary":"Light rain in the morning and evening.","icon":"rain","sunriseTime":1491888225,"sunsetTime":1491938217,"moonPhase":0.52,"precipIntensity":0.3454,"precipIntensityMax":1.0668,"precipIntensityMaxTime":1491940800,"precipProbability":0.7,"precipType":"rain","temperatureMin":7.12,"temperatureMinTime":1491865200,"temperatureMax":11.2,"temperatureMaxTime":1491915600,"apparentTemperatureMin":4.24,"apparentTemperatureMinTime":1491868800,"apparentTemperatureMax":11.2,"apparentTemperatureMaxTime":1491915600,"dewPoint":6.98,"humidity":0.87,"windSpeed":14.16,"windBearing":228,"visibility":10,"cloudCover":0.84,"pressure":1020.94,"ozone":321.6},{"time":1491951600,"summary":"Mostly cloudy throughout the day.","icon":"partly-cloudy-day","sunriseTime":1491974472,"sunsetTime":1492024739,"moonPhase":0.54,"precipIntensity":0.0305,"precipIntensityMax":0.3658,"precipIntensityMaxTime":1491951600,"precipProbability":0.56,"precipType":"rain","temperatureMin":6.92,"temperatureMinTime":1492034400,"temperatureMax":10.59,"temperatureMaxTime":1492002000,"apparentTemperatureMin":3.3,"apparentTemperatureMinTime":1491969600,"apparentTemperatureMax":10.59,"apparentTemperatureMaxTime":1492002000,"dewPoint":5.23,"humidity":0.81,"windSpeed":15.73,"windBearing":260,"visibility":10,"cloudCover":0.74,"pressure":1014.5,"ozone":343.14},{"time":1492038000,"summary":"Light rain overnight.","icon":"rain","sunriseTime":1492060720,"sunsetTime":1492111261,"moonPhase":0.57,"precipIntensity":0.033,"precipIntensityMax":0.0991,"precipIntensityMaxTime":1492106400,"precipProbability":0.15,"precipType":"rain","temperatureMin":5.41,"temperatureMinTime":1492048800,"temperatureMax":10.93,"temperatureMaxTime":1492095600,"apparentTemperatureMin":2.32,"apparentTemperatureMinTime":1492048800,"apparentTemperatureMax":10.93,"apparentTemperatureMaxTime":1492095600,"dewPoint":4.32,"humidity":0.8,"windSpeed":9.31,"windBearing":269,"visibility":10,"cloudCover":0.68,"pressure":1017.81,"ozone":346.78},{"time":1492124400,"summary":"Light rain in the morning and evening.","icon":"rain","sunriseTime":1492146968,"sunsetTime":1492197783,"moonPhase":0.6,"precipIntensity":0.1778,"precipIntensityMax":0.447,"precipIntensityMaxTime":1492207200,"precipProbability":0.59,"precipType":"rain","temperatureMin":5.81,"temperatureMinTime":1492207200,"temperatureMax":9.78,"temperatureMaxTime":1492174800,"apparentTemperatureMin":2.31,"apparentTemperatureMinTime":1492149600,"apparentTemperatureMax":6.66,"apparentTemperatureMaxTime":1492174800,"dewPoint":4.31,"humidity":0.81,"windSpeed":12.67,"windBearing":268,"visibility":10,"cloudCover":0.75,"pressure":1012.59,"ozone":351.94},{"time":1492210800,"summary":"Mostly cloudy until evening and breezy until afternoon.","icon":"wind","sunriseTime":1492233216,"sunsetTime":1492284305,"moonPhase":0.63,"precipIntensity":0.0914,"precipIntensityMax":0.414,"precipIntensityMaxTime":1492210800,"precipProbability":0.58,"precipType":"rain","temperatureMin":1.96,"temperatureMinTime":1492293600,"temperatureMax":9.01,"temperatureMaxTime":1492264800,"apparentTemperatureMin":-2.1,"apparentTemperatureMinTime":1492293600,"apparentTemperatureMax":4.94,"apparentTemperatureMaxTime":1492264800,"dewPoint":1.27,"humidity":0.76,"windSpeed":15.84,"windBearing":285,"visibility":9.69,"cloudCover":0.64,"pressure":1011.92,"ozone":378.16},{"time":1492297200,"summary":"Partly cloudy starting in the afternoon.","icon":"partly-cloudy-night","sunriseTime":1492319466,"sunsetTime":1492370828,"moonPhase":0.66,"precipIntensity":0.0356,"precipIntensityMax":0.066,"precipIntensityMaxTime":1492358400,"precipProbability":0.08,"precipType":"rain","temperatureMin":0,"temperatureMinTime":1492311600,"temperatureMax":10.9,"temperatureMaxTime":1492347600,"apparentTemperatureMin":-3.51,"apparentTemperatureMinTime":1492304400,"apparentTemperatureMax":10.9,"apparentTemperatureMaxTime":1492347600,"dewPoint":1.42,"humidity":0.78,"windSpeed":7.74,"windBearing":286,"cloudCover":0.13,"pressure":1020.68,"ozone":336.52},{"time":1492383600,"summary":"Drizzle in the evening.","icon":"rain","sunriseTime":1492405716,"sunsetTime":1492457350,"moonPhase":0.69,"precipIntensity":0.0762,"precipIntensityMax":0.16,"precipIntensityMaxTime":1492452000,"precipProbability":0.29,"precipType":"rain","temperatureMin":1.17,"temperatureMinTime":1492394400,"temperatureMax":11.39,"temperatureMaxTime":1492441200,"apparentTemperatureMin":-1.61,"apparentTemperatureMinTime":1492398000,"apparentTemperatureMax":11.39,"apparentTemperatureMaxTime":1492441200,"dewPoint":2.78,"humidity":0.81,"windSpeed":6.7,"windBearing":259,"cloudCover":0.63,"pressure":1021.44,"ozone":320.89}]},"flags":{"sources":["datapoint","gfs","cmc","nam","rap","sref","fnmoc","isd","madis","nearest-precip","metwarn","darksky"],"datapoint-stations":["uk-301777","uk-3134","uk-322052","uk-322595","uk-322659","uk-350056","uk-351269","uk-351289","uk-351397","uk-351465","uk-352102","uk-352379","uk-352954","uk-354999","uk-371524","uk-371606"],"isd-stations":["031070-99999","031160-99999","031200-99999","031290-99999","031330-99999","031340-99999","031350-99999","031360-99999","031380-99999","031390-99999","031400-99999","031430-99999","031450-99999","031480-99999","031490-99999","031520-99999"],"madis-stations":["AU945","C9560","C9739","D4018","E0915","E3381","EGPF","EGPK"],"units":"uk2"}}},"history":["On this day in 1512, King James V was born at Linlithgow Palace. He was the only surviving son of James IV and Margaret Tudor and inherited the throne at the age of 18 months. Between 1526 and 1528, he was held prisoner by his step-father, Archibald Douglas. Once he escaped James set about asserting control of the country, and was unswerving in his hatred of the Red Douglas clan and their English allies. His second marriage was to the French Mary of Guise, who was to bear him a daughter, the future Mary, Queen of Scots.","However, James cannot have been too confident in his heir as he uttered the famous quote, \"It cam wi' a lass and it will gang wi' a lass\", at her birth, believing that a female heir spelled the end of the Stuart dynasty.","On 10th April 1840, Alexander Nasmyth, the Scottish painter, died.","Nasmyth, born in Edinburgh, was noted for his portraits and landscapes. He studied under Allan Ramsay the younger, and spent many years painting in Italy. Although he is most well known today for his most famous work, the portrait of Scotland's national poet, Robert Burns, his real passion lay in landscape painting. Poignantly, his last painting, completed only weeks before his death, was entitled 'Going Home' and featured an old labourer winding his way home at the end of the day.","During preparations for the maiden voyage of the Columbia space shuttle, NASA engineers were monitoring a glitch in the shuttle’s computer systems. Synchronization between the main and backup AP-101 flight control computers was found to be the culprit behind the bug. Two gears were discovered to be out-of-sync – and repair would take at least a day to resolve the problem. Liftoff was re-scheduled for two days later, and countdown and launch on April 12 proceeded with no further setbacks. Columbia landed safely at Edwards Air Force Base in the Mojave Desert after orbiting Earth 34 times. NASA’s five space shuttles each housed 4 IBM AP-101 computers, with a fifth serving as a backup flight system computer. The AP-101s were built around transistor-transistor logic (TTL) semiconductor circuits and used the same architecture as the IBM System/360 family of computers. An earlier version of the AP-101 was first announced by IBM in 1966 as the 4Pi computer."],"today":"Monday April 10, 2017 - The 99th day of 2017, and there are 265 days until the end of the year","tv":{"entries":[{"summary":"NCIS: Los Angeles 8x20 - From Havana with Love","dtstart":"2017-04-10T00:00:00.000Z","dtend":"2017-04-10T01:00:00.000Z","description":"The NCIS team investigates a defense contractor\\, Rebecca","timeStart":"1:00:00","timeEnd":"2:00:00","duration":"1 hour","combined":"1:00:00 - 'NCIS: Los Angeles 8x20 - From Havana with Love, 1 hour","recur":null,"long":"Monday, 1:00:00 - ","longcombined":"Monday, 1:00:00 - NCIS: Los Angeles 8x20 - From Havana with Love, 1 hour"},{"summary":"Once Upon a Time 6x16 - Mother's Little Helper","dtstart":"2017-04-10T00:00:00.000Z","dtend":"2017-04-10T01:00:00.000Z","description":"Gold and Belle convince Emma to help Gideon\\, explaining that","timeStart":"1:00:00","timeEnd":"2:00:00","duration":"1 hour","combined":"1:00:00 - 'Once Upon a Time 6x16 - Mother's Little Helper, 1 hour","recur":null,"long":"Monday, 1:00:00 - ","longcombined":"Monday, 1:00:00 - Once Upon a Time 6x16 - Mother's Little Helper, 1 hour"},{"summary":"Last Week Tonight With John Oliver 4x8 - Season 4\\, Episode 8","dtstart":"2017-04-10T03:00:00.000Z","dtend":"2017-04-10T03:30:00.000Z","description":"Coming Soon...","timeStart":"4:00:00","timeEnd":"4:30:00","duration":"30 minutes","combined":"4:00:00 - 'Last Week Tonight With John Oliver 4x8 - Season 4\\, Episode 8, 30 minutes","recur":null,"long":"Monday, 4:00:00 - ","longcombined":"Monday, 4:00:00 - Last Week Tonight With John Oliver 4x8 - Season 4\\, Episode 8, 30 minutes"}]},"cal":{"today":[{"summary":"Glasgow\\, United Kingdom\\, April 2017","dtstart":"2017-04-09T23:00:00.000Z","dtend":"2017-04-10T23:00:00.000Z","description":"Martin Donnelly is in Glasgow\\, United Kingdom from Apr 10\\, 2","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"1 day","combined":"0:00:00 - 'Glasgow\\, United Kingdom\\, April 2017, 1 day","recur":null,"long":"Monday, 0:00:00 - ","longcombined":"Monday, 0:00:00 - Glasgow\\, United Kingdom\\, April 2017, 1 day"},{"summary":"SCOTRAIL - Dumbarton East to Glasgow Queen Street","dtstart":"2017-04-10T06:28:00.000Z","dtend":"2017-04-10T07:04:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"7:28:00","timeEnd":"8:04:00","duration":"36 minutes","combined":"7:28:00 - 'SCOTRAIL - Dumbarton East to Glasgow Queen Street, 36 minutes","recur":null,"long":"Monday, 7:28:00 - ","longcombined":"Monday, 7:28:00 - SCOTRAIL - Dumbarton East to Glasgow Queen Street, 36 minutes"},{"summary":"SCOTRAIL - Glasgow Queen Street to Haymarket (Edinburgh)","dtstart":"2017-04-10T07:15:00.000Z","dtend":"2017-04-10T08:04:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"8:15:00","timeEnd":"9:04:00","duration":"49 minutes","combined":"8:15:00 - 'SCOTRAIL - Glasgow Queen Street to Haymarket (Edinburgh), 49 minutes","recur":null,"long":"Monday, 8:15:00 - ","longcombined":"Monday, 8:15:00 - SCOTRAIL - Glasgow Queen Street to Haymarket (Edinburgh), 49 minutes"}],"tomorrow":[],"week":[{"summary":"Easter Sunday","dtstart":"2017-04-15T23:00:00.000Z","dtend":"2017-04-16T23:00:00.000Z","description":"","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"1 day","combined":"0:00:00 - 'Easter Sunday, 1 day","recur":null,"long":"Sunday, 0:00:00 - ","longcombined":"Sunday, 0:00:00 - Easter Sunday, 1 day"},{"summary":"Good Friday","dtstart":"2017-04-13T23:00:00.000Z","dtend":"2017-04-14T23:00:00.000Z","description":"","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"1 day","combined":"0:00:00 - 'Good Friday, 1 day","recur":null,"long":"Friday, 0:00:00 - ","longcombined":"Friday, 0:00:00 - Good Friday, 1 day"},{"summary":"Update Timesheet","dtstart":"2017-04-14T14:30:00.958Z","dtend":"2017-04-14T15:30:00.958Z","description":"Update the timesheet using https://outsauce.backofficeportal.co","timeStart":"15:30:00","timeEnd":"16:30:00","duration":"1 hour","combined":"15:30:00 - 'Update Timesheet, 1 hour","recur":"FREQ=WEEKLY;COUNT=15;BYDAY=FR","long":"Friday, 15:30:00 - ","longcombined":"Friday, 15:30:00 - Update Timesheet, 1 hour"},{"summary":"Goteborg\\, Sweden\\, April 2017","dtstart":"2017-04-13T23:00:00.000Z","dtend":"2017-04-17T23:00:00.000Z","description":"Martin Donnelly is in Goteborg\\, Sweden from Apr 14 to 17\\, 20","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"4 days","combined":"0:00:00 - 'Goteborg\\, Sweden\\, April 2017, 4 days","recur":null,"long":"Friday, 0:00:00 - ","longcombined":"Friday, 0:00:00 - Goteborg\\, Sweden\\, April 2017, 4 days"},{"summary":"Drop-off Parking: Edinburgh Airport Parking","dtstart":"2017-04-14T08:30:00.000Z","dtend":"2017-04-14T09:30:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"9:30:00","timeEnd":"10:30:00","duration":"1 hour","combined":"9:30:00 - 'Drop-off Parking: Edinburgh Airport Parking, 1 hour","recur":null,"long":"Friday, 9:30:00 - ","longcombined":"Friday, 9:30:00 - Drop-off Parking: Edinburgh Airport Parking, 1 hour"},{"summary":"Check-in: Hotel Riverside","dtstart":"2017-04-14T13:00:00.000Z","dtend":"2017-04-14T14:00:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"14:00:00","timeEnd":"15:00:00","duration":"1 hour","combined":"14:00:00 - 'Check-in: Hotel Riverside, 1 hour","recur":null,"long":"Friday, 14:00:00 - ","longcombined":"Friday, 14:00:00 - Check-in: Hotel Riverside, 1 hour"},{"summary":"Pick-up Rental Car: Hertz","dtstart":"2017-04-14T15:00:00.000Z","dtend":"2017-04-14T16:00:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"16:00:00","timeEnd":"17:00:00","duration":"1 hour","combined":"16:00:00 - 'Pick-up Rental Car: Hertz, 1 hour","recur":null,"long":"Friday, 16:00:00 - ","longcombined":"Friday, 16:00:00 - Pick-up Rental Car: Hertz, 1 hour"}]},"swedish":{"xml":{"$":{"xmlns:wotd":"http://www.transparent.com/word-of-the-day/"},"words":{"date":"04-10-2017","langname":"Swedish","wordtype":"noun","word":"(ett) däggdjur","wordsound":"http://wotd.transparent.com/swedish/level-1/sound/00405_WOTD_Swedish_Words.mp3","translation":"mammal","fnphrase":"Valar och delfiner är däggdjur.","phrasesound":"http://wotd.transparent.com/swedish/level-1/sound/00405_WOTD_Swedish_Sentences.mp3","enphrase":"Whales and dolphins are mammals.","wotd:transliteratedWord":"","wotd:transliteratedSentence":"","notes":""}}},"fitbit":{},"ftse":[{"name":"BHP Billiton Plc","price":"1,352.25","change_amount":"+64.50","change_percent":"+5.01%"},{"name":"Hikma Pharmaceuticals","price":"1,921.50","change_amount":"+38.00","change_percent":"+2.02%"},{"name":"International Consolidated Airlines Group SA","price":"532.75","change_amount":"+9.50","change_percent":"+1.81%"},{"name":"Rio Tinto Plc","price":"3,308.75","change_amount":"+53.50","change_percent":"+1.64%"},{"name":"Associated British Foods Plc","price":"2,526.00","change_amount":"+40.00","change_percent":"+1.61%"},{"name":"Marks & Spencer Group Plc","price":"341.50","change_amount":"+4.60","change_percent":"+1.37%"},{"name":"Anglo American","price":"1,252.25","change_amount":"+16.50","change_percent":"+1.34%"},{"name":"easyJet Plc","price":"1,055.50","change_amount":"+13.00","change_percent":"+1.25%"},{"name":"St James's Place Plc","price":"1,042.50","change_amount":"+12.00","change_percent":"+1.17%"},{"name":"Glencore Plc","price":"324.65","change_amount":"+3.55","change_percent":"+1.11%"}],"quotes":{"quote":"Political correctness is tyranny with manners.","author":"Charlton Heston","category":"Famous"}},"expire":3600000,"date":{"year":2017,"month":4,"day":10}} +{"last":1492506285344,"data":{"trains":{"last":"2017-04-18T09:02:27.613Z","data":[]},"weather":{"currently":"Mostly Cloudy. Around 0 to 11 degrees.","today":"Light rain starting in the evening.","later":"Mixed precipitation throughout the week, with temperatures falling to 7°C on Tuesday.","alerts":{},"data":{"latitude":55.95,"longitude":-4.566667,"timezone":"Europe/London","offset":1,"currently":{"time":1492506147,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","nearestStormDistance":6,"nearestStormBearing":227,"precipIntensity":0,"precipProbability":0,"temperature":5.57,"apparentTemperature":3.85,"dewPoint":0.47,"humidity":0.7,"windSpeed":4.91,"windBearing":83,"visibility":7.96,"cloudCover":0.78,"pressure":1033.48,"ozone":327.78},"minutely":{"summary":"Mostly cloudy for the hour.","icon":"partly-cloudy-day","data":[{"time":1492506120,"precipIntensity":0,"precipProbability":0},{"time":1492506180,"precipIntensity":0,"precipProbability":0},{"time":1492506240,"precipIntensity":0,"precipProbability":0},{"time":1492506300,"precipIntensity":0,"precipProbability":0},{"time":1492506360,"precipIntensity":0,"precipProbability":0},{"time":1492506420,"precipIntensity":0,"precipProbability":0},{"time":1492506480,"precipIntensity":0,"precipProbability":0},{"time":1492506540,"precipIntensity":0,"precipProbability":0},{"time":1492506600,"precipIntensity":0,"precipProbability":0},{"time":1492506660,"precipIntensity":0,"precipProbability":0},{"time":1492506720,"precipIntensity":0,"precipProbability":0},{"time":1492506780,"precipIntensity":0,"precipProbability":0},{"time":1492506840,"precipIntensity":0,"precipProbability":0},{"time":1492506900,"precipIntensity":0,"precipProbability":0},{"time":1492506960,"precipIntensity":0,"precipProbability":0},{"time":1492507020,"precipIntensity":0,"precipProbability":0},{"time":1492507080,"precipIntensity":0,"precipProbability":0},{"time":1492507140,"precipIntensity":0,"precipProbability":0},{"time":1492507200,"precipIntensity":0,"precipProbability":0},{"time":1492507260,"precipIntensity":0,"precipProbability":0},{"time":1492507320,"precipIntensity":0,"precipProbability":0},{"time":1492507380,"precipIntensity":0,"precipProbability":0},{"time":1492507440,"precipIntensity":0,"precipProbability":0},{"time":1492507500,"precipIntensity":0,"precipProbability":0},{"time":1492507560,"precipIntensity":0,"precipProbability":0},{"time":1492507620,"precipIntensity":0,"precipProbability":0},{"time":1492507680,"precipIntensity":0,"precipProbability":0},{"time":1492507740,"precipIntensity":0,"precipProbability":0},{"time":1492507800,"precipIntensity":0,"precipProbability":0},{"time":1492507860,"precipIntensity":0,"precipProbability":0},{"time":1492507920,"precipIntensity":0,"precipProbability":0},{"time":1492507980,"precipIntensity":0,"precipProbability":0},{"time":1492508040,"precipIntensity":0,"precipProbability":0},{"time":1492508100,"precipIntensity":0,"precipProbability":0},{"time":1492508160,"precipIntensity":0,"precipProbability":0},{"time":1492508220,"precipIntensity":0,"precipProbability":0},{"time":1492508280,"precipIntensity":0,"precipProbability":0},{"time":1492508340,"precipIntensity":0,"precipProbability":0},{"time":1492508400,"precipIntensity":0,"precipProbability":0},{"time":1492508460,"precipIntensity":0,"precipProbability":0},{"time":1492508520,"precipIntensity":0,"precipProbability":0},{"time":1492508580,"precipIntensity":0,"precipProbability":0},{"time":1492508640,"precipIntensity":0,"precipProbability":0},{"time":1492508700,"precipIntensity":0,"precipProbability":0},{"time":1492508760,"precipIntensity":0,"precipProbability":0},{"time":1492508820,"precipIntensity":0,"precipProbability":0},{"time":1492508880,"precipIntensity":0,"precipProbability":0},{"time":1492508940,"precipIntensity":0,"precipProbability":0},{"time":1492509000,"precipIntensity":0,"precipProbability":0},{"time":1492509060,"precipIntensity":0,"precipProbability":0},{"time":1492509120,"precipIntensity":0,"precipProbability":0},{"time":1492509180,"precipIntensity":0,"precipProbability":0},{"time":1492509240,"precipIntensity":0,"precipProbability":0},{"time":1492509300,"precipIntensity":0,"precipProbability":0},{"time":1492509360,"precipIntensity":0,"precipProbability":0},{"time":1492509420,"precipIntensity":0,"precipProbability":0},{"time":1492509480,"precipIntensity":0,"precipProbability":0},{"time":1492509540,"precipIntensity":0,"precipProbability":0},{"time":1492509600,"precipIntensity":0,"precipProbability":0},{"time":1492509660,"precipIntensity":0,"precipProbability":0},{"time":1492509720,"precipIntensity":0,"precipProbability":0}]},"hourly":{"summary":"Light rain starting this evening.","icon":"rain","data":[{"time":1492506000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":5.57,"apparentTemperature":3.86,"dewPoint":0.51,"humidity":0.7,"windSpeed":4.9,"windBearing":82,"visibility":7.87,"cloudCover":0.78,"pressure":1033.48,"ozone":327.78},{"time":1492509600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":6.63,"apparentTemperature":4.89,"dewPoint":0.39,"humidity":0.64,"windSpeed":5.4,"windBearing":95,"visibility":10,"cloudCover":0.79,"pressure":1033.55,"ozone":327.75},{"time":1492513200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":7.75,"apparentTemperature":6.03,"dewPoint":0.85,"humidity":0.62,"windSpeed":6,"windBearing":109,"visibility":10,"cloudCover":0.78,"pressure":1033.53,"ozone":327.36},{"time":1492516800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":8.82,"apparentTemperature":7.12,"dewPoint":1.35,"humidity":0.59,"windSpeed":6.61,"windBearing":119,"visibility":10,"cloudCover":0.78,"pressure":1033.5,"ozone":326.54},{"time":1492520400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":10.03,"apparentTemperature":10.03,"dewPoint":2.26,"humidity":0.58,"windSpeed":6.61,"windBearing":125,"visibility":10,"cloudCover":0.79,"pressure":1033.43,"ozone":325.15},{"time":1492524000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":11.04,"apparentTemperature":11.04,"dewPoint":3.12,"humidity":0.58,"windSpeed":6.42,"windBearing":128,"visibility":10,"cloudCover":0.79,"pressure":1033.33,"ozone":323.34},{"time":1492527600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":11.69,"apparentTemperature":11.69,"dewPoint":3.62,"humidity":0.58,"windSpeed":6.15,"windBearing":134,"visibility":10,"cloudCover":0.8,"pressure":1033.26,"ozone":321.51},{"time":1492531200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0254,"precipProbability":0.01,"precipType":"rain","temperature":10.96,"apparentTemperature":10.96,"dewPoint":3.44,"humidity":0.6,"windSpeed":6.05,"windBearing":132,"visibility":10,"cloudCover":0.8,"pressure":1033.25,"ozone":319.61},{"time":1492534800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0991,"precipProbability":0.15,"precipType":"rain","temperature":9.96,"apparentTemperature":8.62,"dewPoint":3.29,"humidity":0.63,"windSpeed":6.11,"windBearing":132,"visibility":10,"cloudCover":0.8,"pressure":1033.27,"ozone":317.7},{"time":1492538400,"summary":"Light Rain","icon":"rain","precipIntensity":0.2769,"precipProbability":0.52,"precipType":"rain","temperature":8.92,"apparentTemperature":7.39,"dewPoint":3.16,"humidity":0.67,"windSpeed":6.1,"windBearing":130,"visibility":10,"cloudCover":0.8,"pressure":1033.35,"ozone":316.37},{"time":1492542000,"summary":"Drizzle","icon":"rain","precipIntensity":0.1422,"precipProbability":0.25,"precipType":"rain","temperature":8.09,"apparentTemperature":6.36,"dewPoint":3.14,"humidity":0.71,"windSpeed":6.25,"windBearing":126,"visibility":10,"cloudCover":0.87,"pressure":1033.51,"ozone":316.01},{"time":1492545600,"summary":"Drizzle","icon":"rain","precipIntensity":0.1778,"precipProbability":0.34,"precipType":"rain","temperature":7.41,"apparentTemperature":5.48,"dewPoint":3.23,"humidity":0.75,"windSpeed":6.41,"windBearing":122,"visibility":10,"cloudCover":0.93,"pressure":1033.7,"ozone":316.23},{"time":1492549200,"summary":"Drizzle","icon":"rain","precipIntensity":0.1422,"precipProbability":0.25,"precipType":"rain","temperature":6.94,"apparentTemperature":4.89,"dewPoint":3.33,"humidity":0.78,"windSpeed":6.54,"windBearing":119,"visibility":10,"cloudCover":1,"pressure":1033.8,"ozone":316.44},{"time":1492552800,"summary":"Drizzle","icon":"rain","precipIntensity":0.1753,"precipProbability":0.33,"precipType":"rain","temperature":6.84,"apparentTemperature":4.66,"dewPoint":3.33,"humidity":0.78,"windSpeed":6.91,"windBearing":121,"visibility":10,"cloudCover":1,"pressure":1033.75,"ozone":316.55},{"time":1492556400,"summary":"Overcast","icon":"cloudy","precipIntensity":0.094,"precipProbability":0.13,"precipType":"rain","temperature":6.87,"apparentTemperature":4.58,"dewPoint":3.5,"humidity":0.79,"windSpeed":7.33,"windBearing":122,"visibility":10,"cloudCover":1,"pressure":1033.6,"ozone":316.64},{"time":1492560000,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0305,"precipProbability":0.02,"precipType":"rain","temperature":6.99,"apparentTemperature":4.69,"dewPoint":3.68,"humidity":0.79,"windSpeed":7.43,"windBearing":124,"visibility":10,"cloudCover":1,"pressure":1033.44,"ozone":316.4},{"time":1492563600,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0381,"precipProbability":0.03,"precipType":"rain","temperature":7.03,"apparentTemperature":4.71,"dewPoint":3.96,"humidity":0.81,"windSpeed":7.57,"windBearing":127,"visibility":10,"cloudCover":1,"pressure":1033.23,"ozone":315.6},{"time":1492567200,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0838,"precipProbability":0.11,"precipType":"rain","temperature":6.93,"apparentTemperature":4.64,"dewPoint":4.13,"humidity":0.82,"windSpeed":7.38,"windBearing":134,"visibility":10,"cloudCover":1,"pressure":1032.99,"ozone":314.46},{"time":1492570800,"summary":"Overcast","icon":"cloudy","precipIntensity":0.1219,"precipProbability":0.2,"precipType":"rain","temperature":6.79,"apparentTemperature":4.47,"dewPoint":4.32,"humidity":0.84,"windSpeed":7.37,"windBearing":140,"visibility":10,"cloudCover":1,"pressure":1032.8,"ozone":313.38},{"time":1492574400,"summary":"Overcast","icon":"cloudy","precipIntensity":0.1041,"precipProbability":0.16,"precipType":"rain","temperature":6.74,"apparentTemperature":4.43,"dewPoint":4.61,"humidity":0.86,"windSpeed":7.27,"windBearing":145,"visibility":10,"cloudCover":1,"pressure":1032.67,"ozone":312.46},{"time":1492578000,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0533,"precipProbability":0.05,"precipType":"rain","temperature":6.62,"apparentTemperature":4.32,"dewPoint":4.82,"humidity":0.88,"windSpeed":7.19,"windBearing":150,"visibility":10,"cloudCover":1,"pressure":1032.6,"ozone":311.59},{"time":1492581600,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0229,"precipProbability":0.01,"precipType":"rain","temperature":6.71,"apparentTemperature":4.46,"dewPoint":5.18,"humidity":0.9,"windSpeed":7.02,"windBearing":163,"visibility":10,"cloudCover":1,"pressure":1032.6,"ozone":310.81},{"time":1492585200,"summary":"Overcast","icon":"cloudy","precipIntensity":0.0508,"precipProbability":0.05,"precipType":"rain","temperature":7.22,"apparentTemperature":5.16,"dewPoint":5.82,"humidity":0.91,"windSpeed":6.73,"windBearing":172,"visibility":10,"cloudCover":0.98,"pressure":1032.68,"ozone":310.16},{"time":1492588800,"summary":"Overcast","icon":"cloudy","precipIntensity":0.1092,"precipProbability":0.17,"precipType":"rain","temperature":7.67,"apparentTemperature":5.75,"dewPoint":6.36,"humidity":0.91,"windSpeed":6.6,"windBearing":183,"visibility":10,"cloudCover":0.97,"pressure":1032.83,"ozone":309.59},{"time":1492592400,"summary":"Drizzle","icon":"rain","precipIntensity":0.1397,"precipProbability":0.24,"precipType":"rain","temperature":8.21,"apparentTemperature":6.38,"dewPoint":6.91,"humidity":0.92,"windSpeed":6.65,"windBearing":194,"visibility":9.56,"cloudCover":0.94,"pressure":1032.95,"ozone":308.98},{"time":1492596000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.1118,"precipProbability":0.17,"precipType":"rain","temperature":9.06,"apparentTemperature":7.46,"dewPoint":7.33,"humidity":0.89,"windSpeed":6.43,"windBearing":205,"visibility":10,"cloudCover":0.88,"pressure":1032.99,"ozone":308.25},{"time":1492599600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0.0584,"precipProbability":0.06,"precipType":"rain","temperature":10.12,"apparentTemperature":10.12,"dewPoint":7.88,"humidity":0.86,"windSpeed":6.64,"windBearing":216,"visibility":10,"cloudCover":0.82,"pressure":1033.01,"ozone":307.48},{"time":1492603200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":11.25,"apparentTemperature":11.25,"dewPoint":8.53,"humidity":0.83,"windSpeed":7.24,"windBearing":224,"visibility":10,"cloudCover":0.77,"pressure":1033.02,"ozone":306.82},{"time":1492606800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":12.11,"apparentTemperature":12.11,"dewPoint":9.19,"humidity":0.82,"windSpeed":7.85,"windBearing":228,"visibility":10,"cloudCover":0.75,"pressure":1033.06,"ozone":306.35},{"time":1492610400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":12.78,"apparentTemperature":12.78,"dewPoint":9.72,"humidity":0.82,"windSpeed":8.43,"windBearing":230,"visibility":10,"cloudCover":0.72,"pressure":1033.12,"ozone":305.99},{"time":1492614000,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":13.14,"apparentTemperature":13.14,"dewPoint":10.03,"humidity":0.81,"windSpeed":8.81,"windBearing":232,"visibility":10,"cloudCover":0.71,"pressure":1033.19,"ozone":305.57},{"time":1492617600,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":12.34,"apparentTemperature":12.34,"dewPoint":9.69,"humidity":0.84,"windSpeed":8.64,"windBearing":233,"visibility":10,"cloudCover":0.74,"pressure":1033.2,"ozone":304.97},{"time":1492621200,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":11.21,"apparentTemperature":11.21,"dewPoint":9.1,"humidity":0.87,"windSpeed":8.36,"windBearing":235,"visibility":10,"cloudCover":0.79,"pressure":1033.21,"ozone":304.31},{"time":1492624800,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":10.1,"apparentTemperature":10.1,"dewPoint":8.48,"humidity":0.9,"windSpeed":8.04,"windBearing":236,"visibility":10,"cloudCover":0.82,"pressure":1033.27,"ozone":303.84},{"time":1492628400,"summary":"Mostly Cloudy","icon":"partly-cloudy-day","precipIntensity":0,"precipProbability":0,"temperature":9.51,"apparentTemperature":7.66,"dewPoint":8.17,"humidity":0.91,"windSpeed":7.79,"windBearing":235,"visibility":10,"cloudCover":0.85,"pressure":1033.44,"ozone":303.71},{"time":1492632000,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":9.34,"apparentTemperature":7.53,"dewPoint":8.23,"humidity":0.93,"windSpeed":7.46,"windBearing":232,"visibility":10,"cloudCover":0.87,"pressure":1033.68,"ozone":303.77},{"time":1492635600,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":9.38,"apparentTemperature":7.63,"dewPoint":8.48,"humidity":0.94,"windSpeed":7.24,"windBearing":231,"visibility":8.74,"cloudCover":0.89,"pressure":1033.88,"ozone":303.87},{"time":1492639200,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":9.45,"apparentTemperature":7.75,"dewPoint":8.64,"humidity":0.95,"windSpeed":7.08,"windBearing":229,"visibility":8.53,"cloudCover":0.88,"pressure":1034,"ozone":303.91},{"time":1492642800,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":9.38,"apparentTemperature":7.71,"dewPoint":8.66,"humidity":0.95,"windSpeed":6.95,"windBearing":227,"visibility":8.26,"cloudCover":0.87,"pressure":1034.07,"ozone":304},{"time":1492646400,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0,"precipProbability":0,"temperature":9.17,"apparentTemperature":7.48,"dewPoint":8.53,"humidity":0.96,"windSpeed":6.86,"windBearing":225,"visibility":8.1,"cloudCover":0.86,"pressure":1034.07,"ozone":304.29},{"time":1492650000,"summary":"Mostly Cloudy","icon":"partly-cloudy-night","precipIntensity":0.1194,"precipProbability":0.19,"precipType":"rain","temperature":9.26,"apparentTemperature":7.57,"dewPoint":8.67,"humidity":0.96,"windSpeed":6.91,"windBearing":226,"visibility":8.16,"cloudCover":0.88,"pressure":1033.99,"ozone":304.82},{"time":1492653600,"summary":"Light Rain","icon":"rain","precipIntensity":0.2642,"precipProbability":0.51,"precipType":"rain","temperature":9.29,"apparentTemperature":7.58,"dewPoint":8.73,"humidity":0.96,"windSpeed":6.99,"windBearing":227,"visibility":8.33,"cloudCover":0.9,"pressure":1033.85,"ozone":305.55},{"time":1492657200,"summary":"Light Rain","icon":"rain","precipIntensity":0.3505,"precipProbability":0.55,"precipType":"rain","temperature":9.18,"apparentTemperature":7.42,"dewPoint":8.66,"humidity":0.97,"windSpeed":7.12,"windBearing":228,"visibility":8.44,"cloudCover":0.94,"pressure":1033.73,"ozone":306.63},{"time":1492660800,"summary":"Light Rain","icon":"rain","precipIntensity":0.3277,"precipProbability":0.54,"precipType":"rain","temperature":8.94,"apparentTemperature":7.11,"dewPoint":8.38,"humidity":0.96,"windSpeed":7.22,"windBearing":229,"visibility":8.61,"cloudCover":0.94,"pressure":1033.67,"ozone":308.43},{"time":1492664400,"summary":"Light Rain","icon":"rain","precipIntensity":0.2515,"precipProbability":0.5,"precipType":"rain","temperature":8.72,"apparentTemperature":6.8,"dewPoint":8.1,"humidity":0.96,"windSpeed":7.35,"windBearing":230,"visibility":8.73,"cloudCover":0.93,"pressure":1033.66,"ozone":310.57},{"time":1492668000,"summary":"Drizzle","icon":"rain","precipIntensity":0.1854,"precipProbability":0.36,"precipType":"rain","temperature":8.65,"apparentTemperature":6.68,"dewPoint":7.95,"humidity":0.95,"windSpeed":7.5,"windBearing":232,"visibility":8.84,"cloudCover":0.91,"pressure":1033.67,"ozone":312.07},{"time":1492671600,"summary":"Drizzle","icon":"rain","precipIntensity":0.1651,"precipProbability":0.31,"precipType":"rain","temperature":9.03,"apparentTemperature":7.07,"dewPoint":8.15,"humidity":0.94,"windSpeed":7.82,"windBearing":237,"visibility":8.98,"cloudCover":0.9,"pressure":1033.68,"ozone":312.31},{"time":1492675200,"summary":"Drizzle","icon":"rain","precipIntensity":0.1549,"precipProbability":0.28,"precipType":"rain","temperature":9.66,"apparentTemperature":7.73,"dewPoint":8.57,"humidity":0.93,"windSpeed":8.26,"windBearing":242,"visibility":9.11,"cloudCover":0.9,"pressure":1033.71,"ozone":311.91},{"time":1492678800,"summary":"Drizzle","icon":"rain","precipIntensity":0.1397,"precipProbability":0.24,"precipType":"rain","temperature":10.6,"apparentTemperature":10.6,"dewPoint":9.28,"humidity":0.92,"windSpeed":8.71,"windBearing":246,"visibility":9.25,"cloudCover":0.94,"pressure":1033.78,"ozone":311.77}]},"daily":{"summary":"Mixed precipitation throughout the week, with temperatures falling to 7°C on Tuesday.","icon":"rain","data":[{"time":1492470000,"summary":"Light rain starting in the evening.","icon":"rain","sunriseTime":1492491967,"sunsetTime":1492543872,"moonPhase":0.72,"precipIntensity":0.0432,"precipIntensityMax":0.2769,"precipIntensityMaxTime":1492538400,"precipProbability":0.52,"precipType":"rain","temperatureMin":-0.35,"temperatureMinTime":1492495200,"temperatureMax":11.69,"temperatureMaxTime":1492527600,"apparentTemperatureMin":-2.88,"apparentTemperatureMinTime":1492488000,"apparentTemperatureMax":11.69,"apparentTemperatureMaxTime":1492527600,"dewPoint":0.48,"humidity":0.7,"windSpeed":4.47,"windBearing":92,"visibility":10,"cloudCover":0.63,"pressure":1032.74,"ozone":322.76},{"time":1492556400,"summary":"Mostly cloudy throughout the day.","icon":"partly-cloudy-day","sunriseTime":1492578219,"sunsetTime":1492630395,"moonPhase":0.75,"precipIntensity":0.0457,"precipIntensityMax":0.1397,"precipIntensityMaxTime":1492592400,"precipProbability":0.24,"precipType":"rain","temperatureMin":6.62,"temperatureMinTime":1492578000,"temperatureMax":13.14,"temperatureMaxTime":1492614000,"apparentTemperatureMin":4.32,"apparentTemperatureMinTime":1492578000,"apparentTemperatureMax":13.14,"apparentTemperatureMaxTime":1492614000,"dewPoint":6.95,"humidity":0.87,"windSpeed":5.53,"windBearing":196,"visibility":10,"cloudCover":0.89,"pressure":1033.14,"ozone":308.7},{"time":1492642800,"summary":"Light rain in the morning and afternoon.","icon":"rain","sunriseTime":1492664472,"sunsetTime":1492716917,"moonPhase":0.79,"precipIntensity":0.1321,"precipIntensityMax":0.3505,"precipIntensityMaxTime":1492657200,"precipProbability":0.55,"precipType":"rain","temperatureMin":8.65,"temperatureMinTime":1492668000,"temperatureMax":13.04,"temperatureMaxTime":1492689600,"apparentTemperatureMin":6.68,"apparentTemperatureMinTime":1492668000,"apparentTemperatureMax":13.04,"apparentTemperatureMaxTime":1492689600,"dewPoint":9.18,"humidity":0.92,"windSpeed":8.63,"windBearing":243,"visibility":9.03,"cloudCover":0.88,"pressure":1033.69,"ozone":313.79},{"time":1492729200,"summary":"Light rain until afternoon.","icon":"rain","sunriseTime":1492750726,"sunsetTime":1492803440,"moonPhase":0.82,"precipIntensity":0.0914,"precipIntensityMax":0.4293,"precipIntensityMaxTime":1492776000,"precipProbability":0.58,"precipType":"rain","temperatureMin":6.56,"temperatureMinTime":1492812000,"temperatureMax":11.57,"temperatureMaxTime":1492776000,"apparentTemperatureMin":3.77,"apparentTemperatureMinTime":1492812000,"apparentTemperatureMax":11.57,"apparentTemperatureMaxTime":1492776000,"dewPoint":6.4,"humidity":0.83,"windSpeed":11.17,"windBearing":278,"visibility":10,"cloudCover":0.85,"pressure":1032.24,"ozone":323.98},{"time":1492815600,"summary":"Mostly cloudy throughout the day.","icon":"partly-cloudy-day","sunriseTime":1492836981,"sunsetTime":1492889962,"moonPhase":0.85,"precipIntensity":0.0229,"precipIntensityMax":0.0432,"precipIntensityMaxTime":1492855200,"precipProbability":0.04,"precipType":"rain","temperatureMin":2.28,"temperatureMinTime":1492898400,"temperatureMax":10.3,"temperatureMaxTime":1492873200,"apparentTemperatureMin":-1.11,"apparentTemperatureMinTime":1492898400,"apparentTemperatureMax":10.3,"apparentTemperatureMaxTime":1492873200,"dewPoint":1.74,"humidity":0.71,"windSpeed":10.27,"windBearing":311,"visibility":10,"cloudCover":0.61,"pressure":1031.1,"ozone":338.4},{"time":1492902000,"summary":"Partly cloudy throughout the day.","icon":"partly-cloudy-day","sunriseTime":1492923237,"sunsetTime":1492976485,"moonPhase":0.89,"precipIntensity":0.0203,"precipIntensityMax":0.033,"precipIntensityMaxTime":1492966800,"precipProbability":0.02,"precipType":"rain","temperatureMin":0.31,"temperatureMinTime":1492909200,"temperatureMax":11.21,"temperatureMaxTime":1492959600,"apparentTemperatureMin":-2.41,"apparentTemperatureMinTime":1492909200,"apparentTemperatureMax":11.21,"apparentTemperatureMaxTime":1492959600,"dewPoint":2.39,"humidity":0.81,"windSpeed":6.68,"windBearing":273,"visibility":10,"cloudCover":0.44,"pressure":1026.69,"ozone":338.67},{"time":1492988400,"summary":"Drizzle in the afternoon.","icon":"rain","sunriseTime":1493009493,"sunsetTime":1493063007,"moonPhase":0.92,"precipIntensity":0.066,"precipIntensityMax":0.1651,"precipIntensityMaxTime":1493035200,"precipProbability":0.3,"precipType":"rain","temperatureMin":0.69,"temperatureMinTime":1493071200,"temperatureMax":9.51,"temperatureMaxTime":1493046000,"apparentTemperatureMin":-3.87,"apparentTemperatureMinTime":1493071200,"apparentTemperatureMax":5.97,"apparentTemperatureMaxTime":1493046000,"dewPoint":1.82,"humidity":0.79,"windSpeed":11.57,"windBearing":283,"cloudCover":0.6,"pressure":1016.87,"ozone":361.18},{"time":1493074800,"summary":"Breezy in the morning and flurries in the evening.","icon":"snow","sunriseTime":1493095751,"sunsetTime":1493149530,"moonPhase":0.96,"precipIntensity":0.033,"precipIntensityMax":0.0737,"precipIntensityMaxTime":1493139600,"precipProbability":0.09,"precipType":"snow","precipAccumulation":0.597,"temperatureMin":-0.54,"temperatureMinTime":1493157600,"temperatureMax":7.12,"temperatureMaxTime":1493128800,"apparentTemperatureMin":-5.37,"apparentTemperatureMinTime":1493157600,"apparentTemperatureMax":2.69,"apparentTemperatureMaxTime":1493128800,"dewPoint":-2.13,"humidity":0.69,"windSpeed":15.02,"windBearing":324,"cloudCover":0.2,"pressure":1018.71,"ozone":397.15}]},"flags":{"sources":["datapoint","gfs","cmc","nam","rap","sref","fnmoc","isd","madis","nearest-precip","metwarn","darksky"],"datapoint-stations":["uk-301777","uk-3134","uk-322052","uk-322595","uk-322659","uk-350056","uk-351269","uk-351289","uk-351397","uk-351465","uk-352102","uk-352379","uk-352954","uk-354999","uk-371524","uk-371606"],"isd-stations":["031070-99999","031160-99999","031200-99999","031290-99999","031330-99999","031340-99999","031350-99999","031360-99999","031380-99999","031390-99999","031400-99999","031430-99999","031450-99999","031480-99999","031490-99999","031520-99999"],"madis-stations":["AU945","C9560","C9739","D4018","E0915","E3381","EGPF","EGPK"],"units":"uk2"}}},"history":["On this day in 1914, Harbourne Stephen, the Scottish World War II fighter pilot, was born.","Stephen was a Battle of Britain fighter ace who went on to forge a career for himself as a newspaper executive. On his way to a tally of 23 registered kills (though it was almost certainly higher) he shot down five enemy aircraft in a single day in August 1940. That December he became the first airman to be awarded a DSO in the field. Returning after the war to the field of newspapers, in which he had been a junior before he was called up in 1939, Stephen worked successively for the Beaverbrook press and for \"Thomson Newspapers\" before becoming managing director of The Daily Telegraph and The Sunday Telegraph in 1963.","On 18 April 1937, Sir Edward \"Teddy\" Taylor, the Scottish Conservative politician, was born. MP for Rochford and Southend since 1997, Taylor is a noted Euro-sceptic, who resigned from his government post in 1971, protesting against Britain joining the EEC.","Newspapers report that IBM had become the first computer manufacturer to use a megabit chip -- a memory chip capable of storing 1 million bits of information -- in a commercial product, its Model 3090. The announcement is heralded as a notable triumph for American computer makers, whose work had been perceived as having fallen behind that of the Japanese electronics industry."],"today":"Tuesday April 18, 2017 - The 107th day of 2017, and there are 257 days until the end of the year","tv":{"entries":[{"summary":"2 Broke Girls 6x22 - And 2 Broke Girls: The Movie","dtstart":"2017-04-18T01:30:00.000Z","dtend":"2017-04-18T02:00:00.000Z","description":"As the big premiere of the film about Caroline's life arrives\\,","timeStart":"2:30:00","timeEnd":"3:00:00","duration":"30 minutes","combined":"2:30:00 - '2 Broke Girls 6x22 - And 2 Broke Girls: The Movie, 30 minutes","recur":null,"long":"Tuesday, 2:30:00 - ","longcombined":"Tuesday, 2:30:00 - 2 Broke Girls 6x22 - And 2 Broke Girls: The Movie, 30 minutes"},{"summary":"Better Call Saul 3x2 - Witness","dtstart":"2017-04-18T02:00:00.000Z","dtend":"2017-04-18T03:00:00.000Z","description":"Jimmy and Kim hire an assistant\\; Mike seeks out a mysterious","timeStart":"3:00:00","timeEnd":"4:00:00","duration":"1 hour","combined":"3:00:00 - 'Better Call Saul 3x2 - Witness, 1 hour","recur":null,"long":"Tuesday, 3:00:00 - ","longcombined":"Tuesday, 3:00:00 - Better Call Saul 3x2 - Witness, 1 hour"}]},"cal":{"today":[{"summary":"Glasgow\\, United Kingdom\\, April 2017","dtstart":"2017-04-17T23:00:00.000Z","dtend":"2017-04-18T23:00:00.000Z","description":"Martin Donnelly is in Glasgow\\, United Kingdom from Apr 18\\, 2","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"1 day","combined":"0:00:00 - 'Glasgow\\, United Kingdom\\, April 2017, 1 day","recur":null,"long":"Tuesday, 0:00:00 - ","longcombined":"Tuesday, 0:00:00 - Glasgow\\, United Kingdom\\, April 2017, 1 day"},{"summary":"SCOTRAIL - Dumbarton East to Glasgow Queen Street","dtstart":"2017-04-18T06:28:00.000Z","dtend":"2017-04-18T07:04:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"7:28:00","timeEnd":"8:04:00","duration":"36 minutes","combined":"7:28:00 - 'SCOTRAIL - Dumbarton East to Glasgow Queen Street, 36 minutes","recur":null,"long":"Tuesday, 7:28:00 - ","longcombined":"Tuesday, 7:28:00 - SCOTRAIL - Dumbarton East to Glasgow Queen Street, 36 minutes"},{"summary":"SCOTRAIL - Glasgow Queen Street to Haymarket (Edinburgh)","dtstart":"2017-04-18T07:15:00.000Z","dtend":"2017-04-18T08:04:00.000Z","description":"View and/or edit details in TripIt : https://www.tripit.com/tr","timeStart":"8:15:00","timeEnd":"9:04:00","duration":"49 minutes","combined":"8:15:00 - 'SCOTRAIL - Glasgow Queen Street to Haymarket (Edinburgh), 49 minutes","recur":null,"long":"Tuesday, 8:15:00 - ","longcombined":"Tuesday, 8:15:00 - SCOTRAIL - Glasgow Queen Street to Haymarket (Edinburgh), 49 minutes"}],"tomorrow":[],"week":[{"summary":"Update Timesheet","dtstart":"2017-04-21T14:30:00.965Z","dtend":"2017-04-21T15:30:00.965Z","description":"Update the timesheet using https://outsauce.backofficeportal.co","timeStart":"15:30:00","timeEnd":"16:30:00","duration":"1 hour","combined":"15:30:00 - 'Update Timesheet, 1 hour","recur":"FREQ=WEEKLY;COUNT=15;BYDAY=FR","long":"Friday, 15:30:00 - ","longcombined":"Friday, 15:30:00 - Update Timesheet, 1 hour"},{"summary":"St. George's Day","dtstart":"2017-04-22T23:00:00.000Z","dtend":"2017-04-23T23:00:00.000Z","description":"","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"1 day","combined":"0:00:00 - 'St. George's Day, 1 day","recur":null,"long":"Sunday, 0:00:00 - ","longcombined":"Sunday, 0:00:00 - St. George's Day, 1 day"},{"summary":"St. George's Day-C (E)","dtstart":"2017-04-22T23:00:00.031Z","dtend":"2017-04-23T23:00:00.031Z","description":"\\n\\n","timeStart":"0:00:00","timeEnd":"0:00:00","duration":"1 day","combined":"0:00:00 - 'St. George's Day-C (E), 1 day","recur":"FREQ=YEARLY;BYMONTH=4;BYMONTHDAY=23","long":"Sunday, 0:00:00 - ","longcombined":"Sunday, 0:00:00 - St. George's Day-C (E), 1 day"}]},"swedish":{"xml":{"$":{"xmlns:wotd":"http://www.transparent.com/word-of-the-day/"},"words":{"date":"04-18-2017","langname":"Swedish","wordtype":"noun","word":"(ett) läsår","wordsound":"http://wotd.transparent.com/swedish/level-1/sound/00413_WOTD_Swedish_Words.mp3","translation":"school year","fnphrase":"Varje höst börjar ett nytt läsår.","phrasesound":"http://wotd.transparent.com/swedish/level-1/sound/00413_WOTD_Swedish_Sentences.mp3","enphrase":"Every fall, the school year begins anew.","wotd:transliteratedWord":"","wotd:transliteratedSentence":"","notes":""}}},"fitbit":{},"ftse":[{"name":"Standard Life Plc","price":"365.55","change_amount":"+10.15","change_percent":"+2.75%"},{"name":"Reckitt Benckiser Group Plc","price":"7,448.50","change_amount":"+100.00","change_percent":"+1.34%"},{"name":"Taylor Wimpey Plc","price":"196.45","change_amount":"+1.89","change_percent":"+0.96%"},{"name":"Legal & General Group Plc","price":"252.70","change_amount":"+1.10","change_percent":"+0.44%"},{"name":"Kingfisher","price":"328.25","change_amount":"+1.30","change_percent":"+0.40%"},{"name":"St James's Place Plc","price":"1,069.50","change_amount":"+4.00","change_percent":"+0.38%"},{"name":"Rolls Royce Holdings Plc","price":"830.25","change_amount":"+2.00","change_percent":"+0.24%"},{"name":"Paddy Power Betfair Plc","price":"8,535.00","change_amount":"+10.00","change_percent":"+0.12%"},{"name":"Old Mutual Plc","price":"195.10","change_amount":"+0.20","change_percent":"+0.10%"},{"name":"Next Plc","price":"4,196.00","change_amount":"+4.00","change_percent":"+0.10%"}],"quotes":{"quote":"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth.","author":"Umberto Eco","category":"Famous"}},"expire":3600000,"date":{"year":2017,"month":4,"day":18}} diff --git a/web-server.js b/web-server.js index b190a18..18d9ab2 100644 --- a/web-server.js +++ b/web-server.js @@ -35,7 +35,7 @@ today.setEmitter(busEmitter); // train = require('lib/train') /* ,submit = require('./routes/mongo/submit') */ -; + let fs = require('fs'); const config = require('./config/config.json'); @@ -148,7 +148,6 @@ const tfile = 'fb-token.json'; // -/* const fitbit = new Fitbit(config.fitbit); // In a browser, http://localhost:4000/fitbit to authorize a user for the first time. @@ -157,6 +156,24 @@ app.get('/fitbit', function(req, res) { res.redirect(fitbit.authorizeURL()); }); +app.get( '/fb-profile', function( req, res, next ) { + fitbit.request({ + uri: "https://api.fitbit.com/1/user/-/profile.json", + method: 'GET', + }, function( err, body, token ) { + if ( err ) return next( err ); + var profile = JSON.parse( body ); + // if token is not null, a refesh has happened and we need to persist the new token + if ( token ) + persist.write( tfile, token, function( err ) { + if ( err ) return next( err ); + res.send( '
' + JSON.stringify( profile, null, 2 ) + '' ); + }); + else + res.send( '
' + JSON.stringify( profile, null, 2 ) + '' ); + }); +}); + // Callback service parsing the authorization token and asking for the access token. This // endpoint is refered to in config.fitbit.authorization_uri.redirect_uri. See example // config below. @@ -180,6 +197,7 @@ app.get('/fitbit_auth_callback', function(req, res, next) { }); }); + jsonfile.readFile('./fb-token.json', function(err, obj) { if (err) { logger.error(err); @@ -187,7 +205,6 @@ jsonfile.readFile('./fb-token.json', function(err, obj) { fitbit.setToken(obj); } }); -*/ // });