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

Intergalactic Javascript Robots from Outer Space

Intergalactic Javascript Robots from Outer Space

Vicent Martí

July 06, 2012
Tweet

More Decks by Vicent Martí

Other Decks in Programming

Transcript

  1. the plugin is initialized in the module’s main export a

    hubot plugin is just a coffeescript file
  2. the plugin is initialized in the module’s main export the

    ‘respond’ method takes a regex and a callback a hubot plugin is just a coffeescript file
  3. the plugin is initialized in the module’s main export the

    ‘respond’ method takes a regex and a callback the ‘send’ method in the message can be used to answer the query a hubot plugin is just a coffeescript file
  4. the ‘http’ method in ‘msg’ starts composing an http request

    chain it with ‘query’ to set the query parameters
  5. the ‘http’ method in ‘msg’ starts composing an http request

    chain it with ‘query’ to set the query parameters ...or with ‘header’ to set the headers for the request
  6. the ‘http’ method in ‘msg’ starts composing an http request

    chain it with ‘query’ to set the query parameters ...or with ‘header’ to set the headers for the request perform the request with ‘get’, ‘post’, ‘put’, ‘patch’ or ‘delete’!
  7. look! a copy of rms’ famous interjection speech! use ‘hear’

    instead of ‘respond’ to listen to all incoming chat messages
  8. look! a copy of rms’ famous interjection speech! use ‘hear’

    instead of ‘respond’ to listen to all incoming chat messages ...and then reply with the speech if somebody says “linux”