NAME
Net::Gnip::BaseStream - represent a list of Gnip objects
SYNOPIS
# Create a new stream
my $stream = Net::Gnip::BaseStream->new();
# ... or parse from XML
my $stream = Net::Gnip::BaseStream->parse($xml);
# assume that the subclass of BaseStream
# has children named foo
# set the foos
$stream->foos(@foos);
# get the filters
my @foos = $stream->foos;
# or use an iterator
while (my $foo = $stream->next) {
print $foo->name;
}
$stream->reset;
# ... now you can use it again
while (my $foo = $stream->foo) {
print $foo->name;
}
METHODS
new
Create a new, empty stream
children [child[ren]]
Get or set the children
parse <xml>
Takes a string of XML, parses it and returns a new, potentially populated FilterStream
next
Returns the next Child object
reset
Resets the iterator
as_xml
Return this stream as xml