NAME

Twitter::Queue - the micro blogging cloud based FIFO queue

SYNOPSIS

use Twitter::Queue;

my $q = Twitter::Queue-new({
  consumer_key        => '311ee384568611e79db19e8',
  consumer_secret     => '3cac5b46568611e79c9c5ad',
  access_token        => '45d89cc0568611e7991c72d',
  access_token_secret => '470dbab2568611e79c5d8ad',
});

$q->add('{"some":"jsondata"}');
...

while (my $item = $q->next) {
  # do something
}

METHODS

new ($args)

Constructor, returns a new Twitter::Queue object.

Requires hashref containing these key values:

consumer_key        => '...',
consumer_secret     => '...',
access_token        => '...',
access_token_secret => '...',
size                => 100, # optional queue size

The Twitter key/secrets come from the Twitter API. You need to register an application with Twitter in order to obtain them.

add ($item)

Adds $item to the queue, $item must be be a string that complies with Twitter's character counting rules.

next ()

Returns the next item in the queue, removing it from the queue. Returns undef if the queue is empty.

AUTHOR

© 2017 David Farrell

LICENSE

The (two-clause) FreeBSD License, see LICENSE.