| | 103 | =item B<recent_changes> |
| | 104 | |
| | 105 | Build an Atom Feed of the recent changes to the Wiki::Toolkit instance, |
| | 106 | using any supplied parameters to narrow the results. |
| | 107 | |
| | 108 | If the argument "also_return_timestamp" is supplied, it will return an |
| | 109 | array of the feed, and the feed timestamp. Otherwise it just returns the feed. |
| | 110 | |
| | 111 | =cut |
| | 112 | sub recent_changes |
| | 113 | { |
| | 114 | my ($self, %args) = @_; |
| | 115 | |
| | 116 | my @changes = $self->fetch_recently_changed_nodes(%args); |
| | 117 | my $feed_timestamp = $self->feed_timestamp( |
| | 118 | $self->fetch_newest_for_recently_changed(%args) |
| | 119 | ); |
| | 120 | |
| | 121 | my $feed = $self->generate_node_list_feed($feed_timestamp, @changes); |
| | 122 | |
| | 123 | if($args{'also_return_timestamp'}) { |
| | 124 | return ($feed,$feed_timestamp); |
| | 125 | } else { |
| | 126 | return $feed; |
| | 127 | } |
| | 128 | } |
| | 129 | |
| | 130 | |
| | 131 | =item B<node_all_versions> |
| | 132 | |
| | 133 | Build an Atom Feed of all the different versions of a given node. |
| | 134 | |
| | 135 | If the argument "also_return_timestamp" is supplied, it will return an |
| | 136 | array of the feed, and the feed timestamp. Otherwise it just returns the feed. |
| | 137 | |
| | 138 | =cut |
| | 139 | sub node_all_versions |
| | 140 | { |
| | 141 | my ($self, %args) = @_; |
| | 142 | |
| | 143 | my @all_versions = $self->fetch_node_all_versions(%args); |
| | 144 | my $feed_timestamp = $self->feed_timestamp( $all_versions[0] ); |
| | 145 | |
| | 146 | my $feed = $self->generate_node_list_feed($feed_timestamp, @all_versions); |
| | 147 | |
| | 148 | if($args{'also_return_timestamp'}) { |
| | 149 | return ($feed,$feed_timestamp); |
| | 150 | } else { |
| | 151 | return $feed; |
| | 152 | } |
| | 153 | } |
| | 154 | |
| | 155 | |
| | 156 | |