GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WebService::GData::Constants(3) User Contributed Perl Documentation WebService::GData::Constants(3)

WebService::GData::Constants - constants (namespaces,format,services...) used for Google data APIs.

    #don't important anything
    use WebService::GData::Constants; 

    #import the namespace related constants
    use WebService::GData::Constants qw(:namespace); #or :format or :general or :all

    use WebService::GData::Base;
    use WebService::GData::ClientLogin;

    my $auth = new WebService::GData::ClientLogin(service=> BOOK_SERVICE,....);


    my $base = new WebService::GData::Base();
           $base->query()->alt(JSON);

    #if not imported
        
    $base->add_namespace(WebService::GData::Constants::MEDIA_NAMESPACE);
    $base->add_namespace(WebService::GData::Constants::ATOM_NAMESPACE);

    #if imported
        
    $base->add_namespace(MEDIA_NAMESPACE);
    $base->add_namespace(ATOM_NAMESPACE);

This package contains some constants for Google data API available protocol formats, namespaces and general matters (version,xml header). You can import all of them by using :all or import only a subset by using :format,:namespace or :general

The general constants map the google data API version number and the xml header. You can choose to import general related constants by writing use WebService::GData::Constants qw(:general);

GDATA_MINIMUM_VERSION

XML_HEADER

import with :general

The format constants map the available protocol format as of version 2 of the google data API. You can choose to import format related constants by writing use WebService::GData::Constants qw(:format);

JSON

JSONC

RSS

ATOM

import with :format

The namespace constants map the available namespace used as of version 2 of the google data API. You can choose to import namespace related constants by writing use WebService::GData::Constants qw(:namespace); The namespace follow the following format: xmlns:namespace_prefix="uri". In the Google Data protocol, the atom namespace is used as the default one, which means that it will be xmlns="uri". There is also an atomic version of each namespace via _PREFIX and _URI.

ATOM_NAMESPACE

ATOM_NAMESPACE_PREFIX

ATOM_NAMESPACE_URI

OPENSEARCH_NAMESPACE

OPENSEARCH_NAMESPACE_PREFIX

OPENSEARCH_NAMESPACE_URI

GDATA_NAMESPACE

GDATA_NAMESPACE_PREFIX

GDATA_NAMESPACE_URI

GEORSS_NAMESPACE

GEORSS_NAMESPACE_PREFIX

GEORSS_NAMESPACE_URI

GML_NAMESPACE

GML_NAMESPACE_PREFIX

GML_NAMESPACE_URI

MEDIA_NAMESPACE

MEDIA_NAMESPACE_PREFIX

MEDIA_NAMESPACE_URI

APP_NAMESPACE

APP_NAMESPACE_PREFIX

APP_NAMESPACE_URI

import with :namespace

The service constants map the available services used for the ClientLogin authentication system. Some of the service name does not map very well the API name, ie Picasa API has a service name of 'lh2'. The constants offer naming closer to the original API (PICASA_SERVICE). Not shorter but may be easier to remember. In case the service name came to change, you won't need to change it in every peace of code either. You can choose to import service related constants by writing use WebService::GData::Constants qw(:service);

ANALYTICS_SERVICE

APPS_SERVICE

BASE_SERVICE

SITES_SERVICE

BLOGGER_SERVICE

BOOK_SERVICE

CALENDAR_SERVICE

CODE_SERVICE

CONTACTS_SERVICE

DOCUMENTS_SERVICE

FINANCE_SERVICE

GMAIL_SERVICE

HEALTH_SERVICE

HEALTH_SB_SERVICE

MAPS_SERVICE

PICASA_SERVICE

SIDEWIKI_SERVICE

SPREADSHEETS_SERVICE

WEBMASTER_SERVICE

YOUTUBE_SERVICE

import with :service

The query constants map the possible values for query parameters of version 2 of the google data API. You can choose to import query related constants by writing use WebService::GData::Constants qw(:query);

TRUE

FALSE

import with :query

The http status constants map the possible values for a response code from version 2 of the google data API. You can choose to import http status related constants by writing use WebService::GData::Constants qw(:http_status);

OK

CREATED

NOT_MODIFIED

BAD_REQUEST

UNAUTHORIZED

FORBIDDEN

NOT_FOUND

CONFLICT

GONE

INTERNAL_SERVER_ERROR

import with :http_status

The error code constants map the possible values for an error response code from version 2 of the google data API. You can choose to import error code related constants by writing use WebService::GData::Constants qw(:errors);

BAD_AUTHENTICATION

NOT_VERIFIED

TERMS_NOT_AGREED

CAPTCHA_REQUIRED

UNKNOWN

ACCOUNT_DELETED

ACCOUNT_DISABLED

SERVICE_DISABLED

SERVICE_UNAVAILABLE

import with :errors

See also <http://code.google.com/intl/en/apis/accounts/docs/AuthForInstalledApps.html#Errors> for further informations about the errors meaning.

If you do me the favor to _use_ this module and find a bug, please email me i will try to do my best to fix it (patches welcome)!

shiriru <shirirulestheworld[arobas]gmail.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2010-11-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.