Class: ImgurUploader

Inherits:
Object
  • Object
show all
Defined in:
lib/captured/uploaders/imgur_uploader.rb

Constant Summary collapse

API_KEY =
"f4fa5e1e9974405c62117a8a84fbde46"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#urlObject

Returns the value of attribute url.



4
5
6
# File 'lib/captured/uploaders/imgur_uploader.rb', line 4

def url
  @url
end

Instance Method Details

#upload(file) ⇒ Object



7
8
9
10
# File 'lib/captured/uploaders/imgur_uploader.rb', line 7

def upload(file)
  puts "Uploading #{file}"
  @url = Imgur::API.new('f4fa5e1e9974405c62117a8a84fbde46').upload_file(file)["imgur_page"]
end