Class: Disqussion::Reactions

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

Instance Method Summary collapse

Methods included from Request

#get, #post

Instance Method Details

#details(*args) ⇒ Hashie::Rash

Returns reaction details @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/reactions/details.json

Examples:

Message for post ID 12345678

Disqussion::Client.reactions.detail(12345678,"Hello")

Parameters:

  • reaction (Integer)

    Looks up a reaction by ID.

  • forum (String)

    Looks up a forum by ID (aka shortname).

Returns:

  • (Hashie::Rash)

    Reaction of the forum.



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

def details(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  if args.length == 2
    options.merge!(:reaction => args[0])
    options.merge!(:forum => args[1])
    response = get('reactions/details', options)
  else
    puts "#{Kernel.caller.first}: Reactions.details expects 2 arguments: reaction and forum"
  end
end

#domains(*args) ⇒ Hashie::Rash

Returns ?? @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/posts/domains.json

Examples:

Return ??

Disqussion::Client.reactions.domains

Parameters:

  • options (Hash)

    A customizable set of options.

Returns:

  • (Hashie::Rash)

    Returns ??



41
42
43
44
# File 'lib/disqussion/client/reactions.rb', line 41

def domains(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get('reactions/domains', options)
end

#ips(*args) ⇒ Hashie::Rash

Returns ?? @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/posts/ips.json

Examples:

Return ??

Disqussion::Client.reactions.ips

Parameters:

  • options (Hash)

    A customizable set of options.

Returns:

  • (Hashie::Rash)

    Returns ??



60
61
62
63
# File 'lib/disqussion/client/reactions.rb', line 60

def ips(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get('reactions/ips', options)
end

#list(*args) ⇒ Hashie::Rash

Returns a list of reactions @accessibility: public key, secret key @methods: POST,GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/reactions/details.json

Examples:

Message for post ID 12345678

Disqussion::Client.reactions.detail(12345678,"Hello")

Parameters:

  • forum (String)

    Looks up a forum by ID (aka shortname).

  • options (Hash)

    a customizable set of options

Returns:

  • (Hashie::Rash)

    Reaction of the forum.



81
82
83
84
85
# File 'lib/disqussion/client/reactions.rb', line 81

def list(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  options[:forum] = args.first
  response = get('reactions/list', options)
end

#threads(*args) ⇒ Hashie::Rash

Returns ?? @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/posts/threads.json

Examples:

Return ??

Disqussion::Client.reactions.threads

Parameters:

  • options (Hash)

    A customizable set of options.

Returns:

  • (Hashie::Rash)

    Returns ??



101
102
103
104
# File 'lib/disqussion/client/reactions.rb', line 101

def threads(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get('reactions/threads', options)
end

#users(*args) ⇒ Hashie::Rash

Returns ?? @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/posts/users.json

Examples:

Return ??

Disqussion::Client.reactions.users

Parameters:

  • options (Hash)

    A customizable set of options.

Returns:

  • (Hashie::Rash)

    Returns ??



120
121
122
123
# File 'lib/disqussion/client/reactions.rb', line 120

def users(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = get('reactions/users', options)
end