chocolate_rain 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/chocolate_rain.gemspec +3 -4
- data/lib/chocolate_rain/daemon.rb +67 -0
- data/lib/chocolate_rain/ftp_files_and_upload.rb +54 -0
- data/lib/chocolate_rain/mail_rain/inbox.rb +39 -0
- data/lib/chocolate_rain/mail_rain/mail_handler.rb +53 -0
- data/lib/chocolate_rain/version.rb +1 -1
- data/lib/chocolate_rain/y_video.rb +49 -0
- data/lib/chocolate_rain.rb +45 -4
- metadata +22 -39
- data/generators/youtube_model/USAGE +0 -3
- data/generators/youtube_model/templates/config.yml +0 -6
- data/generators/youtube_model/templates/model.rb +0 -17
- data/generators/youtube_model/templates/unit_test.rb +0 -7
- data/generators/youtube_model/youtube_model_generator.rb +0 -15
- data/lib/.DS_Store +0 -0
- data/lib/gdata/auth/authsub.rb +0 -161
- data/lib/gdata/auth/clientlogin.rb +0 -102
- data/lib/gdata/client/apps.rb +0 -27
- data/lib/gdata/client/base.rb +0 -182
- data/lib/gdata/client/blogger.rb +0 -28
- data/lib/gdata/client/booksearch.rb +0 -28
- data/lib/gdata/client/calendar.rb +0 -58
- data/lib/gdata/client/contacts.rb +0 -28
- data/lib/gdata/client/doclist.rb +0 -28
- data/lib/gdata/client/finance.rb +0 -28
- data/lib/gdata/client/gbase.rb +0 -28
- data/lib/gdata/client/gmail.rb +0 -28
- data/lib/gdata/client/health.rb +0 -28
- data/lib/gdata/client/notebook.rb +0 -28
- data/lib/gdata/client/photos.rb +0 -29
- data/lib/gdata/client/spreadsheets.rb +0 -28
- data/lib/gdata/client/webmaster_tools.rb +0 -28
- data/lib/gdata/client/youtube.rb +0 -47
- data/lib/gdata/client.rb +0 -84
- data/lib/gdata/g_data.rb +0 -22
- data/lib/gdata/http/default_service.rb +0 -82
- data/lib/gdata/http/mime_body.rb +0 -95
- data/lib/gdata/http/request.rb +0 -74
- data/lib/gdata/http/response.rb +0 -44
- data/lib/gdata/http.rb +0 -18
- data/lib/youtube_helpers.rb +0 -58
- data/lib/youtube_model.rb +0 -341
@@ -1,102 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
require 'cgi'
|
16
|
-
|
17
|
-
module GData
|
18
|
-
module Auth
|
19
|
-
|
20
|
-
# This class implements ClientLogin signatures for Data API requests.
|
21
|
-
# It can be used with a GData::Client::GData object.
|
22
|
-
class ClientLogin
|
23
|
-
|
24
|
-
# The ClientLogin authentication handler
|
25
|
-
attr_accessor :auth_url
|
26
|
-
# One of 'HOSTED_OR_GOOGLE', 'GOOGLE', or 'HOSTED'.
|
27
|
-
# See documentation here:
|
28
|
-
# http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
|
29
|
-
attr_accessor :account_type
|
30
|
-
# The access token
|
31
|
-
attr_accessor :token
|
32
|
-
# The service name for the API you are working with
|
33
|
-
attr_accessor :service
|
34
|
-
|
35
|
-
# Initialize the class with the service name of an API that you wish
|
36
|
-
# to request a token for.
|
37
|
-
def initialize(service, options = {})
|
38
|
-
if service.nil?
|
39
|
-
raise ArgumentError, "Service name cannot be nil"
|
40
|
-
end
|
41
|
-
|
42
|
-
@service = service
|
43
|
-
|
44
|
-
options.each do |key, value|
|
45
|
-
self.send("#{key}=", value)
|
46
|
-
end
|
47
|
-
|
48
|
-
@auth_url ||= 'https://www.google.com/accounts/ClientLogin'
|
49
|
-
@account_type ||= 'HOSTED_OR_GOOGLE'
|
50
|
-
end
|
51
|
-
|
52
|
-
# Retrieves a token for the given username and password.
|
53
|
-
# source identifies your application.
|
54
|
-
# login_token and login_captcha are used only if you are responding
|
55
|
-
# to a previously issued CAPTCHA challenge.
|
56
|
-
def get_token(username, password, source, login_token = nil,
|
57
|
-
login_captcha = nil)
|
58
|
-
body = Hash.new
|
59
|
-
body['accountType'] = @account_type
|
60
|
-
body['Email'] = username
|
61
|
-
body['Passwd'] = password
|
62
|
-
body['service'] = @service
|
63
|
-
body['source'] = source
|
64
|
-
if login_token and login_captcha
|
65
|
-
body['logintoken'] = login_token
|
66
|
-
body['logincaptcha'] = login_captcha
|
67
|
-
end
|
68
|
-
|
69
|
-
request = GData::HTTP::Request.new(@auth_url, :body => body,
|
70
|
-
:method => :post)
|
71
|
-
service = GData::HTTP::DefaultService.new
|
72
|
-
response = service.make_request(request)
|
73
|
-
if response.status_code != 200
|
74
|
-
url = response.body[/Url=(.*)/,1]
|
75
|
-
error = response.body[/Error=(.*)/,1]
|
76
|
-
|
77
|
-
if error == "CaptchaRequired"
|
78
|
-
captcha_token = response.body[/CaptchaToken=(.*)/,1]
|
79
|
-
captcha_url = response.body[/CaptchaUrl=(.*)/,1]
|
80
|
-
raise GData::Client::CaptchaError.new(captcha_token, captcha_url),
|
81
|
-
"#{error} : #{url}"
|
82
|
-
end
|
83
|
-
|
84
|
-
raise GData::Client::AuthorizationError.new(response)
|
85
|
-
end
|
86
|
-
|
87
|
-
@token = response.body[/Auth=(.*)/,1]
|
88
|
-
return @token
|
89
|
-
end
|
90
|
-
|
91
|
-
# Creates an appropriate Authorization header on a GData::HTTP::Request
|
92
|
-
# object.
|
93
|
-
def sign_request!(request)
|
94
|
-
if @token == nil
|
95
|
-
raise GData::Client::Error, "Cannot sign request without credentials"
|
96
|
-
end
|
97
|
-
|
98
|
-
request.headers['Authorization'] = "GoogleLogin auth=#{@token}"
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
end
|
data/lib/gdata/client/apps.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Apps Provisioning API.
|
19
|
-
class Apps < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'apps'
|
23
|
-
super(options)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
data/lib/gdata/client/base.rb
DELETED
@@ -1,182 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# A client object used to interact with different Google Data APIs.
|
19
|
-
class Base
|
20
|
-
|
21
|
-
# A subclass of GData::Auth that handles authentication signing.
|
22
|
-
attr_accessor :auth_handler
|
23
|
-
# A subclass of GData::HTTP that handles making HTTP requests.
|
24
|
-
attr_accessor :http_service
|
25
|
-
# Headers to include in every request.
|
26
|
-
attr_accessor :headers
|
27
|
-
# The API version being used.
|
28
|
-
attr_accessor :version
|
29
|
-
# The default URL for ClientLogin.
|
30
|
-
attr_accessor :clientlogin_url
|
31
|
-
# A default service name for ClientLogin (overriden by subclasses).
|
32
|
-
attr_accessor :clientlogin_service
|
33
|
-
# The broadest AuthSub scope for working with an API.
|
34
|
-
# This is overriden by the service-specific subclasses.
|
35
|
-
attr_accessor :authsub_scope
|
36
|
-
# A short string identifying the current application.
|
37
|
-
attr_accessor :source
|
38
|
-
|
39
|
-
def initialize(options = {})
|
40
|
-
options.each do |key, value|
|
41
|
-
self.send("#{key}=", value)
|
42
|
-
end
|
43
|
-
|
44
|
-
@headers ||= {}
|
45
|
-
@http_service ||= GData::HTTP::DefaultService
|
46
|
-
@version ||= '2'
|
47
|
-
@source ||= 'AnonymousApp'
|
48
|
-
end
|
49
|
-
|
50
|
-
# Sends an HTTP request with the given file as a stream
|
51
|
-
def make_file_request(method, url, file_path, mime_type, entry = nil)
|
52
|
-
if not File.readable?(file_path)
|
53
|
-
raise ArgumentError, "File #{file_path} is not readable."
|
54
|
-
end
|
55
|
-
file = File.open(file_path, 'rb')
|
56
|
-
@headers['Slug'] = File.basename(file_path)
|
57
|
-
if entry
|
58
|
-
@headers['MIME-Version'] = '1.0'
|
59
|
-
body = GData::HTTP::MimeBody.new(entry, file, mime_type)
|
60
|
-
@headers['Content-Type'] = body.content_type
|
61
|
-
response = self.make_request(method, url, body)
|
62
|
-
else
|
63
|
-
@headers['Content-Type'] = mime_type
|
64
|
-
response = self.make_request(method, url, file)
|
65
|
-
end
|
66
|
-
file.close
|
67
|
-
return response
|
68
|
-
end
|
69
|
-
|
70
|
-
# Sends an HTTP request and return the response.
|
71
|
-
def make_request(method, url, body = '')
|
72
|
-
headers = self.prepare_headers
|
73
|
-
request = GData::HTTP::Request.new(url, :headers => headers,
|
74
|
-
:method => method, :body => body)
|
75
|
-
|
76
|
-
if @auth_handler and @auth_handler.respond_to?(:sign_request!)
|
77
|
-
@auth_handler.sign_request!(request)
|
78
|
-
end
|
79
|
-
|
80
|
-
service = http_service.new
|
81
|
-
response = service.make_request(request)
|
82
|
-
|
83
|
-
case response.status_code
|
84
|
-
when 200, 201, 302
|
85
|
-
#Do nothing, it's a success.
|
86
|
-
when 401, 403
|
87
|
-
raise AuthorizationError.new(response)
|
88
|
-
when 400
|
89
|
-
raise BadRequestError, response.body
|
90
|
-
when 409
|
91
|
-
raise VersionConflictError.new(response)
|
92
|
-
when 500
|
93
|
-
raise ServerError.new(response)
|
94
|
-
else
|
95
|
-
raise UnknownError.new(response)
|
96
|
-
end
|
97
|
-
|
98
|
-
return response
|
99
|
-
end
|
100
|
-
|
101
|
-
# Performs an HTTP GET against the API.
|
102
|
-
def get(url)
|
103
|
-
return self.make_request(:get, url)
|
104
|
-
end
|
105
|
-
|
106
|
-
# Performs an HTTP PUT against the API.
|
107
|
-
def put(url, body)
|
108
|
-
return self.make_request(:put, url, body)
|
109
|
-
end
|
110
|
-
|
111
|
-
# Performs an HTTP PUT with the given file
|
112
|
-
def put_file(url, file_path, mime_type, entry = nil)
|
113
|
-
return self.make_file_request(:put, url, file_path, mime_type, entry)
|
114
|
-
end
|
115
|
-
|
116
|
-
# Performs an HTTP POST against the API.
|
117
|
-
def post(url, body)
|
118
|
-
return self.make_request(:post, url, body)
|
119
|
-
end
|
120
|
-
|
121
|
-
# Performs an HTTP POST with the given file
|
122
|
-
def post_file(url, file_path, mime_type, entry = nil)
|
123
|
-
return self.make_file_request(:post, url, file_path, mime_type, entry)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Performs an HTTP DELETE against the API.
|
127
|
-
def delete(url)
|
128
|
-
return self.make_request(:delete, url)
|
129
|
-
end
|
130
|
-
|
131
|
-
# Constructs some necessary headers for every request.
|
132
|
-
def prepare_headers
|
133
|
-
headers = @headers
|
134
|
-
headers['GData-Version'] = @version
|
135
|
-
headers['User-Agent'] = GData::Auth::SOURCE_LIB_STRING + @source
|
136
|
-
# by default we assume we are sending Atom entries
|
137
|
-
if not headers.has_key?('Content-Type')
|
138
|
-
headers['Content-Type'] = 'application/atom+xml'
|
139
|
-
end
|
140
|
-
return headers
|
141
|
-
end
|
142
|
-
|
143
|
-
# Performs ClientLogin for the service. See GData::Auth::ClientLogin
|
144
|
-
# for details.
|
145
|
-
def clientlogin(username, password, captcha_token = nil,
|
146
|
-
captcha_answer = nil, service = nil, account_type = nil)
|
147
|
-
if service.nil?
|
148
|
-
service = @clientlogin_service
|
149
|
-
end
|
150
|
-
options = { :account_type => account_type }
|
151
|
-
self.auth_handler = GData::Auth::ClientLogin.new(service, options)
|
152
|
-
if @clientlogin_url
|
153
|
-
@auth_handler.auth_url = @clientlogin_url
|
154
|
-
end
|
155
|
-
source = GData::Auth::SOURCE_LIB_STRING + @source
|
156
|
-
@auth_handler.get_token(username, password, source, captcha_token, captcha_answer)
|
157
|
-
end
|
158
|
-
|
159
|
-
def authsub_url(next_url, secure = false, session = true, domain = nil,
|
160
|
-
scope = nil)
|
161
|
-
if scope.nil?
|
162
|
-
scope = @authsub_scope
|
163
|
-
end
|
164
|
-
GData::Auth::AuthSub.get_url(next_url, scope, secure, session, domain)
|
165
|
-
end
|
166
|
-
|
167
|
-
# Sets an AuthSub token for the service.
|
168
|
-
def authsub_token=(token)
|
169
|
-
self.auth_handler = GData::Auth::AuthSub.new(token)
|
170
|
-
end
|
171
|
-
|
172
|
-
# Sets a private key to use with AuthSub requests.
|
173
|
-
def authsub_private_key=(key)
|
174
|
-
if @auth_handler.class == GData::Auth::AuthSub
|
175
|
-
@auth_handler.private_key = key
|
176
|
-
else
|
177
|
-
raise Error, "An AuthSub token must be set first."
|
178
|
-
end
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
end
|
data/lib/gdata/client/blogger.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Blogger API.
|
19
|
-
class Blogger < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'blogger'
|
23
|
-
options[:authsub_scope] ||= 'http://www.blogger.com/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Book Search Data API.
|
19
|
-
class BookSearch < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'print'
|
23
|
-
options[:authsub_scope] ||= 'http://www.google.com/books/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,58 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Calendar Data API.
|
19
|
-
class Calendar < Base
|
20
|
-
|
21
|
-
# Holds on to a session cookie
|
22
|
-
attr_accessor :session_cookie
|
23
|
-
|
24
|
-
def initialize(options = {})
|
25
|
-
options[:clientlogin_service] ||= 'cl'
|
26
|
-
options[:authsub_scope] ||= 'http://www.google.com/calendar/feeds/'
|
27
|
-
super(options)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Overrides auth_handler= so if the authentication changes,
|
31
|
-
# the session cookie is cleared.
|
32
|
-
def auth_handler=(handler)
|
33
|
-
@session_cookie = nil
|
34
|
-
return super(handler)
|
35
|
-
end
|
36
|
-
|
37
|
-
# Overrides make_request to handle 302 redirects with a session cookie.
|
38
|
-
def make_request(method, url, body = '', retries = 4)
|
39
|
-
response = super(method, url, body)
|
40
|
-
if response.status_code == 302 and retries > 0
|
41
|
-
@session_cookie = response.headers['set-cookie']
|
42
|
-
return self.make_request(method, url, body,
|
43
|
-
retries - 1)
|
44
|
-
else
|
45
|
-
return response
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
# Custom prepare_headers to include the session cookie if it exists
|
50
|
-
def prepare_headers
|
51
|
-
if @session_cookie
|
52
|
-
@headers['cookie'] = @session_cookie
|
53
|
-
end
|
54
|
-
super
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Contacts API.
|
19
|
-
class Contacts < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'cp'
|
23
|
-
options[:authsub_scope] ||= 'http://www.google.com/m8/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/gdata/client/doclist.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Documents List Data API.
|
19
|
-
class DocList < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'writely'
|
23
|
-
options[:authsub_scope] ||= 'http://docs.google.com/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/gdata/client/finance.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Finance API.
|
19
|
-
class Finance < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'finance'
|
23
|
-
options[:authsub_scope] ||= 'http://finance.google.com/finance/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/gdata/client/gbase.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Google Base API.
|
19
|
-
class GBase < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'gbase'
|
23
|
-
options[:authsub_scope] ||= 'http://www.google.com/base/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/gdata/client/gmail.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the GMail Atom Feed.
|
19
|
-
class GMail < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'mail'
|
23
|
-
options[:authsub_scope] ||= 'https://mail.google.com/mail/feed/atom/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/gdata/client/health.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Health API.
|
19
|
-
class Health < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'health'
|
23
|
-
options[:authsub_scope] ||= 'https://www.google.com/health/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Notebook Data API.
|
19
|
-
class Notebook < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'notebook'
|
23
|
-
options[:authsub_scope] ||= 'http://www.google.com/notebook/feeds/'
|
24
|
-
super(options)
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
data/lib/gdata/client/photos.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# Copyright (C) 2008 Google Inc.
|
2
|
-
#
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
-
# you may not use this file except in compliance with the License.
|
5
|
-
# You may obtain a copy of the License at
|
6
|
-
#
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
-
#
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
# See the License for the specific language governing permissions and
|
13
|
-
# limitations under the License.
|
14
|
-
|
15
|
-
module GData
|
16
|
-
module Client
|
17
|
-
|
18
|
-
# Client class to wrap working with the Picasa Web Albums API.
|
19
|
-
class Photos < Base
|
20
|
-
|
21
|
-
def initialize(options = {})
|
22
|
-
options[:clientlogin_service] ||= 'lh2'
|
23
|
-
options[:authsub_scope] ||= 'http://picasaweb.google.com/data/'
|
24
|
-
options[:version] ||= '1'
|
25
|
-
super(options)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|