NAME

Dezi::Admin::API::Response - Dezi administration API response

SYNOPSIS

use Dezi::Admin::API::Response;

my $resp = Dezi::Admin::API::Response->new(
   total   => $total,
   results => $list,
);
print $resp;  # renders as JSON
       

DESCRIPTION

Dezi::Admin::API::Response represents a JSON response to an API call.

METHODS

new( args )

Constructor. args should include params total and results.

success

Get/set success boolean.

total

Get/set total integer.

results

Get/set array ref of results.

metaData

Get/set hash ref of meta data. Format is what ExtJS expects.

stringify

Returns JSON representation of Response. All stringification actions are overloaded to call this method.

AUTHOR

Peter Karman, <karman at cpan.org>

BUGS

Please report any bugs or feature requests to bug-dezi-admin at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Dezi-Admin. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Dezi::Admin

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2013 Peter Karman.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.