Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
お天気スマホアプリはもう要らない。かも。
Search
Chachamaru
January 15, 2016
0
37
お天気スマホアプリはもう要らない。かも。
東京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
79
Featured
See All Featured
Gamification - CAS2011
davidbonilla
81
5.4k
A Modern Web Designer's Workflow
chriscoyier
694
190k
4 Signs Your Business is Dying
shpigford
184
22k
A Tale of Four Properties
chriscoyier
160
23k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Typedesign – Prime Four
hannesfritz
42
2.7k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Code Review Best Practice
trishagee
69
18k
Making Projects Easy
brettharned
116
6.3k
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と連携 お天気スマホアプリはもう要らない。かも。