Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
oEmbed と Text::Hatena
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yasuhiro Onishi
March 18, 2012
Programming
170
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
oEmbed と Text::Hatena
Yasuhiro Onishi
March 18, 2012
More Decks by Yasuhiro Onishi
See All by Yasuhiro Onishi
「手を動かした者だけが世界を変える」ソフトウェア開発だけではない開発者人生
onishi
18
20k
アニメから得た学びを発表会 in 関西 はてな スポンサーLT
onishi
1
96
大吉祥寺.pm 基調講演
onishi
4
10k
YAPC::Kyoto 2023 Keynote
onishi
3
11k
2016 Devsumi Kansai
onishi
3
1.6k
Hatena-Camp
onishi
2
4.7k
Hatena Blog for Engineer
onishi
2
3.2k
Hatena Blog Development Flow
onishi
34
38k
hatena-diary-blog-xss
onishi
5
1.2k
Other Decks in Programming
See All in Programming
The Rails Doctrine Decade
koic
2
570
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
4.8k
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
110
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
すこし踏み込む CancellationToken
htkym
2
1.7k
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
130
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
660
R8 の設定見直しでアプリサイズ削減
andpad
0
210
パスワード再設定メールのURLについて知っておこう
uyuki234
0
150
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
110
Featured
See All Featured
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
520
Being A Developer After 40
akosma
92
590k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
260
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
Unsuck your backbone
ammeep
672
58k
Mind Mapping
helmedeiros
1
400
Producing Creativity
orderedlist
PRO
348
41k
Thoughts on Productivity
jonyablonski
76
5.4k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Writing Fast Ruby
sferik
630
63k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Transcript
P&NCFEͱ5FYU)BUFOB JEPOJTIJ גࣜձࣾͯͳେ߁༟
ࣗݾհ wJEPOJTIJେ߁༟ wגࣜձࣾͯͳ wνʔϑΤϯδχΞ wͯͳμΠΞϦʔϒϩάσΟϨΫλʔ w%FWFM,:51SPG w5FYU)BUFOB wਖ਼نදݱ͚ͩͰԿͱ͔͠Α͏ͱ͗͢͠Δ
ಈըຒΊࠐΈ
ຒΊࠐΈλά
ͯͳه๏ [http://www.youtube.com/watch?v=XDB9-‐TUrzc0:movie]
ͦͷ࣮ wಈըαʔϏεຖʹݸผରԠ wਖ਼نදݱΓͩ͘͞Μ wαΠτͷมߋʹै͢Δͷ͍ͨΜ wNPWJFJNBHFTPVOE
P&NCFE w63-ຒΊࠐΈ༷ wࣸਅಈըίϯςϯπΛαʔυύʔ ςΟʹຒΊࠐΉͨΊͷ"1* wIUUQPFNCFEDPN
P&NCFETQFD w63-TDIFNF w"1*FOEQPJOU http://www.flickr.com/photos/* http://www.flickr.com/services/oembed/
P&NCFESFRVFTU wVSM wNBYXJEUI PQUJPOBM wNBYIFJHIU PQUJPOBM wGPSNBU PQUJPOBM +40/PS9.-
P&NCFESFTQPOTF { "version": "1.0",
"type": "photo", "width": 240, "height": 160, "title": "ZB8T0193", "url": "http://farm4.static.flickr.com/3123/2341623661_7c99f48bbf_m.jpg", "author_name": "Bees", "author_url": "http://www.flickr.com/photos/bees/", "provider_name": "Flickr", "provider_url": "http://www.flickr.com/" }
8FCP&NCFE IUUQTNFUBDQBOPSHNPEVMF8FCP&NCFE use Web::oEmbed; my $consumer = Web::oEmbed-‐>new({
format => 'json' }); $consumer-‐>register_provider({ url => 'http://*.flickr.com/*', api => 'http://www.flickr.com/services/oembed/', }); my $response = $consumer-‐>embed("http:// www.flickr.com/..."); print $response-‐>render; #=> <img />
P&NCFEQSPWJEFS
P&NCFEEJTDPWFSZ <link rel="alternate" type="application/json+oembed" href="http://flickr.com/services/oembed?url=...&format=json" title="..."
/> <link rel="alternate" type="text/xml+oembed" href="http://flickr.com/services/oembed?url=...&format=xml" title="..." />
5FYU)BUFOB&NCFE [http://www.youtube.com/watch?v=XDB9-‐TUrzc0:embed]
w8FCP&NCFEʹϓϩόΠμΛϓϦηοτ wFOEQPJOU"VUP%JTDPWFS 5FYU)BUFOB&NCFE
͍
ϦΫΤετͨ͘͠ͳ͍ <script src="https://gist.github.com/$GIST_ID.js"></script> <iframe width="420" height="315" src="http://www.youtube.com/embed/$VIDEO_ID"></iframe>
wఆٛࡁͷมΛਖ਼نදݱͰߦ͏ w8FCP&NCFEʹϓϩόΠμΛϓϦηοτ wFOEQPJOU"VUP%JTDPWFS 5FYU)BUFOB&NCFE
JOTUBHSBNషΕΜͷʁ
P&NCFEඇରԠαΠτ wࣸਅڞ༗αΠτͰP&NCFEରԠαΠ τগͳ͍ wP&NCFEʹରԠ͍ͯ͠ͳͯ͘ΞϨ ʹରԠ͍ͯ͠Δʂʂ
None
wఆٛࡁͷมΛਖ਼نදݱͰߦ͏ w8FCP&NCFEʹϓϩόΠμΛϓϦηοτ wFOEQPJOU"VUP%JTDPWFS wPHJNBHFΛऔಘͯ͠ը૾λάΛग़ྗ 5FYU)BUFOB&NCFE
5FYU)BUFOB&NCFE IUUQTHJUIVCDPNPOJTIJ5FYU)BUFOB&NCFE my $embed = Text::Hatena::Embed-‐>new; print $embed-‐>render($url);
·ͱΊ wP&NCFEΜΓ wΜΓϞδϡʔϧެ։͠·ͨ͠ʔ w&NCFEؚΜͩ5FYU)BUFOBϑϧηοτ ࠷৽൛Λࠓय़ϦϦʔε༧ఆ w͍ͭͰʹͯͳϒϩάਖ਼ࣜԽ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠