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. View Slide

  2. View Slide

  3. View Slide

  4. View Slide

  5. View Slide

  6. View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. View Slide

  11. View Slide

  12. View Slide

  13. View Slide

  14. View Slide

  15. View Slide

  16. View Slide

  17. View Slide

  18. View Slide

  19. a hubot plugin is just a
    coffeescript file

    View Slide

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

    View Slide

  21. 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

    View Slide

  22. 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

    View Slide

  23. View Slide

  24. View Slide

  25. View Slide

  26. View Slide

  27. the ‘http’ method in ‘msg’
    starts composing an http request

    View Slide

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

    View Slide

  29. 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

    View Slide

  30. 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’!

    View Slide

  31. View Slide

  32. View Slide

  33. View Slide

  34. View Slide

  35. View Slide

  36. View Slide

  37. View Slide

  38. View Slide

  39. View Slide

  40. View Slide

  41. View Slide

  42. View Slide

  43. View Slide

  44. View Slide

  45. View Slide

  46. View Slide

  47. View Slide

  48. look! a copy of rms’ famous
    interjection speech!

    View Slide

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

    View Slide

  50. 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”

    View Slide

  51. View Slide

  52. View Slide

  53. View Slide

  54. View Slide

  55. View Slide