https://github.com/dnmfarrell/twitter-queue
https://github.com/dnmfarrell/twitter-queue
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dnmfarrell/twitter-queue
- Owner: dnmfarrell
- License: other
- Created: 2017-06-20T21:59:27.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T13:48:51.000Z (almost 9 years ago)
- Last Synced: 2025-01-16T16:49:19.934Z (over 1 year ago)
- Language: Perl
- Size: 2.93 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.pod
- License: LICENSE
Awesome Lists containing this project
README
=encoding utf8
=head1 NAME
Twitter::Queue - the micro blogging cloud based FIFO queue
=head1 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
}
=head1 METHODS
=head2 new ($args)
Constructor, returns a new C 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 L
an application with Twitter in order to obtain them.
=head2 add ($item)
Adds C<$item> to the queue, C<$item> must be be a string that complies with Twitter's
character counting L.
=head2 next ()
Returns the next item in the queue, removing it from the queue. Returns C
if the queue is empty.
=head1 AUTHOR
E 2017 David Farrell
=head1 LICENSE
The (two-clause) FreeBSD License, see LICENSE.
=cut