Bruce 的玩具間

my works and notes on ruby, rails, git, ubuntu linux, mac os x, etc...

kates's ruby plurk lib 'add_all_as_friends' method doesn't work?

| Comments

正體中文版在此 (Traditional Chinese version is here)

kates's ruby plurk lib is a nice plurk lib for ruby. But I notice that the 'add_all_as_friends' method doesn't work and always throws an exception (API call return an error message page and JSON parse failed)

Add following code before you new a Plurk::Client

    module Plurk  
     class Client  
     ENDPOINTS[:add_all_as_friends] = {:path=>"/API/Alerts/addAllAsFriends", :login_required=>true}  
     end  
    end  

This is because that the API path is /API/Alerts/addAllAsFriend*s* not /API/Alerts/addAllAsFriend. The code shows that they amiss lost the ending 's'. And I will contact them to fix this.

Comments

comments powered by Disqus