Permalink
Browse files

Release notes for 1.0.2

  • Loading branch information...
1 parent cb51ced commit 30500a7f8b928d130e61b6d7ca51c444d4f2fc71 @nbudin nbudin committed Oct 5, 2009
Showing with 12 additions and 7 deletions.
  1. +5 −0 History.txt
  2. +7 −7 lib/disqus/api.rb
View
@@ -1,3 +1,8 @@
+== 1.0.2 2009-10-05
+ 2 bug fixes:
+ * The Disqus::API.post method now returns the response body rather than the response object (Nat Budin)
+ * Disqus::API.create_post now complies with DISQUS's API requirements (Nat Budin)
+
== 1.0.1 2009-01-19
2 minor enhancements:
* Improve docs (Quin Hoxie)
View
@@ -64,17 +64,17 @@ class << self
# * <tt>:ip_address</tt> - the author's IP address
def create_post(opts = {})
opts[:api_key] ||= Disqus::defaults[:api_key]
- JSON.parse(post('create_post/',
+ post_data = {
:forum_api_key => opts[:forum_api_key],
:thread_id => opts[:thread_id],
:message => opts[:message],
:author_name => opts[:author_name],
- :author_email => opts[:author_email],
- :parent_post => opts[:parent_post],
- :created_at => opts[:created_at], #UTC timestring, format: %Y-%m-%dT%H:%M
- :author_url => opts[:author_url],
- :ip_address => opts[:ip_address])
- )
+ :author_email => opts[:author_email]
+ }
+ [:parent_post, :created_at, :author_url, :ip_address].each do |key|
+ post_data[key] = opts[key] if opts[key]
+ end
+ JSON.parse(post('create_post/', post_data))
end
# Returns an array of hashes representing all forums the user owns. The

0 comments on commit 30500a7

Please sign in to comment.