Module: Hotchoc::Client::API

Included in:
Hotchoc::Client
Defined in:
lib/hotchoc/client/api.rb

Instance Method Summary collapse

Instance Method Details

#get_albums(opts = {}) ⇒ Object



4
5
6
# File 'lib/hotchoc/client/api.rb', line 4

def get_albums(opts = {})
  get('albums', opts).map { |album| Hotchoc::Album.new(album) }
end

#get_pages(opts = {}) ⇒ Object



8
9
10
# File 'lib/hotchoc/client/api.rb', line 8

def get_pages(opts = {})
  get('pages', opts).map { |page| Hotchoc::Page.new(page) }
end

#get_posts(opts = {}) ⇒ Object



12
13
14
# File 'lib/hotchoc/client/api.rb', line 12

def get_posts(opts = {})
  get('posts', opts).map { |post| Hotchoc::Post.new(post) }
end

#get_topics(opts = {}) ⇒ Object



16
17
18
# File 'lib/hotchoc/client/api.rb', line 16

def get_topics(opts = {})
  get('topics', opts).map { |topic| Hotchoc::Topic.new(topic) }
end