XML::Loy::OStatus - OStatus Format Extension
use XML::Loy::Atom; my $atom = XML::Loy::Atom->new('entry'); $atom->extension(-OStatus); $atom->author(name => 'Akron'); $atom->attention('http://sojolicio.us/user/peter'); $atom->conversation('http://sojolicio.us/conv/34'); say $atom->to_pretty_xml; # <?xml version="1.0" encoding="UTF-8" standalone="yes"?> # <entry xmlns="http://www.w3.org/2005/Atom" # xmlns:ostatus="http://ostatus.org/schema/1.0/"> # <author> # <name>Akron</name> # </author> # <link href="http://sojolicio.us/user/peter" # rel="ostatus:attention" /> # <link href="http://sojolicio.us/conv/34" # rel="ostatus:conversation" /> # </entry>
XML::Loy::OStatus is an extension for XML::Loy::Atom and provides several functions for the work with OStatus as described in the specification.
This module is an early release! There may be significant changes in the future.
XML::Loy::OStatus inherits all methods from XML::Loy and implements the following new ones.
attention
$entry->attention('http://sojolicio.us/user/peter'); say $entry->attention;
Add or get attention link.
conversation
$entry->conversation('http://sojolicio.us/conv/34'); say $entry->conversation;
Add or get conversation.
verb_leave
$entry->verb_leave;
Add ostatus leave verb for ActivityStreams. This needs the ActivityStreams extension.
leave
verb_unfavorite
$entry->verb_unfavorite;
Add ostatus unfavorite verb for ActivityStreams. This needs the ActivityStreams extension.
unfavorite
verb_unfollow
$entry->verb_unfollow;
Add ostatus unfollow verb for ActivityStreams. This needs the ActivityStreams extension.
unfollow
Mojolicious.
https://github.com/Akron/XML-Loy
Copyright (C) 2011-2013, Nils Diewald.
This program is free software, you can redistribute it and/or modify it under the same terms as Perl.
To install XML::Loy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XML::Loy
CPAN shell
perl -MCPAN -e shell install XML::Loy
For more information on module installation, please visit the detailed CPAN module installation guide.