Sha256: c70ccd8aeb4cb2a9e35dd89a366d67986268bf129f3f693927f07ebc1c5585d7

Contents?: true

Size: 528 Bytes

Versions: 19

Compression:

Stored size: 528 Bytes

Contents

require "picasa"

# add tags to your photos in an album.
begin
  client = Picasa::Client.new(:user_id => "your_gmail_account", :password => "password")
  albums = client.album.list.entries
  album = albums.find { |album| album.title == "New Album" }

  photos = client.album.show(album.id).entries

  photos.each do |photo|
    client.tag.create(
        :album_id => album.id,
        :photo_id => photo.id,
        :tag_name => "test")
  end

rescue Picasa::ForbiddenError
  puts "You have the wrong user_id or password."
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
picasa-0.8.0 examples/add_tags_to_photo.rb
picasa-0.7.5 examples/add_tags_to_photo.rb
picasa-0.7.4 examples/add_tags_to_photo.rb
picasa-0.7.3 examples/add_tags_to_photo.rb
picasa-0.7.2 examples/add_tags_to_photo.rb
picasa-0.7.1 examples/add_tags_to_photo.rb
picasa-0.7.0 examples/add_tags_to_photo.rb
picasa-0.6.7 examples/add_tags_to_photo.rb
picasa-0.6.6 examples/add_tags_to_photo.rb
picasa-0.6.5 examples/add_tags_to_photo.rb
picasa-0.6.4 examples/add_tags_to_photo.rb
picasa-0.6.3 examples/add_tags_to_photo.rb
picasa-0.6.2 examples/add_tags_to_photo.rb
picasa-0.6.1 examples/add_tags_to_photo.rb
picasa-0.6.0 examples/add_tags_to_photo.rb
picasa-0.5.4 examples/add_tags_to_photo.rb
picasa-0.5.3 examples/add_tags_to_photo.rb
picasa-0.5.2 example/add_tags_to_photo.rb
picasa-0.5.1 example/add_tags_to_photo.rb