Footprintless-Plugin-Atlassian-Confluence
view release on metacpan or search on metacpan
docs/Footprintless-Plugin-Atlassian-Confluence-Client.html view on Meta::CPAN
color: #006699;
font-size: medium;
font-style: italic;
}
.pod H4 {
background: transparent;
color: #006699;
font-size: medium;
font-weight: normal;
}
.pod IMG {
vertical-align: top;
}
.pod .toc A {
text-decoration: none;
}
.pod .toc LI {
line-height: 1.2em;
list-style-type: none;
}
/*]]>*/-->
</style>
</head>
<body class='pod'>
<!--
generated by Pod::Simple::HTML v3.32,
using Pod::Simple::PullParser v3.32,
under Perl v5.025000 at Mon Dec 18 21:19:28 2017 GMT.
If you want to change this HTML document, you probably shouldn't do that
by changing it directly. Instead, see about changing the calling options
to Pod::Simple::HTML, and/or subclassing Pod::Simple::HTML,
then reconverting this document from the Pod source.
When in doubt, email the author of Pod::Simple::HTML for advice.
See 'perldoc Pod::Simple::HTML' for more info.
-->
<!-- start doc -->
<a name='___top' class='dummyTopAnchor' ></a>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#VERSION'>VERSION</a>
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<li class='indexItem indexItem1'><a href='#CONSTRUCTORS'>CONSTRUCTORS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#new(%25options)'>new(%options)</a>
</ul>
<li class='indexItem indexItem1'><a href='#METHODS'>METHODS</a>
<ul class='indexList indexList2'>
<li class='indexItem indexItem2'><a href='#request(%24endpoint%2C_%5C%40args%2C_%25response_options)'>request($endpoint, \@args, %response_options)</a>
<li class='indexItem indexItem2'><a href='#request_all(%24endpoint%2C_%5C%40args%2C_%25response_options)'>request_all($endpoint, \@args, %response_options)</a>
</ul>
<li class='indexItem indexItem1'><a href='#AUTHOR'>AUTHOR</a>
<li class='indexItem indexItem1'><a href='#COPYRIGHT_AND_LICENSE'>COPYRIGHT AND LICENSE</a>
<li class='indexItem indexItem1'><a href='#SEE_ALSO'>SEE ALSO</a>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>Footprintless::Plugin::Atlassian::Confluence::Client - A REST client for Atlassian Confluence</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="VERSION"
>VERSION</a></h1>
<p>version 1.03</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>
<pre> 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};</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>This module provides a client for the <a href="https://docs.atlassian.com/atlassian-confluence/REST/latest-server/" class="podlinkurl"
>Atlassian Confluence REST API</a> in the form of a <a href="http://search.cpan.org/perldoc?Footprintless%3A%3APlugin" class="podlinkpod"
>Footprintless plugin</a>.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="CONSTRUCTORS"
>CONSTRUCTORS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="new(%options)"
>new(%options)</a></h2>
<p>Constructs a new confluence client. The availble options are:</p>
<dl>
<dt><a name="agent"
>agent</a></dt>
<dd>
<p>An <a href="http://search.cpan.org/perldoc?LWP%3A%3AUserAgent" class="podlinkpod"
>LWP::UserAgent</a> instance. Defaults to a new agent returned by <a href="http://search.cpan.org/perldoc?%24footprintless-" class="podlinkpod"
>$footprintless-</a>agent()|Footprintless/agent(%options)>.</p>
<dt><a name="request_builder_module"
>request_builder_module</a></dt>
<dd>
<p>A module that implements request building methods. Defaults to <a href="http://search.cpan.org/perldoc?Fooptrintless%3A%3APlugin%3A%3AAtlassian%3A%3AConfluence%3A%3ARequestBuilder" class="podlinkpod"
>Fooptrintless::Plugin::Atlassian::Confluence::RequestBuilder</a>.</p>
<dt><a name="response_parser_module"
>response_parser_module</a></dt>
<dd>
<p>A module that implements response parsing methods. Defaults to <a href="http://search.cpan.org/perldoc?Fooptrintless%3A%3APlugin%3A%3AAtlassian%3A%3AConfluence%3A%3AResponseParser" class="podlinkpod"
>Fooptrintless::Plugin::Atlassian::Confluence::ResponseParser</a>.</p>
</dd>
</dl>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="METHODS"
>METHODS</a></h1>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="request($endpoint,_\@args,_%response_options)"
>request($endpoint, \@args, %response_options)</a></h2>
<p>Generates a request by calling a method named <code>$endpoint</code> on the request builder, supplying it with <code>@args</code>. The request is sent using the agent, and the response is parsed by calling a method named <code>$endpoint</code> on ...
<h2><a class='u' href='#___top' title='click to go to top of document'
name="request_all($endpoint,_\@args,_%response_options)"
>request_all($endpoint, \@args, %response_options)</a></h2>
<p>Same as <a href="http://search.cpan.org/perldoc?request#request(%24endpoint%2C_%5C%40args%2C_%25response_options)" class="podlinkpod"
>"request($endpoint, \@args, %response_options)" in request</a> except that it will loop through <i>all</i> pages until all results have been returned. This method assumes that the last argument to request builder will be an options hash that...
<h1><a class='u' href='#___top' title='click to go to top of document'
name="AUTHOR"
>AUTHOR</a></h1>
<p>Lucas Theisen <lucastheisen@pastdev.com></p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="COPYRIGHT_AND_LICENSE"
>COPYRIGHT AND LICENSE</a></h1>
<p>This software is copyright (c) 2016 by Lucas Theisen.</p>
<p>This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SEE_ALSO"
>SEE ALSO</a></h1>
<p>Please see those modules/websites for more information related to this module.</p>
<ul>
<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3APlugin%3A%3AAtlassian%3A%3AConfluence" class="podlinkpod"
>Footprintless::Plugin::Atlassian::Confluence</a></li>
<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3APlugin%3A%3AAtlassian%3A%3AConfluence" class="podlinkpod"
>Footprintless::Plugin::Atlassian::Confluence</a></li>
<li><a href="http://search.cpan.org/perldoc?Footprintless%3A%3APlugin%3A%3AAtlassian%3A%3AConfluence%3A%3AClient" class="podlinkpod"
>Footprintless::Plugin::Atlassian::Confluence::Client</a></li>
<li><a href="https://docs.atlassian.com/atlassian-confluence/REST/latest-server" class="podlinkurl"
>https://docs.atlassian.com/atlassian-confluence/REST/latest-server</a></li>
</ul>
<!-- end doc -->
</body></html>
( run in 0.610 second using v1.01-cache-2.11-cpan-39bf76dae61 )