NAME

Ado::Control::Vest - The controller to manage messages.

SYNOPSIS

#in your browser go to
http://your-host/vest/list
#or
http://your-host/vest
#and
http://your-host/vest/edit/$id
#and
http://your-host/vest/add

DESCRIPTION

Ado::Control::Vest is the controller class for the end-users' Ado messaging system.

ATTRIBUTES

Ado::Control::Vest inherits all the attributes from Ado::Control.

METHODS

Ado::Control::Vest inherits all methods from Ado::Control and implements the following new ones. These methods are mapped to actions. See etc/plugins/vest.conf.

create

Creates a new message. Renders no content with status 201 and a Location header pointing to the new resource so the user agent can fetch it eventually. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.2.2 and "create" in Ado::Model::Vest.

list

Displays the messages this system has. Uses the request parameters limit and offset to display a range of items starting at offset and ending at offset+limit. This method serves the resource /вест/list.json. If other format is requested returns status 415 with Content-location header pointing to the proper URI. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.16 and http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14.

list_messages

Lists messages from a talk. Renders JSON. Accepts parameters limit (20 by default) and offset (0). If offset is not passed, lists last (19+first message) messages. THe first item in the list is the talk topic.

screen

The default view when /вест is accessed. Renders templates/vest/screen.html.ep

list_talks

Renders JSON containing the last talksfor a user. Accepts parameters limit (20 by default) and offset (0).

show

Displays a message. Not implemented yet

update

Updates a message. Not implemented yet

disable

Disables a message . Not implemented yet

SPONSORS

The original author

SEE ALSO

Ado::Plugin::Vest, Ado::Control::Ado::Default, Ado::Control, Mojolicious::Controller, "Model_View_Controller" in Mojolicious::Guides::Growing, "Controller_class" in Mojolicious::Guides::Growing

AUTHOR

Красимир Беров (Krasimir Berov)

COPYRIGHT AND LICENSE

Copyright 2013-2014 Красимир Беров (Krasimir Berov).

This program is free software, you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License v3 (LGPL-3.0). You may copy, distribute and modify the software provided that modifications are open source. However, software that includes the license may release under a different license.

See http://opensource.org/licenses/lgpl-3.0.html for more information.