Module: Galerts

Defined in:
lib/galerts.rb,
lib/galerts/alert.rb,
lib/galerts/manager.rb,
lib/galerts/version.rb,
lib/galerts/defaults.rb

Defined Under Namespace

Classes: Alert, Manager

Constant Summary collapse

VERSION =
'1.1.3'.freeze
DOMAIN =

Default alert value

'com'
AUTOMATIC =
''
LANGUAGE =
'en'
REGION =
'US'
ANYWHERE =
'anywhere'
CREATE_ALERT_URL =

URLs

'https://www.google.com/alerts/create?'
DELETE_ALERT_URL =
'https://www.google.com/alerts/delete?'
MODIFY_ALERT_URL =
'https://www.google.com/alerts/modify?'
GOOGLE_LOGIN_URL =
'https://accounts.google.com/ServiceLogin?'
GOOGLE_URL =
'https://www.google.com'
ALERTS_URL =
'https://www.google.com/alerts'
LOGIN_URL =
"#{GOOGLE_LOGIN_URL}service=alerts&continue=#{ALERTS_URL}"
ALERT_EXIST =

Google Return HTML Definitions

"[null,11,null,\"\"]"
ALERT_SOMETHING_WENT_WRONG =
"[null,7,null,\"\"]"
ALERT_NOT_EXIST =
"[null,5,null,\"\"]"
ALERT_LIMIT_EXCEEDED =
"[null,4,null,\"\"]"
BEST_RESULTS =

Google Value

'Only the best results'
ALL_RESULTS =
'All results'
HOW_MANY_TYPES =
{
  ALL_RESULTS  => 2,
  BEST_RESULTS => 3
}
RSS =
'rss'
EMAIL =
'email'
DELIVERY_TYPES =
{
  EMAIL => 1,
  RSS => 2
}
RT =
'As it happens'
DAILY =
'Once a day'
WEEKLY =
'Once a week'
FREQ_TYPES =
{
  RT => 1,
  DAILY => 2,
  WEEKLY => 3
}
BLOGS =
'Blogs'
NEWS =
'News'
WEB =
'Web'
VIDEOS =
'Videos'
BOOKS =
'Books'
DISCUSSIONS =
'Discussions'
SOURCES_TYPES =
{
  AUTOMATIC => 0,
  BLOGS => 1,
  NEWS => 2,
  WEB => 3,
  VIDEOS => 5,
  BOOKS => 6,
  DISCUSSIONS => 7
}