Upgrade to Pro — share decks privately, control downloads, hide ads and more …

月刊ライトニングトーク2014年8月号: MEAN 祭り資料

pochi
August 29, 2014

月刊ライトニングトーク2014年8月号: MEAN 祭り資料

pochi

August 29, 2014
Tweet

More Decks by pochi

Other Decks in Technology

Transcript

  1. module.exports = class Uber! constructor: (@id,@pw)-> Uber = require ‘uber’!

    uc = new Uber(‘ID’,’PASS’)! ちなみにUberはid/passの認証じゃないです
  2. 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()!
  3. class Products! constructor: (@id,@pw)-> Uber = require ‘uber’! uc =

    new Uber(‘ID’,’PASS’)! p = uc.Products()!
  4. 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)->
  5. Conclusion • 色んなWeb ServiceがRESTful API公開して る • npmモジュールを作って公開すると戦闘力が 上がる •

    WEB APIのラッパーは楽に作れる • endpoint毎を塊にしてparamsをメソッドに すると見通しがいい
  6. 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