Class: Disqussion::Exports

Inherits:
Client
  • Object
show all
Defined in:
lib/disqussion/client/exports.rb

Instance Method Summary collapse

Methods included from Request

#get, #post

Instance Method Details

#exportForum(*args) ⇒ Hashie::Rash

Export a forum @accessibility: public key, secret key @methods: POST @format: json, jsonp @authenticated: true @limited: false @see: http://disqus.com/api/3.0/exports/exportForum.json

Examples:

Export forum "the88"

Disqussion::Client.exports.exportForum("the88")

Parameters:

  • forum (String)

    Forum short name (aka forum id).

  • options (Hash)

    A customizable set of options.

Returns:

  • (Hashie::Rash)

    Export infos



16
17
18
19
20
21
22
23
24
# File 'lib/disqussion/client/exports.rb', line 16

def exportForum(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  if args.size == 1
    options.merge!(:forum => args[0])
    response = post('exports/exportForum', options)
  else
    puts "#{Kernel.caller.first}: exports.exportForum expects an arguments: forum"
  end
end