agents.yml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  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_disabled_website_agent:
  34. type: Agents::WebsiteAgent
  35. disabled: true
  36. user: bob
  37. events_count: 1
  38. schedule: "midnight"
  39. name: "Disabled Agent"
  40. guid: <%= SecureRandom.hex %>
  41. options: <%= {
  42. :url => "http://xkcd.com",
  43. :expected_update_period_in_days => 2,
  44. :mode => :on_change,
  45. :extract => {
  46. :url => {:css => "#comic img", :value => "@src"},
  47. :title => {:css => "#comic img", :value => "@title"}
  48. }
  49. }.to_json.inspect %>
  50. bob_weather_agent:
  51. type: Agents::WeatherAgent
  52. user: bob
  53. schedule: "midnight"
  54. name: "SF Weather"
  55. guid: <%= SecureRandom.hex %>
  56. keep_events_for: <%= 45.days %>
  57. options: <%= { :location => 94102, :lat => 37.779329, :lng => -122.41915, :api_key => 'test' }.to_json.inspect %>
  58. jane_weather_agent:
  59. type: Agents::WeatherAgent
  60. user: jane
  61. schedule: "midnight"
  62. name: "SF Weather"
  63. guid: <%= SecureRandom.hex %>
  64. keep_events_for: <%= 30.days %>
  65. options: <%= { :location => 94103, :lat => 37.779329, :lng => -122.41915, :api_key => 'test' }.to_json.inspect %>
  66. jane_rain_notifier_agent:
  67. type: Agents::TriggerAgent
  68. user: jane
  69. name: "Jane's Rain Watcher"
  70. guid: <%= SecureRandom.hex %>
  71. options: <%= {
  72. :expected_receive_period_in_days => "2",
  73. :rules => [{
  74. :type => "regex",
  75. :value => "rain",
  76. :path => "conditions"
  77. }],
  78. :message => "Just so you know, it looks like '{{conditions}}' tomorrow in {{location}}"
  79. }.to_json.inspect %>
  80. bob_rain_notifier_agent:
  81. type: Agents::TriggerAgent
  82. user: bob
  83. name: "Bob's Rain Watcher"
  84. guid: <%= SecureRandom.hex %>
  85. options: <%= {
  86. :expected_receive_period_in_days => "2",
  87. :rules => [{
  88. :type => "regex",
  89. :value => "rain",
  90. :path => "conditions"
  91. }],
  92. :message => "Just so you know, it looks like '{{conditions}}' tomorrow in {{location}}"
  93. }.to_json.inspect %>
  94. bob_twitter_user_agent:
  95. type: Agents::TwitterUserAgent
  96. user: bob
  97. name: "Bob's Twitter User Watcher"
  98. guid: <%= SecureRandom.hex %>
  99. options: <%= {
  100. :username => "tectonic",
  101. :expected_update_period_in_days => "2",
  102. :consumer_key => "---",
  103. :consumer_secret => "---",
  104. :oauth_token => "---",
  105. :oauth_token_secret => "---"
  106. }.to_json.inspect %>
  107. tectonic_twitter_user_agent:
  108. type: Agents::TwitterFavorites
  109. user: tectonic
  110. name: "tectonic's Twitter Favorites Watcher"
  111. guid: <%= SecureRandom.hex %>
  112. options: <%= {
  113. :username => "tectonic",
  114. :expected_update_period_in_days => "2",
  115. :consumer_key => "---",
  116. :consumer_secret => "---",
  117. :oauth_token => "---",
  118. :oauth_token_secret => "---"
  119. }.to_json.inspect %>
  120. bob_manual_event_agent:
  121. type: Agents::ManualEventAgent
  122. user: bob
  123. name: "Bob's event testing agent"
  124. guid: <%= SecureRandom.hex %>
  125. bob_basecamp_agent:
  126. type: Agents::BasecampAgent
  127. user: bob
  128. service: generic
  129. guid: <%= SecureRandom.hex %>
  130. jane_basecamp_agent:
  131. type: Agents::BasecampAgent
  132. user: jane
  133. service: generic
  134. guid: <%= SecureRandom.hex %>
  135. bob_data_output_agent:
  136. type: Agents::DataOutputAgent
  137. user: bob
  138. name: RSS Feed
  139. guid: <%= SecureRandom.hex %>
  140. options: <%= {
  141. expected_receive_period_in_days: 3,
  142. secrets: ['secret'],
  143. template: {
  144. title: 'unchanged',
  145. description: 'unchanged',
  146. item: {
  147. title: 'unchanged',
  148. description: 'unchanged',
  149. author: 'unchanged',
  150. link: 'http://example.com'
  151. }
  152. }
  153. }.to_json.inspect %>