Class: Disqussion::Forums
- Defined in:
- lib/disqussion/client/forums.rb
Instance Method Summary collapse
-
#create(*args) ⇒ Hashie::Rash
Creates a new forum.
-
#details(*args) ⇒ Hashie::Rash
Returns forum details.
-
#listCategories(*args) ⇒ Hashie::Rash
Returns a list of categories within a forum.
-
#listModerators(*args) ⇒ Hashie::Rash
Returns a list of Moderators for the forum @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: true @limited: false @see: http://disqus.com/api/3.0/forums/listModerators.json.
-
#listMostActiveUsers(*args) ⇒ Hashie::Rash
Returns a list of the most active users for the forum @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listMostActiveUsers.json.
-
#listMostLikedUsers(*args) ⇒ Hashie::Rash
Returns a list of users active within a forum ordered by most likes received.
-
#listPosts(*args) ⇒ Hashie::Rash
Returns a list of posts within a forum.
-
#listThreads(*args) ⇒ Hashie::Rash
Returns a list of threads within a forum.
-
#listUsers(*args) ⇒ Hashie::Rash
Returns a list of users active within a forum.
Methods included from Request
Instance Method Details
#create(*args) ⇒ Hashie::Rash
Creates a new forum. @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: true @limited: false @see: http://disqus.com/api/3.0/forums/create.json
16 17 18 19 20 21 22 23 24 |
# File 'lib/disqussion/client/forums.rb', line 16 def create(*args) = args.last.is_a?(Hash) ? args.pop : {} if args.size == 3 .merge!(:website => args[0], :name => args[1], :short_name => args[2]) response = get('forums/create', ) else puts "#{Kernel.caller.first}: forums.create expects 3 arguments: website, name, short_name" end end |
#details(*args) ⇒ Hashie::Rash
Returns forum details. @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/details.json
37 38 39 40 41 |
# File 'lib/disqussion/client/forums.rb', line 37 def details(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/details', ) end |
#listCategories(*args) ⇒ Hashie::Rash
Returns a list of categories within a forum. @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listCategories.json
59 60 61 62 63 |
# File 'lib/disqussion/client/forums.rb', line 59 def listCategories(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listCategories', ) end |
#listModerators(*args) ⇒ Hashie::Rash
Returns a list of Moderators for the forum @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: true @limited: false @see: http://disqus.com/api/3.0/forums/listModerators.json
76 77 78 79 80 |
# File 'lib/disqussion/client/forums.rb', line 76 def listModerators(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listModerators', ) end |
#listMostActiveUsers(*args) ⇒ Hashie::Rash
Returns a list of the most active users for the forum @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listMostActiveUsers.json
97 98 99 100 101 |
# File 'lib/disqussion/client/forums.rb', line 97 def listMostActiveUsers(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listMostActiveUsers', ) end |
#listMostLikedUsers(*args) ⇒ Hashie::Rash
Returns a list of users active within a forum ordered by most likes received. @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listMostLikedUsers.json
119 120 121 122 123 |
# File 'lib/disqussion/client/forums.rb', line 119 def listMostLikedUsers(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listMostLikedUsers', ) end |
#listPosts(*args) ⇒ Hashie::Rash
Returns a list of posts within a forum. @accessibility: public key, secret key @methods: GET @format: json, jsonp, rss @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listPosts.json
144 145 146 147 148 |
# File 'lib/disqussion/client/forums.rb', line 144 def listPosts(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listPosts', ) end |
#listThreads(*args) ⇒ Hashie::Rash
Returns a list of threads within a forum. @accessibility: public key, secret key @methods: GET @format: json, jsonp, rss @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listThreads.json
169 170 171 172 173 |
# File 'lib/disqussion/client/forums.rb', line 169 def listThreads(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listThreads', ) end |
#listUsers(*args) ⇒ Hashie::Rash
Returns a list of users active within a forum. @accessibility: public key, secret key @methods: GET @format: json, jsonp @authenticated: false @limited: false @see: http://disqus.com/api/3.0/forums/listUsers.json
191 192 193 194 195 |
# File 'lib/disqussion/client/forums.rb', line 191 def listUsers(*args) = args.last.is_a?(Hash) ? args.pop : {} [:forum] = args.first response = get('forums/listUsers', ) end |