Intergalactic Javascript Robots from Outer Space

Intergalactic Javascript Robots from Outer Space

6804f1775cb4babfcc3851298566fbce?s=128

Vicent Martí

July 06, 2012
Tweet

Transcript

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
  12. 12.
  13. 13.
  14. 14.
  15. 15.
  16. 16.
  17. 17.
  18. 18.
  19. 20.

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

    hubot plugin is just a coffeescript file
  20. 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
  21. 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
  22. 23.
  23. 24.
  24. 25.
  25. 26.
  26. 28.

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

    chain it with ‘query’ to set the query parameters
  27. 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
  28. 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’!
  29. 31.
  30. 32.
  31. 33.
  32. 34.
  33. 35.
  34. 36.
  35. 37.
  36. 38.
  37. 39.
  38. 40.
  39. 41.
  40. 42.
  41. 43.
  42. 44.
  43. 45.
  44. 46.
  45. 47.
  46. 49.

    look! a copy of rms’ famous interjection speech! use ‘hear’

    instead of ‘respond’ to listen to all incoming chat messages
  47. 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”
  48. 51.
  49. 52.
  50. 53.
  51. 54.
  52. 55.