Java Google Alerts API provides you with a lightweight library especially designed to help developers create, delete and update Google alerts within their applications.
Features
- Latest update on 15/09/2016 (Version 2) - UTC +08:00 - Singapore Time
- Supported Finance source
- Fixed: Region issue
- *Note: Please see the email that your Google Alert using
- (maybe the email alert is using uppercase or lowercase)
- So GAService("nnhiti@gmail.com", "pass") will different with GAService("NNHITI@gmail.com", "pass")
- ----------------------------------------------------------------------------------------------------------------------
- Required libraries
- No required library
- -
- // First of all, we have to login.. return empty string if login successful else return an error string
- GAService service = new GAService("yourEmail", "yourPassword");
- service.doLogin();
- // Get all alerts.
- List<Alert> lstAlert = service.getAlerts();
- // Get alert by deliver.
- List<Alert> lstAlert = service.getAlertByDelivery(DeliveryTo.FEED);
- // Get alert by id.
- Alert alert = service.getAlertById(alertId);
- // Get alert by search query.
- List<Alert> lstAlert = service.getAlerts("Your Query");
- // Create alert. return an alert id if created successful else return an error string
- // Default deliver is email
- Alert alert = new Alert();
- alert.setHowMany(HowMany.ONLY_THE_BEST_RESULTS);
- alert.setHowOften(HowOften.ONCE_A_DAY);
- alert.setSearchQuery("Your Query");
- alert.setDeliverTo(DeliverTo.FEED);
- alert = service.createAlert(alert);
- // Delete an alert.
- service.deleteAlert(alertId);
- // Delete list of alerts.
- List<String> lstAlertId = new ArrayList<String>();
- lstAlertId.add(alertId);
- service.deleteAlert(lstAlertId);
- // Update alert. return new alert id if updated successful else return an error string
- AlertBean alert = new AlertBean();
- alert.setId(editAlertId);
- alert.setSearchQuery("your new query");
- service.updateAlert(alert);
- Appreciate if you can send to me an email when you have any ideas or need to improve/update
- Ha Nguyen: nnhiti@gmail.com
- Thanks so much.
License
Creative Commons Attribution LicenseFollow Java Google Alerts API
Other Useful Business Software
One Monitoring Tool for IT, OT and Cloud | Free Trial
Modern infrastructure spans data centers, cloud platforms and factory floors, and every blind spot between them is a risk. PRTG supports SNMP, WMI, SSH and other standard protocols to monitor IT, OT and hybrid environments through one customizable dashboard. Build the views your team needs, from network health to application performance, without switching tools. Try PRTG free for 30 days now.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of Java Google Alerts API!