The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Yancy::Controller::Yancy - A simple REST controller for Mojolicious

VERSION

version 0.006

DESCRIPTION

This module contains the routes that Yancy uses to work with the backend data.

METHODS

list_items

List the items in a collection. The collection name should be in the stash key collection. limit, offset, and order_by may be provided as query parameters.

add_item

Add a new item to the collection. The new item should be in the request body as JSON.

get_item

Get a single item from a collection. The collection should be in the stash key collection, and the item's ID in the stash key id.

set_item

Update an item in a collection. The collection should be in the stash key collection, and the item's ID in the stash key id. The updated item should be in the request body as JSON.

delete_item

Delete an item from a collection. The collection name should be in the stash key collection. The ID of the item should be in the stash key id.

SEE ALSO

Yancy, Mojolicious::Controller

AUTHOR

Doug Bell <preaction@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Doug Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.