Net::Gnip::FilterStream - represent a list of Gnip Filters


Net-Gnip documentation Contained in the Net-Gnip distribution.

Index


Code Index:

NAME

Top

Net::Gnip::FilterStream - represent a list of Gnip Filters

SYNOPIS

Top



    # Create a new stream    
    my $stream = Net::Gnip::FilterStream->new();

    # ... or parse from XML
    my $stream = Net::Gnip::FilterStream->parse($xml);

    # set the filters
    $stream->filters(@filters);

    # get the filters 
    my @filters = $stream->filters;

    # or use an iterator
    while (my $filter = $stream->next) {
        print $filter->name;
    }

    $stream->reset;

    # ... now you can use it again
    while (my $filter = $stream->next) {
        print $filter->name;
    }




METHODS

Top

new

Create a new, empty stream

filters [filter[s]]

Get or set the filters


Net-Gnip documentation Contained in the Net-Gnip distribution.
package Net::Gnip::FilterStream;

use strict;
use base qw(Net::Gnip::BaseStream);
use Net::Gnip::Filter;

sub filters {
    my $self = shift;
    return $self->children(@_);
}

sub _child_name { 'filter' }

sub _elem_name  { 'filters' }
1;