agents.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. jane_website_agent:
  2. type: Agents::WebsiteAgent
  3. user: jane
  4. events_count: 1
  5. schedule: "5pm"
  6. name: "ZKCD"
  7. guid: <%= SecureRandom.hex %>
  8. options: <%= {
  9. :url => "http://trailers.apple.com/trailers/home/rss/newtrailers.rss",
  10. :expected_update_period_in_days => 2,
  11. :mode => :on_change,
  12. :extract => {
  13. :title => {:css => "item title", :text => true},
  14. :url => {:css => "item link", :text => true}
  15. }
  16. }.to_json.inspect %>
  17. bob_website_agent:
  18. type: Agents::WebsiteAgent
  19. user: bob
  20. events_count: 1
  21. schedule: "midnight"
  22. name: "ZKCD"
  23. guid: <%= SecureRandom.hex %>
  24. options: <%= {
  25. :url => "http://xkcd.com",
  26. :expected_update_period_in_days => 2,
  27. :mode => :on_change,
  28. :extract => {
  29. :url => {:css => "#comic img", :attr => "src"},
  30. :title => {:css => "#comic img", :attr => "title"}
  31. }
  32. }.to_json.inspect %>
  33. bob_weather_agent:
  34. type: Agents::WeatherAgent
  35. user: bob
  36. schedule: "midnight"
  37. name: "SF Weather"
  38. guid: <%= SecureRandom.hex %>
  39. keep_events_for: 45
  40. options: <%= {
  41. :location => 94102,
  42. :lat => 37.779329,
  43. :lng => -122.41915,
  44. :api_key => 'test'
  45. }.to_json.inspect %>
  46. jane_weather_agent:
  47. type: Agents::WeatherAgent
  48. user: jane
  49. schedule: "midnight"
  50. name: "SF Weather"
  51. guid: <%= SecureRandom.hex %>
  52. keep_events_for: 30
  53. options: <%= {
  54. :location => 94103,
  55. :lat => 37.779329,
  56. :lng => -122.41915,
  57. :api_key => 'test'
  58. }.to_json.inspect %>
  59. jane_rain_notifier_agent:
  60. type: Agents::TriggerAgent
  61. user: jane
  62. name: "Jane's Rain Watcher"
  63. guid: <%= SecureRandom.hex %>
  64. options: <%= {
  65. :expected_receive_period_in_days => "2",
  66. :rules => [{
  67. :type => "regex",
  68. :value => "rain",
  69. :path => "conditions"
  70. }],
  71. :message => "Just so you know, it looks like '<conditions>' tomorrow in <location>"
  72. }.to_json.inspect %>
  73. bob_rain_notifier_agent:
  74. type: Agents::TriggerAgent
  75. user: bob
  76. name: "Bob's Rain Watcher"
  77. guid: <%= SecureRandom.hex %>
  78. options: <%= {
  79. :expected_receive_period_in_days => "2",
  80. :rules => [{
  81. :type => "regex",
  82. :value => "rain",
  83. :path => "conditions"
  84. }],
  85. :message => "Just so you know, it looks like '<conditions>' tomorrow in <location>"
  86. }.to_json.inspect %>
  87. bob_twitter_user_agent:
  88. type: Agents::TwitterUserAgent
  89. user: bob
  90. name: "Bob's Twitter User Watcher"
  91. guid: <%= SecureRandom.hex %>
  92. options: <%= {
  93. :username => "tectonic",
  94. :expected_update_period_in_days => "2",
  95. :consumer_key => "---",
  96. :consumer_secret => "---",
  97. :oauth_token => "---",
  98. :oauth_token_secret => "---"
  99. }.to_json.inspect %>
  100. bob_manual_event_agent:
  101. type: Agents::ManualEventAgent
  102. user: bob
  103. name: "Bob's event testing agent"
  104. guid: <%= SecureRandom.hex %>