[Catalyst-commits] r8044 - in
Catalyst-Controller-DBIC-API/1.000/trunk: .
lib/Catalyst/Controller/DBIC lib/Catalyst/Controller/DBIC/API
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Sun Jun 29 12:38:10 BST 2008
Author: lukes
Date: 2008-06-29 12:38:10 +0100 (Sun, 29 Jun 2008)
New Revision: 8044
Added:
Catalyst-Controller-DBIC-API/1.000/trunk/Changes
Modified:
Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API.pm
Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm
Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm
Log:
doc fixes and changes file
Added: Catalyst-Controller-DBIC-API/1.000/trunk/Changes
===================================================================
--- Catalyst-Controller-DBIC-API/1.000/trunk/Changes (rev 0)
+++ Catalyst-Controller-DBIC-API/1.000/trunk/Changes 2008-06-29 11:38:10 UTC (rev 8044)
@@ -0,0 +1,8 @@
+Revision history for Catalyst-Controller-DBIC-API
+
+1.000001
+- Improved docs
+
+1.000000
+- Released
+
Modified: Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm 2008-06-28 22:29:41 UTC (rev 8043)
+++ Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/REST.pm 2008-06-29 11:38:10 UTC (rev 8044)
@@ -63,8 +63,15 @@
DELETE: forwards to L<Catalyst::Controller::DBIC::API/delete>
PUT: forwards to L<Catalyst::Controller::DBIC::API/update>
-Note: It is often sensible although controversial to give this method a PathPart to clearly distinguish between object and list level methods. You can easily do this by using the controller config as with L</setup>.
+Note: It is often sensible although controversial to give this method a PathPart to clearly distinguish between object and list level methods. You can easily do this by using the controller config as with L</setup>. For example:
+ __PACKAGE__->config
+ ( action => { object => { PathPart => 'id', Chained => 'setup' } },
+ ...
+ );
+
+Would move your object level endpoints to $base/id/[identifier].
+
=cut
sub begin :Private {
Modified: Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm 2008-06-28 22:29:41 UTC (rev 8043)
+++ Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API/RPC.pm 2008-06-29 11:38:10 UTC (rev 8044)
@@ -24,8 +24,8 @@
$base/create
$base/list
- $base/id/[identified]/delete
- $base/id/[identified]/update
+ $base/id/[identifier]/delete
+ $base/id/[identifier]/update
Where $base is the URI described by L</setup>, the chain root of the controller.
@@ -50,7 +50,7 @@
PathPart: object
CaptureArgs: 1
-Provides an endpoint to the functionality described in L<Catalyst::Controller::DBIC::API/object>.
+Provides an chain point to the functionality described in L<Catalyst::Controller::DBIC::API/object>. All object level endpoints should use this as their chain root.
=head2 create
Modified: Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API.pm
===================================================================
--- Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API.pm 2008-06-28 22:29:41 UTC (rev 8043)
+++ Catalyst-Controller-DBIC-API/1.000/trunk/lib/Catalyst/Controller/DBIC/API.pm 2008-06-29 11:38:10 UTC (rev 8044)
@@ -40,9 +40,9 @@
=head1 GETTING STARTED
-This document describes base functionlity such as list, create, delete, update and the setting of config attributes. L<Catalyst::Controller::API::RPC> and L<Catalyst::Controller::API::REST> describe details of provided endpoints to those base methods.
+This document describes base functionlity such as list, create, delete, update and the setting of config attributes. L<Catalyst::Controller::DBIC::API::RPC> and L<Catalyst::Controller::DBIC::API::REST> describe details of provided endpoints to those base methods.
-You will need to create a controller for each schema class you require API endpoints for. For example if your schema has Artist and Track, and you want to provide a RESTful interface to these, you should create MyApp::Controller::API::REST::Artist and MyApp::Controller::API::REST::Track which both subclass L<Catalyst::Controller::API::REST>. Similarly if you wanted to provide an RPC style interface then subclass L<Catalyst::Controller::API::RPC>. You then configure these individually as specified in L</CONFIGURATION>.
+You will need to create a controller for each schema class you require API endpoints for. For example if your schema has Artist and Track, and you want to provide a RESTful interface to these, you should create MyApp::Controller::API::REST::Artist and MyApp::Controller::API::REST::Track which both subclass L<Catalyst::Controller::DBIC::API::REST>. Similarly if you wanted to provide an RPC style interface then subclass L<Catalyst::Controller::DBIC::API::RPC>. You then configure these individually as specified in L</CONFIGURATION>.
Also note that the test suite of this module has an example application used to run tests against. It maybe helpful to look at that until a better tutorial is written.
@@ -80,7 +80,7 @@
=head1 METHODS
-Note: see the individual interface classes - L<Catalyst::Controller::API::RPC> and L<Catalyst::Controller::API::REST> - for details of the endpoints to these abstract methods.
+Note: see the individual interface classes - L<Catalyst::Controller::DBIC::API::RPC> and L<Catalyst::Controller::DBIC::API::REST> - for details of the endpoints to these abstract methods.
=head2 setup
@@ -125,7 +125,6 @@
Would result in this search (where 'name' is a column of the schema class, 'cd' is a relation of the schema class and 'artist' is a column of the related class):
$rs->search({ name => 'fred', 'cd.artist' => 'luke' }, { join => ['cd'] })
-=head1 AUTHOR
The L</format_list> method is used to format the results, so override that as required.
@@ -157,10 +156,10 @@
=head1 AUTHOR
- Luke Saunders <luke.saunders at gmail.com
->
+ Luke Saunders <luke.saunders at gmail.com>
+
=head1 CONTRIBUTORS
-
+
Zbigniew Lukasiak <zzbbyy at gmail.com>
=cut
More information about the Catalyst-commits
mailing list