NAME
Plack::App::PubSubHubbub::Subscriber::Client
SYNOPSIS
my $client = Plack::App::PubSubHubbub::Subscriber::Client(
config => $conf,
);
my $result = $client->subscribe( $hub, $topic, $token );
...
$class->new( config => $conf )
Take a Plack::App::PubSubHubbub::Subscriber::Client object as parmeter, ideally the same config used for the Plack App.
$self->ua( $user_agent )
Can be used to set the user agent, by default return an LWP::UserAgent object.
$self->subscribe_request( $hub, $feed, $token )
Prepare and return the subscribe request (HTTP::Request object) Note that it does not run the request, this is useful if you want to run the request yourself, in an event loop client for example.
$self->subscribe( $hub, $feed, $token )
Build the request using 'subscribe_request' and run it. Return { success => 'verified' } if the subscription is active. Return { success => 'tobeverified' } in case of async verification. Return { error => $msg } in case of error.
$self->unsubscribe_request( $hub, $feed, $token )
Same as subscribe_request but for unsubscribe.
$self->unsubscribe( $hub, $feed, $token )
Same as subscribe but for unsubscribe.