2011/06/01

Plurk - API 異動

5/19 Plurk 的 /Timeline/getPlurks 回傳內容變更,WWW::Plurk 需要調整如下:

--- Plurk.pm..0.02.3 2010-01-14 10:13:38.000000000 +0800
+++ Plurk.pm 2011-06-01 21:20:55.000000000 +0800
@@ -595,8 +595,20 @@
         }
     );

+    my $plurks = [];
+    if($reply)
+    {
+        if(defined $reply->{'plurks'})
+        {
+            $plurks = $reply->{'plurks'};
+        }
+        else
+        {
+            $plurks = $reply;
+        }
+    }
     return
-      map { WWW::Plurk::Message->new( $self, $_ ) } @{ $reply || [] };
+      map { WWW::Plurk::Message->new( $self, $_ ) } @{ $plurks };
 }

 =head2 C<< unread_plurks >>
© 年年歲歲花相似
Maira Gall