Class: Disqussed::Posts

Inherits:
Object
  • Object
show all
Defined in:
lib/disqussed/posts.rb

Constant Summary collapse

ENDPOINT =
'posts'

Class Method Summary collapse

Class Method Details

.create(message = nil, opts = {}, user = {}) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/disqussed/posts.rb', line 6

def create(message = nil, opts = {}, user = {})
  opts[:message] = message

  opts.slice!(:thread, :author_email, :author_name, :message, :forum)

  Disqussed::Api.request('post', ENDPOINT, 'create', opts, false, user)
end

.list(opts = {}) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/disqussed/posts.rb', line 14

def list(opts = {})
  opts.slice!(:category, :thread, :forum, :since,
    :related, :limit, :offset, :include, :order
  )

  Disqussed::Api.request('get', ENDPOINT, 'list', opts, false)
end