Project

galerts

0.02
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Ruby library to manage google alerts
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 2.7
 Project Readme

Galerts

Gem Version Build Status

Simple Ruby library that uses Mechanize to scrape Google Alerts from the google alerts webpage.

Features

  • List all alerts associated with account.
  • Create new alert for any google domain.
  • Update existing alert.
  • Delete an alert.
  • Find alerts by query, id, data_id, data_id_2, feed_url, domain, language, how_many, region, delivery.

Installation

gem install galerts

Example

require 'galerts'

manager = Galerts::Manager.new('example@gmail.com', 'password')

#   List alerts
alerts = manager.alerts
sample_alert = alerts.last

#   Create a new alert for on Google News Turkey in real time delivering alerts
#   via RSS
new_alert = manager.create("my keywords", {
  :frequency => Galerts::RT,
  :domain => 'com.tr',
  :language => "tr",
  :sources => [Galerts::NEWS],
  :how_many => Galerts::ALL_RESULTS,
  :region => "TR",
  :delivery => Galerts::RSS
  }
)

#   Update the query of this alert
sample_alert.query = "updated keyword"
manager.update(sample_alert)

#   Find examples
manager.find_by_query("keyword")
manager.find_by_delivery(Galerts::RSS)
manager.find({query: "keyword", delivery: Galerts::RSS})

#   Delete an alert
manager.delete(sample_alert)

Contribute

I need your contributions to make that work better!

License

This project licensed under MIT.