Footprintless-Plugin-Atlassian-Confluence
view release on metacpan or search on metacpan
docs/Footprintless-Plugin-Atlassian-Confluence-RequestBuilder.html view on Meta::CPAN
# A request to create content
my $http_request = $request_builder->create_content(
[
{
type => 'page',
title => 'Foobar',
space => 'CPA',
body => {
storage => {
value => '<p>Foobar paragraph</p>',
representation => 'storage',
}
}
}
]);
# A request to get the content in space CPA with title Foobar
my $http_request = $request_builder->get_content(
spaceKey => 'CPA', title => 'Foobar');
# A request to get the content with id 123
my $http_request = $request_builder->get_content(id => 123);
# A request to update the content
my $http_request = $request_builder->update_content(123,
[
{
type => 'page',
title => 'Foobars new title',
body => {
storage => {
value => '<p>Foobars new paragraph</p>',
representation => 'storage',
}
},
version => {
number => $current_version + 1
}
}
]);
# A request to delete the content with id 123
my $http_request = $request_builder->delete_content(123);</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>This is the default implementation of a request builder. It provides a simple perl interface to the <a href="https://docs.atlassian.com/atlassian-confluence/REST/latest-server/" class="podlinkurl"
>Atlassian Confluence REST API</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($base_url)"
>new($base_url)</a></h2>
<p>Constructs a new request builder with the provided <code>base_url</code>. This url will be used to compose the url for each REST endpoint.</p>
<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="create_content($content,_%options)"
>create_content($content, %options)</a></h2>
<p>A request to create a new piece of Content or publish a draft if the content id is present. All <code>%options</code> will be transformed into query parameters.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="delete_content($id)"
>delete_content($id)</a></h2>
<p>A request to trash or purge a piece of Content.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="get_content(%options)"
>get_content(%options)</a></h2>
<p>A request to obtain a paginated list of Content, or if <code>$option{id}</code> is present, the piece of Content identified by it. All other <code>%options</code> will be transformed into query parameters.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="get_content_children($id,_%options)"
>get_content_children($id, %options)</a></h2>
<p>A request to return a map of direct children of a piece of Content. If <code>$options{type}</code> is present, only children of the specified type will be returned. All other <code>%options</code> will be transformed into query parameters.</p>
<h2><a class='u' href='#___top' title='click to go to top of document'
name="update_content($id,_$content,_%options)"
>update_content($id, $content, %options)</a></h2>
<p>A request to update a piece of Content. All <code>%options</code> will be transformed into query parameters.</p>
<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"
( run in 1.536 second using v1.01-cache-2.11-cpan-39bf76dae61 )