App-Dochazka-CLI
view release on metacpan or search on metacpan
lib/App/Dochazka/CLI/Guide.pm view on Meta::CPAN
# *************************************************************************
# Copyright (c) 2014-2016, SUSE LLC
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of SUSE LLC nor the names of its contributors may be
# used to endorse or promote products derived from this software without
# specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
# *************************************************************************
#
# "CLI Guide" module
#
package App::Dochazka::CLI::Guide;
=head1 NAME
App::Dochazka::CLI::Guide - Dochazka CLI Guide
=head1 VERSION
Version 0.240
=cut
our $VERSION = '0.240';
=head1 CLI COMMANDS
=head2 Introduction
The CLI commands can be divided into four categories:
=over
=item L<"Commands for generating HTTP requests">
=item L<"Commands for Dochazka administrators">
=item L<"Commands for Dochazka supervisors">
=item L<"Commands for Dochazka users">
=back
=head2 Commands for generating HTTP requests
The CLI enables the user to generate HTTP requests to an L<App::Dochazka::REST>
server and view the server's responses. Commands in this category -- also known
as "REST test" commands -- have a direct correlation with the REST server
resources, always starting with one of the four basic HTTP methods supported by
the REST server: C<GET>, C<PUT>, C<POST>, C<DELETE>. These commands
are useful mainly for Dochazka developers, but may also be used by
administrators and normal users -- e.g., for troubleshooting and ad hoc
testing, or for doing things that the "normal" commands do not support. A "best
effort" has been made to support all the REST resources.
Commands in this category start with the HTTP method and continue
with the resource (except it is written with spaces instead of forward
slashes) and concludes with the request entity, if any.
All CLI commands must be written on a single line of input, and
commands in this category are no exception.
Examples:
=over
=item DELETE INTERVAL IID 24
The equivalent of C<< DELETE interval/iid/24 >>
=item POST DOCU TEXT "employee/eid/:eid"
The equivalent of C<< POST docu/text >> with the request entity shown.
=item POST EMPLOYEE EID { "eid" : 15, "sec_id" : 340 }
Update the secondary ID of the employee with EID 15.
=back
( run in 2.735 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )