Class: Imgur::Client::Accounts

Inherits:
Cistern::Collection
  • Object
show all
Includes:
Imgur::Collection, PagedCollection
Defined in:
lib/imgur/models/accounts.rb

Instance Method Summary collapse

Methods included from Imgur::Collection

#get, included, #model_request, #model_root

Methods included from PagedCollection

#==, #collection_request, #collection_root, included, #last_page, #next_page, #previous_page

Instance Method Details

#all(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/imgur/models/accounts.rb', line 13

def all(options={})
  path = "/account/me"

  data = connection.get_accounts(path: path).body["data"]
  connection.accounts.load([data])
end