| 51 | | } |
| 52 | | |
| 53 | | =item B<recent_changes> |
| 54 | | |
| 55 | | Build an RSS Feed of the recent changes to the Wiki::Toolkit instance, |
| 56 | | using any supplied parameters to narrow the results. |
| 57 | | |
| 58 | | If the argument "also_return_timestamp" is supplied, it will return an |
| 59 | | array of the feed, and the feed timestamp. Otherwise it just returns the feed. |
| 60 | | |
| 61 | | =cut |
| 62 | | sub recent_changes |
| 63 | | { |
| 64 | | my ($self, %args) = @_; |
| 65 | | |
| 66 | | my @changes = $self->fetch_recently_changed_nodes(%args); |
| 67 | | my $feed_timestamp = $self->feed_timestamp( |
| 68 | | $self->fetch_newest_for_recently_changed(%args) |
| 69 | | ); |
| 70 | | |
| 71 | | my $feed = $self->generate_node_list_feed($feed_timestamp, @changes); |
| 72 | | |
| 73 | | if($args{'also_return_timestamp'}) { |
| 74 | | return ($feed,$feed_timestamp); |
| 75 | | } else { |
| 76 | | return $feed; |
| 77 | | } |
| 78 | | } |
| 79 | | |
| 80 | | |
| 81 | | =item B<node_all_versions> |
| 82 | | |
| 83 | | Build an RSS Feed of all the different versions of a given node. |
| 84 | | |
| 85 | | If the argument "also_return_timestamp" is supplied, it will return an |
| 86 | | array of the feed, and the feed timestamp. Otherwise it just returns the feed. |
| 87 | | |
| 88 | | =cut |
| 89 | | sub node_all_versions |
| 90 | | { |
| 91 | | my ($self, %args) = @_; |
| 92 | | |
| 93 | | my @all_versions = $self->fetch_node_all_versions(%args); |
| 94 | | my $feed_timestamp = $self->feed_timestamp( $all_versions[0] ); |
| 95 | | |
| 96 | | my $feed = $self->generate_node_list_feed($feed_timestamp, @all_versions); |
| 97 | | |
| 98 | | if($args{'also_return_timestamp'}) { |
| 99 | | return ($feed,$feed_timestamp); |
| 100 | | } else { |
| 101 | | return $feed; |
| 102 | | } |