Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
お天気スマホアプリはもう要らない。かも。
Search
Chachamaru
January 15, 2016
0
38
お天気スマホアプリはもう要らない。かも。
東京Node学園付属小学校 1時限目 ~Node.js入門者向けLT大会&交流会~
Chachamaru
January 15, 2016
Tweet
Share
More Decks by Chachamaru
See All by Chachamaru
色について色々と #001 - 色は認識するもの
chachmaru
0
130
おねだり企画 #1
chachmaru
0
81
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
0
22
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Thoughts on Productivity
jonyablonski
73
5k
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
310
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
30
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
A Soul's Torment
seathinner
1
2k
Abbi's Birthday
coloredviolet
0
3.7k
How to Talk to Developers About Accessibility
jct
1
84
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.1k
Side Projects
sachag
455
43k
Transcript
ちゃちゃまる 見習いデザインエンジニア 高校生 @chachmaru LIGブログの読者層を下げる
天気予報スマホアプリはもう遅い! (かも!)
None
Livedoor - Weather Hacks "forecasts" : [ { "dateLabel" :
"ࠓ", "telop" : "ͷͪಶ", "date" : "2015-01-15", "temperature" : { "min" : null, "max" : { "celsius" : "11", "fahrenheit" : "51.8" } }, "image" : { "width" : 50, "url" : "http://weather.livedoor.com/img/icon/5.gif", "title" : "ͷͪಶ", "height" : 31 } }
var http = require('http'); var url = 'http://weather.livedoor.com/forecast/webservice/json/v1? city=130010'; http.get(url,
function(res) { var body = ''; res.setEncoding('utf8'); res.on('data', function(data) { body += data; }); res.on('end', function(data) { console.log(JSON.parse(body).forecasts[0].telop); }) });
var url = 'http://weather.livedoor.com/forecast/webservice/json/v1?city=130010';
var weather = '';
http.get(url, function(res) {}
res.setEncoding('utf8');
res.on('data', function(data) {});
var body = ''; res.on('data', function(data) { body += data;
});
"forecasts" : [ { "dateLabel" : "ࠓ", "telop" : "ͷͪಶ",
"date" : "2015-01-15", "temperature" : { "min" : null, "max" : { "celsius" : "11", "fahrenheit" : "51.8" } }, "image" : { "width" : 50, "url" : "http://weather.livedoor.com/img/icon/5.gif", "title" : "ͷͪಶ", "height" : 31 } }
res.on('end', function(data) {}
res.on('end', function(data) { var weather_data = JSON.parse(body); forecasts = weather_data['forecasts'];
}
res.on('end', function(data) { var weather_data = JSON.parse(body); forecasts = weather_data['forecasts'];
for (index in forecasts) { forecast = forecasts[index]; if (forecast.dateLabel === 'ࠓ') { weather = forecast['telop']; console.log(weather); } } })
IoTと連携 お天気スマホアプリはもう要らない。かも。