Footprintless::Plugin::Atlassian::Confluence::Client - A REST client for Atlassian Confluence
version 1.00
use Footprintless; use Footprintless::Util qw( dumper factory ); use Log::Any; my $logger = Log::Any->get_logger(); # Obtain a client from footprintless as a plugin: my $client = $footprintless->confluence_client('proj.env.confluence'); # Or create one as a standalone: my $client = Footprintless::Plugin::Atlassian::Confluence::Client ->new( factory({ foo => { prod => { confluence => { automation => { password => 'pa$$w0rd', username => 'automation', }, web => { https => 1, hostname => 'wiki.pastdev.com', context_path => 'confluence', } } } } }), 'foo.prod.confluence'); # Now make a request: my $response = $client->request('get_content', [spaceKey => 'FPAC', title => 'API']); die($logger->errorf('couldn\'t find page API: %s', dumper($response))) unless ($response->{success}); my $api_page_id = $response->{content}{results}[0]{id};
This module provides a client for the Atlassian Confluence REST API in the form of a Footprintless plugin.
Constructs a new confluence client. The availble options are:
An LWP::UserAgent instance. Defaults to a new agent returned by $footprintless-agent()|Footprintless/agent(%options)>.
A module that implements request building methods. Defaults to Fooptrintless::Plugin::Atlassian::Confluence::RequestBuilder.
A module that implements response parsing methods. Defaults to Fooptrintless::Plugin::Atlassian::Confluence::ResponseParser.
Generates a request by calling a method named $endpoint
on the request builder, supplying it with @args
. The request is sent using the agent, and the response is parsed by calling a method named $endpoint
on the response parser, supplying it with %response_options
.
Lucas Theisen <lucastheisen@pastdev.com>
This software is copyright (c) 2016 by Lucas Theisen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please see those modules/websites for more information related to this module.