agents.yml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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", :value => './/text()'},
  14. :url => {:css => "item link", :value => './/text()'}
  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", :value => "@src"},
  30. :title => {:css => "#comic img", :value => "@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: <%= { :location => 94102, :lat => 37.779329, :lng => -122.41915, :api_key => 'test' }.to_json.inspect %>
  41. jane_weather_agent:
  42. type: Agents::WeatherAgent
  43. user: jane
  44. schedule: "midnight"
  45. name: "SF Weather"
  46. guid: <%= SecureRandom.hex %>
  47. keep_events_for: 30
  48. options: <%= { :location => 94103, :lat => 37.779329, :lng => -122.41915, :api_key => 'test' }.to_json.inspect %>
  49. jane_rain_notifier_agent:
  50. type: Agents::TriggerAgent
  51. user: jane
  52. name: "Jane's Rain Watcher"
  53. guid: <%= SecureRandom.hex %>
  54. options: <%= {
  55. :expected_receive_period_in_days => "2",
  56. :rules => [{
  57. :type => "regex",
  58. :value => "rain",
  59. :path => "conditions"
  60. }],
  61. :message => "Just so you know, it looks like '{{conditions}}' tomorrow in {{location}}"
  62. }.to_json.inspect %>
  63. bob_rain_notifier_agent:
  64. type: Agents::TriggerAgent
  65. user: bob
  66. name: "Bob's Rain Watcher"
  67. guid: <%= SecureRandom.hex %>
  68. options: <%= {
  69. :expected_receive_period_in_days => "2",
  70. :rules => [{
  71. :type => "regex",
  72. :value => "rain",
  73. :path => "conditions"
  74. }],
  75. :message => "Just so you know, it looks like '{{conditions}}' tomorrow in {{location}}"
  76. }.to_json.inspect %>
  77. bob_twitter_user_agent:
  78. type: Agents::TwitterUserAgent
  79. user: bob
  80. name: "Bob's Twitter User Watcher"
  81. guid: <%= SecureRandom.hex %>
  82. options: <%= {
  83. :username => "tectonic",
  84. :expected_update_period_in_days => "2",
  85. :consumer_key => "---",
  86. :consumer_secret => "---",
  87. :oauth_token => "---",
  88. :oauth_token_secret => "---"
  89. }.to_json.inspect %>
  90. bob_manual_event_agent:
  91. type: Agents::ManualEventAgent
  92. user: bob
  93. name: "Bob's event testing agent"
  94. guid: <%= SecureRandom.hex %>
  95. bob_basecamp_agent:
  96. type: Agents::BasecampAgent
  97. user: bob
  98. service: generic
  99. guid: <%= SecureRandom.hex %>
  100. jane_basecamp_agent:
  101. type: Agents::BasecampAgent
  102. user: jane
  103. service: generic
  104. guid: <%= SecureRandom.hex %>