picasa 0.2.2 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +15 -3
- data/.travis.yml +6 -0
- data/Gemfile +6 -0
- data/README.md +45 -0
- data/Rakefile +5 -51
- data/lib/picasa.rb +3 -4
- data/lib/picasa/config.rb +1 -1
- data/lib/picasa/version.rb +3 -0
- data/lib/picasa/web_albums.rb +21 -18
- data/picasa.gemspec +27 -60
- data/test/helper.rb +13 -11
- data/test/test_config.rb +8 -17
- data/test/test_web_albums.rb +21 -22
- metadata +65 -84
- data/.document +0 -5
- data/README.rdoc +0 -34
- data/VERSION.yml +0 -5
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# Picasa
|
2
|
+
|
3
|
+
Simple google picasa managment.
|
4
|
+
Only for public albums so far.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
```
|
9
|
+
gem install picasa
|
10
|
+
```
|
11
|
+
|
12
|
+
## Usage
|
13
|
+
|
14
|
+
``` ruby
|
15
|
+
Picasa.albums(:google_user => 'google_username')
|
16
|
+
# => [ {:id => "666", :title => "satan-album", :photos_count => 6, :photo => "url",
|
17
|
+
# :thumbnail => "url", :slideshow => "url", :summary => "summary"},
|
18
|
+
# {another one} ]
|
19
|
+
|
20
|
+
Picasa.photos(:google_user => 'google_username', :album_id => 'album_id')
|
21
|
+
#=> {:photos => [{ :title, :thumbnail_1, :thumbnail_2, :thumbnail_3, :photo },{}],
|
22
|
+
# :slideshow => "link to picasa slideshow"}
|
23
|
+
```
|
24
|
+
|
25
|
+
or you can set google user for all requests like this:
|
26
|
+
|
27
|
+
``` ruby
|
28
|
+
Picasa.config do |c|
|
29
|
+
c.google_user = 'google.user'
|
30
|
+
end
|
31
|
+
```
|
32
|
+
|
33
|
+
and use it:
|
34
|
+
|
35
|
+
``` ruby
|
36
|
+
Picasa.albums
|
37
|
+
Picasa.photos(:album_id => 'album_id')
|
38
|
+
```
|
39
|
+
|
40
|
+
## Continuous Integration
|
41
|
+
[![Build Status](https://secure.travis-ci.org/morgoth/picasa.png)](http://travis-ci.org/morgoth/picasa)
|
42
|
+
|
43
|
+
## Copyright
|
44
|
+
|
45
|
+
Copyright (c) 2011 Wojciech Wnętrzak, released under the MIT license.
|
data/Rakefile
CHANGED
@@ -1,57 +1,11 @@
|
|
1
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
2
3
|
|
3
|
-
require
|
4
|
-
require 'rake'
|
5
|
-
|
6
|
-
begin
|
7
|
-
require 'jeweler'
|
8
|
-
Jeweler::Tasks.new do |gem|
|
9
|
-
gem.name = "picasa"
|
10
|
-
gem.description = %Q{Simple Google Picasa managment}
|
11
|
-
gem.summary = %Q{simple google picasa managment}
|
12
|
-
gem.email = "w.wnetrzak@gmail.com"
|
13
|
-
gem.homepage = "http://github.com/morgoth/picasa"
|
14
|
-
gem.authors = ["Wojciech Wnętrzak"]
|
15
|
-
gem.add_dependency('xml-simple')
|
16
|
-
gem.add_development_dependency 'test-unit', '>=2.0.6'
|
17
|
-
gem.add_development_dependency 'fakeweb'
|
18
|
-
|
19
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
20
|
-
end
|
21
|
-
rescue LoadError
|
22
|
-
puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
|
23
|
-
end
|
24
|
-
|
25
|
-
require 'rake/testtask'
|
4
|
+
require "rake/testtask"
|
26
5
|
Rake::TestTask.new(:test) do |test|
|
27
|
-
test.libs <<
|
28
|
-
test.pattern =
|
6
|
+
test.libs << "lib" << "test"
|
7
|
+
test.pattern = "test/**/test_*.rb"
|
29
8
|
test.verbose = true
|
30
9
|
end
|
31
10
|
|
32
|
-
begin
|
33
|
-
require 'rcov/rcovtask'
|
34
|
-
Rcov::RcovTask.new do |test|
|
35
|
-
test.libs << 'test'
|
36
|
-
test.pattern = 'test/**/test_*.rb'
|
37
|
-
test.verbose = true
|
38
|
-
end
|
39
|
-
rescue LoadError
|
40
|
-
task :rcov do
|
41
|
-
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
|
-
task :test => :check_dependencies
|
46
|
-
|
47
11
|
task :default => :test
|
48
|
-
|
49
|
-
require 'rake/rdoctask'
|
50
|
-
Rake::RDocTask.new do |rdoc|
|
51
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
52
|
-
|
53
|
-
rdoc.rdoc_dir = 'rdoc'
|
54
|
-
rdoc.title = "picasa #{version}"
|
55
|
-
rdoc.rdoc_files.include('README*')
|
56
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
57
|
-
end
|
data/lib/picasa.rb
CHANGED
data/lib/picasa/config.rb
CHANGED
data/lib/picasa/web_albums.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
+
require "net/http"
|
2
|
+
require "xmlsimple"
|
3
|
+
|
1
4
|
module Picasa
|
2
5
|
class WebAlbums
|
3
6
|
def initialize(user)
|
4
|
-
Picasa.config.google_user = user
|
7
|
+
Picasa.config.google_user = user if user
|
5
8
|
raise ArgumentError.new("You must specify google_user") unless Picasa.config.google_user
|
6
9
|
end
|
7
10
|
|
@@ -9,17 +12,17 @@ module Picasa
|
|
9
12
|
data = connect("/data/feed/api/user/#{Picasa.config.google_user}")
|
10
13
|
xml = XmlSimple.xml_in(data)
|
11
14
|
albums = []
|
12
|
-
xml[
|
15
|
+
xml["entry"].each do |album|
|
13
16
|
attributes = {}
|
14
|
-
attributes[:id] = album[
|
15
|
-
attributes[:title] = album[
|
16
|
-
attributes[:summary] = album[
|
17
|
-
attributes[:photos_count] = album[
|
18
|
-
attributes[:photo] = album[
|
19
|
-
attributes[:thumbnail] = album[
|
20
|
-
attributes[:slideshow] = album[
|
17
|
+
attributes[:id] = album["id"][1]
|
18
|
+
attributes[:title] = album["title"][0]["content"]
|
19
|
+
attributes[:summary] = album["summary"][0]["content"]
|
20
|
+
attributes[:photos_count] = album["numphotos"][0].to_i
|
21
|
+
attributes[:photo] = album["group"][0]["content"]["url"]
|
22
|
+
attributes[:thumbnail] = album["group"][0]["thumbnail"][0]["url"]
|
23
|
+
attributes[:slideshow] = album["link"][1]["href"] + "#slideshow"
|
21
24
|
albums << attributes
|
22
|
-
end if xml[
|
25
|
+
end if xml["entry"]
|
23
26
|
albums
|
24
27
|
end
|
25
28
|
|
@@ -27,16 +30,16 @@ module Picasa
|
|
27
30
|
data = connect("/data/feed/api/user/#{Picasa.config.google_user}/albumid/#{album_id}")
|
28
31
|
xml = XmlSimple.xml_in(data)
|
29
32
|
photos = []
|
30
|
-
xml[
|
33
|
+
xml["entry"].each do |photo|
|
31
34
|
attributes = {}
|
32
|
-
attributes[:title] = photo[
|
33
|
-
attributes[:thumbnail_1] = photo[
|
34
|
-
attributes[:thumbnail_2] = photo[
|
35
|
-
attributes[:thumbnail_3] = photo[
|
36
|
-
attributes[:photo] = photo[
|
35
|
+
attributes[:title] = photo["group"][0]["description"][0]["content"]
|
36
|
+
attributes[:thumbnail_1] = photo["group"][0]["thumbnail"][0]["url"]
|
37
|
+
attributes[:thumbnail_2] = photo["group"][0]["thumbnail"][1]["url"]
|
38
|
+
attributes[:thumbnail_3] = photo["group"][0]["thumbnail"][2]["url"]
|
39
|
+
attributes[:photo] = photo["content"]["src"]
|
37
40
|
photos << attributes
|
38
|
-
end if xml[
|
39
|
-
{ :photos => photos, :slideshow => xml[
|
41
|
+
end if xml["entry"]
|
42
|
+
{ :photos => photos, :slideshow => xml["link"][1]["href"] + "#slideshow" }
|
40
43
|
end
|
41
44
|
|
42
45
|
private
|
data/picasa.gemspec
CHANGED
@@ -1,66 +1,33 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/picasa/version', __FILE__)
|
5
3
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Wojciech Wnętrzak"]
|
6
|
+
gem.email = ["w.wnetrzak@gmail.com"]
|
7
|
+
gem.description = %q{Simple Google Picasa managment}
|
8
|
+
gem.summary = %q{simple google picasa managment}
|
9
|
+
gem.homepage = "https://github.com/morgoth/picasa"
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION.yml",
|
26
|
-
"lib/picasa.rb",
|
27
|
-
"lib/picasa/config.rb",
|
28
|
-
"lib/picasa/web_albums.rb",
|
29
|
-
"picasa.gemspec",
|
30
|
-
"test/fixtures/albums",
|
31
|
-
"test/fixtures/photos",
|
32
|
-
"test/helper.rb",
|
33
|
-
"test/test_config.rb",
|
34
|
-
"test/test_web_albums.rb"
|
35
|
-
]
|
36
|
-
s.homepage = %q{http://github.com/morgoth/picasa}
|
37
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
38
|
-
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version = %q{1.3.7}
|
40
|
-
s.summary = %q{simple google picasa managment}
|
41
|
-
s.test_files = [
|
42
|
-
"test/test_web_albums.rb",
|
43
|
-
"test/test_config.rb",
|
44
|
-
"test/helper.rb"
|
45
|
-
]
|
11
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
|
+
gem.files = `git ls-files`.split("\n")
|
13
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
14
|
+
gem.name = "picasa"
|
15
|
+
gem.require_paths = ['lib']
|
16
|
+
gem.version = Picasa::VERSION
|
46
17
|
|
47
|
-
|
48
|
-
|
49
|
-
s.specification_version = 3
|
18
|
+
gem.add_dependency "xml-simple"
|
19
|
+
gem.add_development_dependency "fakeweb"
|
50
20
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
s.add_dependency(%q<fakeweb>, [">= 0"])
|
59
|
-
end
|
60
|
-
else
|
61
|
-
s.add_dependency(%q<xml-simple>, [">= 0"])
|
62
|
-
s.add_dependency(%q<test-unit>, [">= 2.0.6"])
|
63
|
-
s.add_dependency(%q<fakeweb>, [">= 0"])
|
64
|
-
end
|
65
|
-
end
|
21
|
+
gem.post_install_message = %{
|
22
|
+
*************************************************************************
|
23
|
+
|
24
|
+
Version 0.4 of this gem will be totaly rewritten.
|
25
|
+
Gem syntax will change with backwards incompatibilities.
|
26
|
+
If you don't want to update your code, please specify in your Gemfile:
|
27
|
+
gem "picasa", "~> 0.3.0"
|
66
28
|
|
29
|
+
Follow https://github.com/morgoth/picasa for updates.
|
30
|
+
|
31
|
+
*************************************************************************
|
32
|
+
}
|
33
|
+
end
|
data/test/helper.rb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
require 'test/unit'
|
4
|
-
require 'fakeweb'
|
1
|
+
require "minitest/autorun"
|
2
|
+
require "fakeweb"
|
5
3
|
|
6
|
-
|
7
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
8
|
-
require 'picasa'
|
4
|
+
require "picasa"
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
6
|
+
class MiniTest::Unit::TestCase
|
7
|
+
def setup
|
8
|
+
FakeWeb.allow_net_connect = false
|
9
|
+
end
|
10
|
+
|
11
|
+
def fixture_file(filename)
|
12
|
+
return "" if filename == ""
|
13
|
+
file_path = File.expand_path(File.dirname(__FILE__) + "/fixtures/" + filename)
|
14
|
+
File.read(file_path)
|
15
|
+
end
|
14
16
|
end
|
data/test/test_config.rb
CHANGED
@@ -1,21 +1,12 @@
|
|
1
|
-
require
|
1
|
+
require "helper"
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
describe Picasa::Config do
|
4
|
+
it "should take user passed to method instead of config" do
|
5
5
|
Picasa.config do |c|
|
6
|
-
c.google_user =
|
6
|
+
c.google_user = "some.user"
|
7
7
|
end
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
test "Take user passed to method instead of config" do
|
14
|
-
Picasa.config do |c|
|
15
|
-
c.google_user = 'some.user'
|
16
|
-
end
|
17
|
-
assert_equal 'some.user', Picasa.config.google_user
|
18
|
-
Picasa::WebAlbums.new('important.user')
|
19
|
-
assert_equal 'important.user', Picasa.config.google_user
|
8
|
+
assert_equal "some.user", Picasa.config.google_user
|
9
|
+
Picasa::WebAlbums.new("important.user")
|
10
|
+
assert_equal "important.user", Picasa.config.google_user
|
20
11
|
end
|
21
|
-
end
|
12
|
+
end
|
data/test/test_web_albums.rb
CHANGED
@@ -1,44 +1,43 @@
|
|
1
|
-
require
|
1
|
+
require "helper"
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
page = fixture_file(
|
3
|
+
describe Picasa::WebAlbums do
|
4
|
+
it "should parse albums page" do
|
5
|
+
page = fixture_file("albums")
|
6
6
|
FakeWeb.register_uri(:get, "picasaweb.google.com/data/feed/api/user/some.user", :response => page)
|
7
7
|
|
8
|
-
albums = Picasa.albums(:google_user =>
|
8
|
+
albums = Picasa.albums(:google_user => "some.user")
|
9
9
|
assert_equal 5, albums.count
|
10
10
|
assert_equal "SAPS in da akcion :P", albums.first[:title]
|
11
11
|
assert_equal 10, albums[2][:photos_count]
|
12
12
|
assert_equal "5277503612406515713", albums.first[:id]
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
refute_nil albums.first[:photo]
|
14
|
+
refute_nil albums.first[:thumbnail]
|
15
|
+
refute_nil albums.first[:slideshow]
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
page = fixture_file(
|
18
|
+
it "should parse photos page" do
|
19
|
+
page = fixture_file("photos")
|
20
20
|
FakeWeb.register_uri(:get, "picasaweb.google.com/data/feed/api/user/some.user/albumid/666", :response => page)
|
21
21
|
|
22
|
-
photos = Picasa.photos(:google_user =>
|
22
|
+
photos = Picasa.photos(:google_user => "some.user", :album_id => "666")
|
23
23
|
assert_equal 10, photos[:photos].count
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
refute_nil photos[:slideshow]
|
25
|
+
refute_nil photos[:photos].first[:thumbnail_1]
|
26
|
+
refute_nil photos[:photos].first[:thumbnail_2]
|
27
|
+
refute_nil photos[:photos].first[:thumbnail_3]
|
28
28
|
assert_nil photos[:photos].first[:title]
|
29
|
-
assert_equal "http://lh5.ggpht.com/_Kp7xCOU0f_U/SQS8EFqEXjI/AAAAAAAAAFo/aUOA6byXAuE/Jurek.JPG",
|
30
|
-
photos[:photos].first[:photo]
|
29
|
+
assert_equal "http://lh5.ggpht.com/_Kp7xCOU0f_U/SQS8EFqEXjI/AAAAAAAAAFo/aUOA6byXAuE/Jurek.JPG", photos[:photos].first[:photo]
|
31
30
|
end
|
32
31
|
|
33
|
-
|
34
|
-
|
32
|
+
it "should raise argument error if google user is not present" do
|
33
|
+
assert_raises ArgumentError do
|
35
34
|
Picasa::WebAlbums.new
|
36
35
|
end
|
37
36
|
end
|
38
37
|
|
39
|
-
|
40
|
-
|
41
|
-
Picasa.photos :google_user =>
|
38
|
+
it "should raise argument error if album_id is not present" do
|
39
|
+
assert_raises ArgumentError do
|
40
|
+
Picasa.photos :google_user => "some.user"
|
42
41
|
end
|
43
42
|
end
|
44
43
|
end
|
metadata
CHANGED
@@ -1,81 +1,54 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: picasa
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 2
|
8
|
-
- 2
|
9
|
-
version: 0.2.2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.3'
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
12
|
-
-
|
7
|
+
authors:
|
8
|
+
- Wojciech Wnętrzak
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2011-12-05 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: xml-simple
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &8245980 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
- 0
|
30
|
-
version: "0"
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
31
22
|
type: :runtime
|
32
|
-
version_requirements: *id001
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: test-unit
|
35
23
|
prerelease: false
|
36
|
-
|
37
|
-
|
38
|
-
requirements:
|
39
|
-
- - ">="
|
40
|
-
- !ruby/object:Gem::Version
|
41
|
-
segments:
|
42
|
-
- 2
|
43
|
-
- 0
|
44
|
-
- 6
|
45
|
-
version: 2.0.6
|
46
|
-
type: :development
|
47
|
-
version_requirements: *id002
|
48
|
-
- !ruby/object:Gem::Dependency
|
24
|
+
version_requirements: *8245980
|
25
|
+
- !ruby/object:Gem::Dependency
|
49
26
|
name: fakeweb
|
50
|
-
|
51
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
27
|
+
requirement: &8245440 !ruby/object:Gem::Requirement
|
52
28
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
|
57
|
-
- 0
|
58
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
59
33
|
type: :development
|
60
|
-
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *8245440
|
61
36
|
description: Simple Google Picasa managment
|
62
|
-
email:
|
37
|
+
email:
|
38
|
+
- w.wnetrzak@gmail.com
|
63
39
|
executables: []
|
64
|
-
|
65
40
|
extensions: []
|
66
|
-
|
67
|
-
|
68
|
-
- LICENSE
|
69
|
-
- README.rdoc
|
70
|
-
files:
|
71
|
-
- .document
|
41
|
+
extra_rdoc_files: []
|
42
|
+
files:
|
72
43
|
- .gitignore
|
44
|
+
- .travis.yml
|
45
|
+
- Gemfile
|
73
46
|
- LICENSE
|
74
|
-
- README.
|
47
|
+
- README.md
|
75
48
|
- Rakefile
|
76
|
-
- VERSION.yml
|
77
49
|
- lib/picasa.rb
|
78
50
|
- lib/picasa/config.rb
|
51
|
+
- lib/picasa/version.rb
|
79
52
|
- lib/picasa/web_albums.rb
|
80
53
|
- picasa.gemspec
|
81
54
|
- test/fixtures/albums
|
@@ -83,39 +56,47 @@ files:
|
|
83
56
|
- test/helper.rb
|
84
57
|
- test/test_config.rb
|
85
58
|
- test/test_web_albums.rb
|
86
|
-
|
87
|
-
homepage: http://github.com/morgoth/picasa
|
59
|
+
homepage: https://github.com/morgoth/picasa
|
88
60
|
licenses: []
|
61
|
+
post_install_message: ! '
|
62
|
+
|
63
|
+
*************************************************************************
|
64
|
+
|
89
65
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
66
|
+
Version 0.4 of this gem will be totaly rewritten.
|
67
|
+
|
68
|
+
Gem syntax will change with backwards incompatibilities.
|
69
|
+
|
70
|
+
If you don''t want to update your code, please specify in your Gemfile:
|
71
|
+
|
72
|
+
gem "picasa", "~> 0.3.0"
|
73
|
+
|
74
|
+
|
75
|
+
Follow https://github.com/morgoth/picasa for updates.
|
76
|
+
|
77
|
+
|
78
|
+
*************************************************************************
|
79
|
+
|
80
|
+
'
|
81
|
+
rdoc_options: []
|
82
|
+
require_paths:
|
94
83
|
- lib
|
95
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
84
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
85
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
|
101
|
-
|
102
|
-
version: "0"
|
103
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ! '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
104
91
|
none: false
|
105
|
-
requirements:
|
106
|
-
- -
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
|
109
|
-
- 0
|
110
|
-
version: "0"
|
92
|
+
requirements:
|
93
|
+
- - ! '>='
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '0'
|
111
96
|
requirements: []
|
112
|
-
|
113
97
|
rubyforge_project:
|
114
|
-
rubygems_version: 1.
|
98
|
+
rubygems_version: 1.8.10
|
115
99
|
signing_key:
|
116
100
|
specification_version: 3
|
117
101
|
summary: simple google picasa managment
|
118
|
-
test_files:
|
119
|
-
- test/test_web_albums.rb
|
120
|
-
- test/test_config.rb
|
121
|
-
- test/helper.rb
|
102
|
+
test_files: []
|
data/.document
DELETED
data/README.rdoc
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
= Picasa
|
2
|
-
|
3
|
-
Simple google picasa managment.
|
4
|
-
Only for public albums so far.
|
5
|
-
|
6
|
-
= Installation
|
7
|
-
|
8
|
-
gem install picasa
|
9
|
-
|
10
|
-
== Usage
|
11
|
-
|
12
|
-
Picasa.albums(:google_user => 'google_username')
|
13
|
-
# => [ {:id => "666", :title => "satan-album", :photos_count => 6, :photo => "url",
|
14
|
-
# :thumbnail => "url", :slideshow => "url", :summary => "summary"},
|
15
|
-
# {another one} ]
|
16
|
-
|
17
|
-
Picasa.photos(:google_user => 'google_username', :album_id => 'album_id')
|
18
|
-
#=> {:photos => [{ :title, :thumbnail_1, :thumbnail_2, :thumbnail_3, :photo },{}],
|
19
|
-
# :slideshow => "link to picasa slideshow"}
|
20
|
-
|
21
|
-
or you can set google user for all requests like this:
|
22
|
-
|
23
|
-
Picasa.config do |c|
|
24
|
-
c.google_user = 'google.user'
|
25
|
-
end
|
26
|
-
|
27
|
-
and use it:
|
28
|
-
|
29
|
-
Picasa.albums
|
30
|
-
Picasa.photos(:album_id => 'album_id')
|
31
|
-
|
32
|
-
= Copyright
|
33
|
-
|
34
|
-
Copyright (c) 2009 Wojciech Wnętrzak, released under the MIT license.
|