changelog_bot (changelog_bot) wrote in changelog,
changelog_bot
changelog_bot
changelog

[ljcom] r6977: LJSUP-2276: Events Atom Stream

Committer: ssafronova
LJSUP-2276: Events Atom Stream

A   trunk/cgi-bin/LJ/EventsFeed/EmailChanged.pm
A   trunk/cgi-bin/LJ/EventsFeed/UserUnDeleted.pm
Added: trunk/cgi-bin/LJ/EventsFeed/EmailChanged.pm
===================================================================
--- trunk/cgi-bin/LJ/EventsFeed/EmailChanged.pm	                        (rev 0)
+++ trunk/cgi-bin/LJ/EventsFeed/EmailChanged.pm	2009-01-14 10:52:29 UTC (rev 6977)
@@ -0,0 +1,26 @@
+package LJ::EventsFeed::EmailChanged;
+
+use strict;
+use base 'LJ::EventsFeed';
+use Carp qw (croak);
+
+sub new {
+    my ($class, $u) = @_;
+
+    croak "Must pass an LJ::User" unless LJ::isu($u);
+
+    return $class->SUPER::new(
+                              userid    => $u->userid,
+                              userlogin => $u->user,
+                             );
+}
+
+sub as_xml {
+    my $self = shift;
+    my $params = $self->params;
+
+    return $self->xml_head('email_changed') . "<user id='$params->{'userid'}' login='$params->{'userlogin'}'/>"
+           . $self->xml_footer;
+}
+
+1;

Added: trunk/cgi-bin/LJ/EventsFeed/UserUnDeleted.pm
===================================================================
--- trunk/cgi-bin/LJ/EventsFeed/UserUnDeleted.pm	                        (rev 0)
+++ trunk/cgi-bin/LJ/EventsFeed/UserUnDeleted.pm	2009-01-14 10:52:29 UTC (rev 6977)
@@ -0,0 +1,28 @@
+package LJ::EventsFeed::UserUnDeleted;
+
+use strict;
+use base 'LJ::EventsFeed';
+use Carp qw (croak);
+
+sub new {
+    my ($class, $u) = @_;
+
+    croak "Must pass an LJ::User" unless LJ::isu($u);
+
+    return $class->SUPER::new(
+                              id    => $u->userid,
+                              login => $u->user,
+                              type  => $u->journaltype,
+                              caps  => $u->caps,
+                             );
+}
+
+sub as_xml {
+    my $self = shift;
+    my $params = $self->params;
+
+    return $self->xml_head('undeleted') . "<user id='$params->{'id'}' login='$params->{'login'}'"
+           . " type='$params->{'type'}' caps='$params->{'caps'}'/>" . $self->xml_footer;
+}
+
+1;

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments