Footprintless::Plugin::Atlassian::Confluence::RequestBuilder - A request builder for the Atlassian Confluence REST API
version 1.01
my $request_builder = Footprintless::Plugin::Atlassian::Confluence::RequestBuilder ->new($base_url); # 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);
This is the default implementation of a request builder. It provides a simple perl interface to the Atlassian Confluence REST API.
Constructs a new request builder with the provided base_url
. This url will be used to compose the url for each REST endpoint.
A request to create a new piece of Content or publish a draft if the content id is present. All %options
will be transformed into query parameters.
A request to trash or purge a piece of Content.
A request to obtain a paginated list of Content, or if $option{id}
is present, the piece of Content identified by it. All other %options
will be transformed into query parameters.
A request to return a map of direct children of a piece of Content. If $options{type}
is present, only children of the specified type will be returned. All other %options
will be transformed into query parameters.
A request to update a piece of Content. All %options
will be transformed into query parameters.
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.