NAME

REST::Google::Apps::Provisioning - A Perl library to Google's RESTful Apps API

SYNOPSIS

use REST::Google::Apps::Provisioning

$google = REST::Google::Apps::Provisioning->new(
    domain   => 'company.com',
    username => 'admin',
    password => 'g00gl34pp5!'
);

$user->{'jsmith'} = $google->getUser( 'jsmith' );

DESCRIPTION

REST::Google::Apps::Provisioning provides a Perl interface to Google's RESTful Apps API.

This module is currently a work-in-progress. Please e-mail with problems, bug fixes, comments and complaints.

CONSTRUCTOR

new ( DOMAIN, AUTH )

Creates a new REST::Google::Apps::Provisioning object. A domain parameter is required.

Supplying authentication information to the constructor is optional , but needs to happen either here or with a call to the authenticate method.

Example

$google = REST::Google::Apps::Provisioning->new(
    domain   => 'company.com',
    username => 'admin',
    password => 'g00gl34pp5!'
);

METHODS

authenticate ( AUTH )

Authenticate a session.

Example

$google->authenticate(
    username => 'admin',
    password => 'g00gl34pp5!'
)
|| die "Could not authenticate";
createUser ( USER )

Example

$user->{'jsmith'} = $google->createUser(
    username   => 'jsmith',
    givenName  => 'Joseph',
    familyName => 'Smith',
    password   => 'j5m1thp455w0rd!'
)
|| die "Could not create user";
deleteUser ( USER )

Example

delete $user->{'jsmith'} if $google->deleteUser( 'jsmith' );
updateUser ( USER )

Example

$google->updateUser(
    username => 'jsmith',
    givenName => 'Joey'
)
|| die "Could not update user";
getUser ( USER )

Example

$user->{'jsmith'} = $google->getUser( 'jsmith' );
getAllUsers

Retrieve a list of all users. This can also be accomplished by calling the getUser method with no arguments.

getGroup ( GROUP )
getAllGroups
getNickname ( NICKNAME )
getAllNicknames

Retrieve a list of all nicknames. This can also be accomplished by calling the getNickname method with no arguments.

AUTHOR

Scott Schneider <sschneid@gmail.com>