lib/yandex_cleanweb.rb in yandex_cleanweb-0.0.2 vs lib/yandex_cleanweb.rb in yandex_cleanweb-0.0.3
- old
+ new
@@ -77,18 +77,17 @@
Net::HTTP.get(uri)
end
def api_check_spam(*options)
cleanweb_options = {}
+ cleanweb_options["key"] = api_key
- if options[0].is_a?(String) # quick check
- cleanweb_options[:body_plain] = options[0]
+ if options[0][0].is_a?(String) # fast check
+ cleanweb_options["body-plain"] = options[0][0]
else
options = options[0][0]
cleanweb_options.merge!({
- "key" => api_key,
-
"body-plain" => options[:body_plain],
"body-html" => options[:body_html],
"body-bbcode" => options[:body_bbcode],
"subject-html" => options[:subject_html],