line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::GData::Constants; |
2
|
44
|
|
|
44
|
|
152192
|
use strict; |
|
44
|
|
|
|
|
100
|
|
|
44
|
|
|
|
|
1602
|
|
3
|
44
|
|
|
44
|
|
338
|
use warnings; |
|
44
|
|
|
|
|
78
|
|
|
44
|
|
|
|
|
11034
|
|
4
|
|
|
|
|
|
|
our $VERSION = 1.06; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use constant { |
7
|
|
|
|
|
|
|
#general... |
8
|
44
|
|
|
|
|
42649
|
XML_HEADER => '', |
9
|
|
|
|
|
|
|
GDATA_MINIMUM_VERSION=> 2, |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
#QUERY |
12
|
|
|
|
|
|
|
TRUE =>'true', |
13
|
|
|
|
|
|
|
FALSE =>'false', |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
#URLS |
16
|
|
|
|
|
|
|
CLIENT_LOGIN_URL => 'https://www.google.com/accounts/ClientLogin', |
17
|
|
|
|
|
|
|
CAPTCHA_URL => 'http://www.google.com/accounts/', |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
#ClientLogin Errors |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
BAD_AUTHENTICATION => 'BadAuthentication', |
22
|
|
|
|
|
|
|
NOT_VERIFIED => 'NotVerified', |
23
|
|
|
|
|
|
|
TERMS_NOT_AGREED => 'TermsNotAgreed', |
24
|
|
|
|
|
|
|
CAPTCHA_REQUIRED => 'CaptchaRequired', |
25
|
|
|
|
|
|
|
UNKNOWN => 'Unknown', |
26
|
|
|
|
|
|
|
ACCOUNT_DELETED => 'AccountDeleted', |
27
|
|
|
|
|
|
|
ACCOUNT_DISABLED => 'AccountDisabled', |
28
|
|
|
|
|
|
|
SERVICE_DISABLED => 'ServiceDisabled', |
29
|
|
|
|
|
|
|
SERVICE_UNAVAILABLE=> 'ServiceUnavailable', |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
#SERVICES |
32
|
|
|
|
|
|
|
ANALYTICS_SERVICE => 'analytics', |
33
|
|
|
|
|
|
|
APPS_SERVICE => 'apps', |
34
|
|
|
|
|
|
|
BASE_SERVICE => 'gbase', |
35
|
|
|
|
|
|
|
SITES_SERVICE => 'jotspot', |
36
|
|
|
|
|
|
|
BLOGGER_SERVICE => 'blogger', |
37
|
|
|
|
|
|
|
BOOK_SERVICE => 'print', |
38
|
|
|
|
|
|
|
CALENDAR_SERVICE => 'cl', |
39
|
|
|
|
|
|
|
CODE_SERVICE => 'codesearch', |
40
|
|
|
|
|
|
|
CONTACTS_SERVICE => 'cp', |
41
|
|
|
|
|
|
|
DOCUMENTS_SERVICE => 'writely', |
42
|
|
|
|
|
|
|
FINANCE_SERVICE => 'finance', |
43
|
|
|
|
|
|
|
GMAIL_SERVICE => 'mail', |
44
|
|
|
|
|
|
|
HEALTH_SERVICE => 'health', |
45
|
|
|
|
|
|
|
HEALTH_SB_SERVICE => 'weaver', |
46
|
|
|
|
|
|
|
MAPS_SERVICE => 'local', |
47
|
|
|
|
|
|
|
PICASA_SERVICE => 'lh2', |
48
|
|
|
|
|
|
|
SIDEWIKI_SERVICE => 'annotateweb', |
49
|
|
|
|
|
|
|
SPREADSHEETS_SERVICE=> 'wise', |
50
|
|
|
|
|
|
|
WEBMASTER_SERVICE => 'sitemaps', |
51
|
|
|
|
|
|
|
YOUTUBE_SERVICE => 'youtube', |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
#FORMATS |
54
|
|
|
|
|
|
|
JSON => 'json', |
55
|
|
|
|
|
|
|
JSONC => 'jsonc', |
56
|
|
|
|
|
|
|
ATOM => 'atom', |
57
|
|
|
|
|
|
|
RSS => 'rss', |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
#HTTP STATUS |
60
|
|
|
|
|
|
|
OK =>'200 OK', |
61
|
|
|
|
|
|
|
CREATED =>'201 CREATED', |
62
|
|
|
|
|
|
|
NOT_MODIFIED =>'304 NOT MODIFIED', |
63
|
|
|
|
|
|
|
BAD_REQUEST =>'400 BAD REQUEST', |
64
|
|
|
|
|
|
|
UNAUTHORIZED =>'401 UNAUTHORIZED', |
65
|
|
|
|
|
|
|
FORBIDDEN =>'403 FORBIDDEN', |
66
|
|
|
|
|
|
|
NOT_FOUND =>'404 NOT FOUND', |
67
|
|
|
|
|
|
|
CONFLICT =>'409 CONFLICT', |
68
|
|
|
|
|
|
|
GONE =>'410 GONE', |
69
|
|
|
|
|
|
|
INTERNAL_SERVER_ERROR =>'500 INTERNAL SERVER ERROR', |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
#NAMESPACES |
72
|
|
|
|
|
|
|
ATOM_NAMESPACE => 'xmlns="http://www.w3.org/2005/Atom"', |
73
|
|
|
|
|
|
|
OPENSEARCH_NAMESPACE=> 'xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/"', |
74
|
|
|
|
|
|
|
GDATA_NAMESPACE => 'xmlns:gd="http://schemas.google.com/g/2005"', |
75
|
|
|
|
|
|
|
GEORSS_NAMESPACE => 'xmlns:georss="http://www.georss.org/georss"', |
76
|
|
|
|
|
|
|
GML_NAMESPACE => 'xmlns:gml="http://www.opengis.net/gml"', |
77
|
|
|
|
|
|
|
MEDIA_NAMESPACE => 'xmlns:media="http://search.yahoo.com/mrss/"', |
78
|
|
|
|
|
|
|
APP_NAMESPACE => 'xmlns:app="http://www.w3.org/2007/app"', |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
#NAMESPACES PREFIX |
81
|
|
|
|
|
|
|
ATOM_NAMESPACE_PREFIX => 'atom', |
82
|
|
|
|
|
|
|
OPENSEARCH_NAMESPACE_PREFIX => 'openSearch', |
83
|
|
|
|
|
|
|
GDATA_NAMESPACE_PREFIX => 'gd', |
84
|
|
|
|
|
|
|
GEORSS_NAMESPACE_PREFIX => 'georss', |
85
|
|
|
|
|
|
|
GML_NAMESPACE_PREFIX => 'gml', |
86
|
|
|
|
|
|
|
MEDIA_NAMESPACE_PREFIX => 'media', |
87
|
|
|
|
|
|
|
APP_NAMESPACE_PREFIX => 'app', |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
#NAMESPACES URI |
90
|
|
|
|
|
|
|
ATOM_NAMESPACE_URI => 'http://www.w3.org/2005/Atom', |
91
|
|
|
|
|
|
|
OPENSEARCH_NAMESPACE_URI => 'http://a9.com/-/spec/opensearch/1.1/', |
92
|
|
|
|
|
|
|
GDATA_NAMESPACE_URI => 'http://schemas.google.com/g/2005', |
93
|
|
|
|
|
|
|
GEORSS_NAMESPACE_URI => 'http://www.georss.org/georss', |
94
|
|
|
|
|
|
|
GML_NAMESPACE_URI => 'http://www.opengis.net/gml', |
95
|
|
|
|
|
|
|
MEDIA_NAMESPACE_URI => 'http://search.yahoo.com/mrss/', |
96
|
|
|
|
|
|
|
APP_NAMESPACE_URI => 'http://www.w3.org/2007/app', |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
44
|
|
|
44
|
|
261
|
}; |
|
44
|
|
|
|
|
109
|
|
100
|
|
|
|
|
|
|
my @general = qw(XML_HEADER GDATA_MINIMUM_VERSION); |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
my @query = qw(TRUE FALSE); |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
my @http_status= qw(OK CREATED NOT_MODIFIED BAD_REQUEST UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT GONE INTERNAL_SERVER_ERROR); |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
my @format = qw(JSON JSONC ATOM RSS); |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
my @namespace = qw(ATOM_NAMESPACE OPENSEARCH_NAMESPACE GDATA_NAMESPACE GEORSS_NAMESPACE GML_NAMESPACE MEDIA_NAMESPACE APP_NAMESPACE |
109
|
|
|
|
|
|
|
ATOM_NAMESPACE_URI OPENSEARCH_NAMESPACE_URI GDATA_NAMESPACE_URI GEORSS_NAMESPACE_URI GML_NAMESPACE_URI MEDIA_NAMESPACE_URI APP_NAMESPACE_URI |
110
|
|
|
|
|
|
|
ATOM_NAMESPACE_PREFIX OPENSEARCH_NAMESPACE_PREFIX GDATA_NAMESPACE_PREFIX GEORSS_NAMESPACE_PREFIX GML_NAMESPACE_PREFIX MEDIA_NAMESPACE_PREFIX APP_NAMESPACE_PREFIX |
111
|
|
|
|
|
|
|
); |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
my @service = qw(YOUTUBE_SERVICE WEBMASTER_SERVICE SPREADSHEETS_SERVICE SIDEWIKI_SERVICE PICASA_SERVICE MAPS_SERVICE HEALTH_SB_SERVICE HEALTH_SERVICE |
114
|
|
|
|
|
|
|
GMAIL_SERVICE FINANCE_SERVICE DOCUMENTS_SERVICE CONTACTS_SERVICE CODE_SERVICE CALENDAR_SERVICE CALENDAR_SERVICE BOOK_SERVICE |
115
|
|
|
|
|
|
|
BLOGGER_SERVICE SITES_SERVICE BASE_SERVICE APPS_SERVICE ANALYTICS_SERVICE); |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
my @errors = qw(BAD_AUTHENTICATION NOT_VERIFIED TERMS_NOT_AGREED CAPTCHA_REQUIRED UNKNOWN ACCOUNT_DELETED ACCOUNT_DISABLED SERVICE_DISABLED |
118
|
|
|
|
|
|
|
SERVICE_UNAVAILABLE); |
119
|
|
|
|
|
|
|
require Exporter; |
120
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
121
|
|
|
|
|
|
|
our @EXPORT_OK = (@format,@namespace,@general,@service,@query,@http_status,@errors); |
122
|
|
|
|
|
|
|
our %EXPORT_TAGS = (http_status=>[@http_status], |
123
|
|
|
|
|
|
|
service=>[@service], |
124
|
|
|
|
|
|
|
format => [@format], |
125
|
|
|
|
|
|
|
namespace=>[@namespace], |
126
|
|
|
|
|
|
|
general=>[@general], |
127
|
|
|
|
|
|
|
errors => [@errors], |
128
|
|
|
|
|
|
|
all=>[@format,@namespace,@general,@service,@query,@http_status,@errors]); |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
"The earth is blue like an orange."; |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
__END__ |