class Piwigo::Images::Image

Attributes

categories[RW]

@return [<Type>] List of all of the Albums this image is in

comment[RW]

@return [String] Comments about the image

date_available[RW]

@return [DateTime] DateTime when the image was uploaded to Piwigo

date_creation[RW]

@return [DateTime] DateTime when the image was taken

derivatives[RW]

@return [Array<String>] Links to different sizes of the image

element_url[RW]

@return [String] URL to the image itself

file[RW]

@return [String] Filename for the image

height[RW]

@return [Number] Height of the image in pixels

hit[RW]

@return [Number] Number of times the image has been viewed

id[RW]

@return [Number] Unique ID idenifying this ie

name[RW]

@return [String] Name of the image

page_url[RW]

@return [String] URL to the image page

width[RW]

@return [Number] Width of the image in pixels

Public Class Methods

new(hash: nil) click to toggle source
# File lib/piwigo/images.rb, line 53
def initialize(hash: nil)
  hash&.each do |key, value|
    # Bug: If the encoding is Windows-1252, then Piwigo will blowup when creating the album
    value = value.encode('UTF-8', 'Windows-1252') if value.class == String && value.encoding.to_s == 'Windows-1252'
    send("#{key}=", value)
  end
end