| | 14 | |
| | 15 | =item B<fetch_recently_changed_nodes> |
| | 16 | |
| | 17 | Based on the supplied criteria, fetch a list of the recently changed nodes |
| | 18 | |
| | 19 | =cut |
| | 20 | sub fetch_recently_changed_nodes { |
| | 21 | my ($self, %args) = @_; |
| | 22 | |
| | 23 | my $wiki = $self->{wiki}; |
| | 24 | |
| | 25 | my %criteria = ( |
| | 26 | ignore_case => 1, |
| | 27 | ); |
| | 28 | |
| | 29 | # If we're not passed any parameters to limit the items returned, |
| | 30 | # default to 15. |
| | 31 | $args{days} ? $criteria{days} = $args{days} |
| | 32 | : $criteria{last_n_changes} = $args{items} || 15; |
| | 33 | |
| | 34 | $criteria{metadata_wasnt} = { major_change => 0 } if $args{ignore_minor_edits}; |
| | 35 | $criteria{metadata_was} = $args{filter_on_metadata} if $args{filter_on_metadata}; |
| | 36 | |
| | 37 | my @changes = $wiki->list_recent_changes(%criteria); |
| | 38 | |
| | 39 | return @changes; |
| | 40 | } |
| | 41 | |
| | 42 | =item B<fetch_oldest_for_recently_changed> |
| | 43 | |
| | 44 | Based on the supplied criteria (but not using all of those used by |
| | 45 | B<fetch_recently_changed_nodes>), find the oldest node from the recently |
| | 46 | changed nodes set. Normally used for dating the whole of a Feed. |
| | 47 | |
| | 48 | =cut |
| | 49 | |