Skip to content

jbousquie/AdminSDKProvisioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

AdminSDKProvisioning

Ruby high-level client library for Google Apps Provisioning

Requires google/api Ruby gem

This library provides high-level commands to manage Google Apps users, groups, and members.

Exemple :

require ('./AdminSDKProvisioning.rb')

include AdminSDKProvisioning
admin_email = "admin@mydomain.com"
sae = "123456789987456321@developer.gserviceaccount.com"
pkcs12_file = "keyfile.p12"
myapps = GApps.new(service_account_email: sae, admin_email: admin_email, pkcs12_file: pkcs12_file, domain: "mydomain.com")

# users
user = myapps.retrieve_user('foo@mydomain.com')
pp user

new_user = myapps.create_user( first_name: "zorro", family_name: "delavega", email: "zorro@mydomain.com", password: "tornado")

# groups
new_group = myapps.create_group(email: "sgt.garcia@mydomain.com", name: "Garcia", description: "Sergent Garcia Fan Club")
group = myapps.retrieve_group("sgt.garcia@mydomain.com")


# members
new_member = myapps.insert_group_member(group_email: "sgt.garcia@mydomain.com", email: "zorro@mydomain.com")
pp new_member

How to enable Google Apps Admin SDK for your domain (in french) : http://wiki.bousquie.fr/Home/activation-api-google-admin-sdk-pour-google-apps

Licence WTFPL

About

Ruby high-level client library for Google Apps Provisioning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages