VUser::Google::ApiProtocol::V2_03pm
Implements version 2.0 of the google apis.
Sysnopsis
use VUser::Google::ApiProtocol::V2_0;## Create a new connectionmy $google = VUser::Google::ApiProtocol::V2_0->new(domain => 'your.google-apps-domain.com',admin => 'admin_user',password => 'admin_user password',);## Login to the Google Apps API# Login() uses the credentials provided in new()$google->Login();## Create a new request# Create the URL to send to API request to.# See the API docs for the valid URLsmy $url = "https://apps-apis.google.com/a/feeds/emailsettings/2.0/"$url .= "your.google-apps-domain.com/username/label";# Create XML message to send to Google# See the API docs for the valid XML to sendmy $xml = '<?xml version="1.0" encoding="utf-8"?>...';# NB: The method (POST here) may be different depending on API callmy $success = $google->Request('POST', $url, $xml);# Get the parsed responseif ($success) {# $result is the XML reply parsed by XML::Simplemy $result = $google->get_result;}else {# $result is the error message from google# parsed by XML::Simple with the addition of a# 'reason' key which contains the error.my $result = $google->get_result;die "Error: $result->{reason}";}
Overview
Implements version 2.0 of the Google API. See VUser::Google::ApiProtocol for a list of members and methods.
Releases
6 releases since Debian 8 (Jessie); the text changed 1 time.