Method: IMGSrc::API#initialize

Defined in:
lib/imgsrc.rb

#initialize(user, passwd_md5) ⇒ API

Returns a new instance of API.



97
98
99
100
101
102
103
104
105
# File 'lib/imgsrc.rb', line 97

def initialize(user, passwd_md5)
    @username   = user
    @Login      = { :login => @username, :passwd => passwd_md5 }
    @storage    = nil           # hostname of imgsrc storge server
    @stor_conn  = nil           # http-connection to storage host
    @albums     = []

    Dir.mkdir( CACHE_DIR ) unless File.directory?( CACHE_DIR )
end