Sha256: c6569b34b85d818109c02d9dbae83c613c0e56b6d4dd870a3fef533d0f84b38e

Contents?: true

Size: 431 Bytes

Versions: 2

Compression:

Stored size: 431 Bytes

Contents

require "picasa"

# upload photo
client = Picasa::Client.new(user_id: "your-gmail-account@gmail.com", access_token: "oauth-access-token")

photo_bin = File.binread("./test.jpg")

albums = client.album.list.entries
album = albums.find { |album| album.title == "New Album" }

client.photo.create(album.id,
  {
    :binary => photo_bin,
    :content_type => "image/jpeg",
    :title => "Test Photo",
    :summary => "Hoge hoge"
  }
)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
picasa-0.9.1 examples/upload_photo.rb
picasa-0.9.0 examples/upload_photo.rb