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
月刊ライトニングトーク2014年8月号: MEAN 祭り資料
Search
pochi
August 29, 2014
Technology
4.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
月刊ライトニングトーク2014年8月号: MEAN 祭り資料
pochi
August 29, 2014
More Decks by pochi
See All by pochi
React Nativeで作ったアプリでRedux-Sagaを使ったので,その話 / TOM Internal Developer Session #7
pchw
0
2.2k
Expoで開発してアプリを公開して得られた知見 / RNM6
pchw
3
1.9k
Firebaseでラクラクリアルタイムアプリ
pchw
0
1.5k
MongoDB族のための組み込み軽量DB NeDB
pchw
0
1.5k
Synth - 東京Node学園2014
pchw
0
4.5k
RubyMotion 1.15で追加されたtest周りの話
pchw
1
3.2k
Other Decks in Technology
See All in Technology
サービス内で複数のOP・ASを連鎖させる(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
320
ブラウザで変わるID連携(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
320
atproto spaces概要
yamarten
0
110
信頼性はSREだけのものじゃない
hkawaras
0
220
全社に広がるMCPサーバーを、 どう安全に管理するか MCPass開発の舞台裏
mtpooh
2
140
Data Hubグループ 紹介資料
sansan33
PRO
0
3.2k
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
1
370
Digital Credentials API × OpenID4VP ブラウザ完結型本人確認の実装知見(OAuth/OIDC Numa (Immersion) Workshop 2026)
oidfj
PRO
0
300
Point Cloud as a Foreign Language for Multi-modal Large Language Model
takmin
0
140
hookで自作する Claude Code の「実況ボード」
shinyasaita
1
160
顧客の要望は2次情報である 〜アンテナを張るFDEの構造論〜
noriakioji
3
960
紙 to デジタル
ichien178
0
280
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
750
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.3k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
950
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.1k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
430
So, you think you're a good person
axbom
PRO
2
2.1k
Prompt Engineering for Job Search
mfonobong
0
420
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
310
WENDY [Excerpt]
tessaabrams
11
39k
Transcript
簡単おいしい Web APIのサクサク npm包み揚げ @pchw
https://otakumode.com/careers WANTS YOU
API?
RPC?
SOAP?
REST!
JSON!
JavaScript Object Notation
JavaScript?
None
MEAN祭り!
2min/10min
RESTful APIを 公開しておくと
Client Apps
None
Mashups
最近でいうと こんな企業も
None
None
4min/10min
How to use Web API?
None
Build npm module!
Publish npm module!
Presence!
None
Popular services
Fast
Useful
Good naming
Less bugs
6min/10min
簡単おいしい Web APIのサクサク npm包み揚げ
None
Endpoints
None
params
None
None
optional
None
Editor
superagent
yeoman generator-coffee-module
8min/10min
module.exports = class Uber Uber = require(‘uber’)
module.exports = class Uber! constructor: (@id,@pw)-> Uber = require ‘uber’!
uc = new Uber(‘ID’,’PASS’)! ちなみにUberはid/passの認証じゃないです
module.exports = class Uber! constructor: (@id,@pw)->! Products:->! unless @_products! @_products
= new Products(@id,@pw)! @_products Uber = require ‘uber’! uc = new Uber(‘ID’,’PASS’)! p = uc.Products()!
class Products! constructor: (@id,@pw)-> Uber = require ‘uber’! uc =
new Uber(‘ID’,’PASS’)! p = uc.Products()!
class Products! constructor: (@id,@pw)->! latitude:(@lat)->! longitude:(@long)-> p = uc.Products()! p!
.latitude(37.7860099)! .longitude(-122.4025387)
class Products! constructor:(@id,@pw)->! latitude:(@lat)->! longitude:(@long)->! end:(callback)-> p = uc.Products()! p!
.latitude(37.7860099)! .longitude(-122.4025387)! .end (json)->
end:(callback)->! r = require ‘superagent’! r.post(@API_URL)! .auth(@key, @pw)! .end (e,res)->
p = uc.Products()! p! .latitude(37.7860099)! .longitude(-122.4025387)! .end (json)->
Repeat each Endpoints
$ npm publish
こんなかんじで 作ったのが https://github.com/pchw/node-voicetext
Conclusion • 色んなWeb ServiceがRESTful API公開して る • npmモジュールを作って公開すると戦闘力が 上がる •
WEB APIのラッパーは楽に作れる • endpoint毎を塊にしてparamsをメソッドに すると見通しがいい
creative commons licensed (BY) flickr photo by Photonemotion: http://flickr.com/photos/photonemotion/ 9709101575
creative commons licensed (BY) flickr photo by Esparta: http://flickr.com/photos/esparta/1819946267 creative commons licensed (BY) flickr photo by takot: http://flickr.com/photos/takot/4804922749 creative commons licensed (BY) flickr photo by Didriks: http://flickr.com/photos/dinnerseries/6378990949 creative commons licensed (BY) flickr photo by phozographer: http://flickr.com/photos/phozographer/ 5430729956 creative commons licensed (BY) flickr photo by dominiqs: http://flickr.com/photos/dominiqs/331702231 creative commons licensed (BY) flickr photo by Yoshikazu TAKADA: http://flickr.com/photos/yoshikazut/ 14204212224 creative commons licensed (BY) flickr photo by Dmitry Baranovskiy: http://flickr.com/photos/dmitry-baranovskiy/ 2378867408 creative commons licensed (BY) flickr photo by MattsMacintosh: http://flickr.com/photos/ 48126477@N05/6300224891 creative commons licensed (BY) flickr photo by Daniel Dudek-Corrigan: http://flickr.com/photos/dansapples/ 14648967446 creative commons licensed (BY) flickr photo by Wonderlane: http://flickr.com/photos/wonderlane/3341694129 creative commons licensed (BY) flickr photo by soundman1024: http://flickr.com/photos/ soundman1024/2380346705 creative commons licensed (BY) flickr photo by rcbodden: http://flickr.com/photos/rcbodden/3905010862 creative commons licensed (BY) flickr photo by amalakar: http://flickr.com/photos/amalakar/8747066225 creative commons licensed (BY) flickr photo by sylvar: http://flickr.com/photos/sylvar/3175705552 creative commons licensed (BY) flickr photo by NatalieMaynor: http://flickr.com/photos/nataliemaynor/ 2988366432 creative commons licensed (BY) flickr photo by Sibe Kokke: http://flickr.com/photos/sibekokke/1117587017 creative commons licensed (BY) flickr photo by MiiiSH: http://flickr.com/photos/mishism/3138940743 creative commons licensed (BY) flickr photo by nyuhuhuu: http://flickr.com/photos/nyuhuhuu/4443886636 creative commons licensed (BY) flickr photo by missy & the universe: http://flickr.com/photos/missy-and-the-universe/ 3355237177 creative commons licensed (BY) flickr photo by SaminatorH: http://flickr.com/photos/saminatorh/6997247637 creative commons licensed (BY) flickr photo by Mark Coggins: http://flickr.com/photos/markcoggins/467412385 creative commons licensed (BY) flickr photo by juhansonin: http://flickr.com/photos/juhansonin/14366928947 creative commons licensed (BY) flickr photo by Lara604: http://flickr.com/photos/lara604/3164627888 creative commons licensed (BY) flickr photo by basheertome: http://flickr.com/photos/basheertome/6785217165 creative commons licensed (BY) flickr photo by Wonderlane: http://flickr.com/photos/wonderlane/8664125024 creative commons licensed (BY) flickr photo by Mel B.: http:// flickr.com/photos/42dreams/2452866650 creative commons licensed (BY) flickr photo by dbrekke: http://flickr.com/photos/dbrekke/521540644 Credits