rgroups

Ruby API for accessing/updating Google Groups - based on Mechanize. This essentially just screen-scrapes Google Groups and automates clicking on things. It’s not entirely efficient, but it sure beats having to script it yourself.

Usage

Setup is easy!

require 'rgroups'
rg = RGroup.new
rg.('username', 'password')

Or, if you’re using Google Apps for your Domain (GAFYD):

rg = RGroup.new('mydomain.com')
rg.('username', 'password')

Adding a user to a group:

rg.add_user('[email protected]', 'group', :message => 'message to send to invitees')

Adding a user directly (only for GAFYD accounts):

rg.add_user('[email protected]', 'group', :mode => 'direct', :notify => true, :message => 'message to send to people', :delivery => 'digest')

Modifying a user’s delivery options:

rg.update_user('[email protected]', 'group', 'set_delivery', :value => 'summary')

Modifying a user’s membership type:

rg.update_user('[email protected]', 'group', 'set_member', :value => 'manager')

Notes

This relies on the ‘old style’ Google Groups. Please ensure that your group is using the old style before reporting a bug. Support for the new style should come soon…

Contributing to rgroups

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2012 Andrew Hayworth. See LICENSE.txt for further details.