picasa-ruby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1 @@
1
+ v0.1.0 first release
data/LICENSE ADDED
File without changes
data/Manifest ADDED
@@ -0,0 +1,10 @@
1
+ CHANGELOG
2
+ LICENSE
3
+ Manifest
4
+ README.rdoc
5
+ Rakefile
6
+ init.rb
7
+ lib/picasa.rb
8
+ lib/picasa/album.rb
9
+ lib/picasa/client.rb
10
+ lib/picasa/photo.rb
data/README.rdoc ADDED
File without changes
data/Rakefile ADDED
@@ -0,0 +1,13 @@
1
+ require 'psych'
2
+ require 'rubygems'
3
+ require 'rake'
4
+ require 'echoe'
5
+
6
+ Echoe.new('picasa-ruby', '0.1.0') do |p|
7
+ p.description = "Ruby library for Picasa Web Albums API."
8
+ p.url = "http://github.com/23ninja/picasa-ruby"
9
+ p.author = "Iskander Haziev"
10
+ p.email = "gvalmon@gmail.com"
11
+ p.ignore_pattern = ["tmp/*", "script/*"]
12
+ p.development_dependencies = ['oauth', 'typhoeus']
13
+ end
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'picasa'
@@ -0,0 +1,7 @@
1
+ module Picasa
2
+ class Album
3
+ def initialize
4
+
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,25 @@
1
+ require 'oauth'
2
+ require 'oauth/request_proxy/typhoeus_request'
3
+ module Picasa
4
+ class Client
5
+ BASE_URL = 'https://picasaweb.google.com/data'
6
+
7
+ def initialize(api_key, api_secret, oauth_token, oauth_secret = nil)
8
+ @consumer = ::OAuth::Consumer.new(api_key,api_secret, :site => BASE_URL)
9
+ @token = ::OAuth::Token.new(oauth_token, oauth_secret)
10
+ @oauth_params = {:consumer => consumer, :token => token}
11
+ @client = ::Typhoeus::Hydra.new
12
+ end
13
+
14
+ def call(uri)
15
+ request = ::Typhoeus::Request.new(BASE_URL + uri)
16
+ oauth_helper = ::OAuth::Client::Helper.new(
17
+ request, @oauth_params.merge(:request_uri => BASE_URL + uri)
18
+ )
19
+ request.headers.merge!({"Authorization" => oauth_helper.header})
20
+ @client.queue(request)
21
+ @client.run
22
+ response = request.response
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,7 @@
1
+ module Picasa
2
+ class Photo
3
+ def initialize
4
+
5
+ end
6
+ end
7
+ end
data/lib/picasa.rb ADDED
@@ -0,0 +1,5 @@
1
+ module Picasa
2
+ require 'picasa/client'
3
+ require 'picasa/album'
4
+ require 'picasa/photo'
5
+ end
@@ -0,0 +1,35 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{picasa-ruby}
5
+ s.version = "0.1.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
+ s.authors = [%q{Iskander Haziev}]
9
+ s.date = %q{2011-08-01}
10
+ s.description = %q{Ruby library for Picasa Web Albums API.}
11
+ s.email = %q{gvalmon@gmail.com}
12
+ s.extra_rdoc_files = [%q{CHANGELOG}, %q{LICENSE}, %q{README.rdoc}, %q{lib/picasa.rb}, %q{lib/picasa/album.rb}, %q{lib/picasa/client.rb}, %q{lib/picasa/photo.rb}]
13
+ s.files = [%q{CHANGELOG}, %q{LICENSE}, %q{Manifest}, %q{README.rdoc}, %q{Rakefile}, %q{init.rb}, %q{lib/picasa.rb}, %q{lib/picasa/album.rb}, %q{lib/picasa/client.rb}, %q{lib/picasa/photo.rb}, %q{picasa-ruby.gemspec}]
14
+ s.homepage = %q{http://github.com/23ninja/picasa-ruby}
15
+ s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Picasa-ruby}, %q{--main}, %q{README.rdoc}]
16
+ s.require_paths = [%q{lib}]
17
+ s.rubyforge_project = %q{picasa-ruby}
18
+ s.rubygems_version = %q{1.8.6}
19
+ s.summary = %q{Ruby library for Picasa Web Albums API.}
20
+
21
+ if s.respond_to? :specification_version then
22
+ s.specification_version = 3
23
+
24
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
25
+ s.add_development_dependency(%q<oauth>, [">= 0"])
26
+ s.add_development_dependency(%q<typhoeus>, [">= 0"])
27
+ else
28
+ s.add_dependency(%q<oauth>, [">= 0"])
29
+ s.add_dependency(%q<typhoeus>, [">= 0"])
30
+ end
31
+ else
32
+ s.add_dependency(%q<oauth>, [">= 0"])
33
+ s.add_dependency(%q<typhoeus>, [">= 0"])
34
+ end
35
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: picasa-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Iskander Haziev
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-08-01 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: oauth
16
+ requirement: &7188360 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *7188360
25
+ - !ruby/object:Gem::Dependency
26
+ name: typhoeus
27
+ requirement: &7183000 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *7183000
36
+ description: Ruby library for Picasa Web Albums API.
37
+ email: gvalmon@gmail.com
38
+ executables: []
39
+ extensions: []
40
+ extra_rdoc_files:
41
+ - CHANGELOG
42
+ - LICENSE
43
+ - README.rdoc
44
+ - lib/picasa.rb
45
+ - lib/picasa/album.rb
46
+ - lib/picasa/client.rb
47
+ - lib/picasa/photo.rb
48
+ files:
49
+ - CHANGELOG
50
+ - LICENSE
51
+ - Manifest
52
+ - README.rdoc
53
+ - Rakefile
54
+ - init.rb
55
+ - lib/picasa.rb
56
+ - lib/picasa/album.rb
57
+ - lib/picasa/client.rb
58
+ - lib/picasa/photo.rb
59
+ - picasa-ruby.gemspec
60
+ homepage: http://github.com/23ninja/picasa-ruby
61
+ licenses: []
62
+ post_install_message:
63
+ rdoc_options:
64
+ - --line-numbers
65
+ - --inline-source
66
+ - --title
67
+ - Picasa-ruby
68
+ - --main
69
+ - README.rdoc
70
+ require_paths:
71
+ - lib
72
+ required_ruby_version: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ! '>='
82
+ - !ruby/object:Gem::Version
83
+ version: '1.2'
84
+ requirements: []
85
+ rubyforge_project: picasa-ruby
86
+ rubygems_version: 1.8.6
87
+ signing_key:
88
+ specification_version: 3
89
+ summary: Ruby library for Picasa Web Albums API.
90
+ test_files: []