Class: Imgurapi::Api::Account

Inherits:
Base
  • Object
show all
Defined in:
lib/imgurapi/api/account.rb

Instance Attribute Summary

Attributes inherited from Base

#session

Instance Method Summary collapse

Methods inherited from Base

#communication

Instance Method Details

#accountObject



6
7
8
# File 'lib/imgurapi/api/account.rb', line 6

def 
  Imgurapi::Account.new communication.call(:get, 'account/me')
end

#image_countObject



18
19
20
# File 'lib/imgurapi/api/account.rb', line 18

def image_count
  communication.call(:get, 'account/me/images/count')
end

#images(page = 0) ⇒ Object



11
12
13
14
15
# File 'lib/imgurapi/api/account.rb', line 11

def images(page = 0)
  communication.call(:get, "account/me/images/#{page}").map do |image|
    Imgurapi::Image.new image
  end
end