Manual Reference Pages - JIFTY::PLUGIN::REST::DISPATCHER (3)
Jifty::Plugin::REST::Dispatcher - Dispatcher for REST plugin
Shows basic help about resources and formats available via this RESTful interface.
Displays a help page about a specific topic. Will look for a method named
Explains /=/search/ a bit more in-depth.
Displays versions of the various bits of your application.
list PREFIX items
Takes a URL prefix and a set of items to render. passes them on.
Returns the users desired output format. Returns a hashref of:
format: JSON, JS, YAML, XML, Perl, or HTML
extension: json, js, yml, xml, pl, or html
content_type: text/x-yaml; charset=UTF-8, etc.
freezer: \&Jifty::YAML::Dump, etc.
outs PREFIX DATASTRUCTURE
Takes a url path prefix and a data structure. Depending on what content types the other side of the HTTP connection can accept,
Attempts to render DATASTRUCTURE as simple, tag-based XML.
render_as_html PREFIX URL DATASTRUCTURE
Attempts to render DATASTRUCTURE as simple semantic HTML suitable for humans to look at.
Recursively render DATASTRUCTURE as some simple HTML dls and ols.
Returns a nice simple HTML definition list of the keys and values of a Jifty::Record object.
Canonicalizes ACTION into the class-name form preferred by Jifty by cleaning up
casing, delimiters, etc. Throws an appropriate HTTP error code if the action is
Canonicalizes MODEL into the class-name form preferred by Jifty by cleaning up
casing, delimiters, etc. Throws an appropriate HTTP error code if the model is
Sends the user a list of models in this application, with the names transformed from Perlish::Syntax to Everything.Else.Syntax
Returns true if the column is a valid column to observe on the model
Sends the user a nice list of all columns in a given model class. Exactly which model is shoved into $1 by the dispatcher. This should probably be improved.
list_model_items MODELCLASS COLUMNNAME
Returns a list of items in MODELCLASS sorted by COLUMNNAME, with only COLUMNNAME displayed. (This should have some limiting thrown in)
show_item_field CW$model, CW$column, CW$key, CW$field
Loads up a model of type $model which has a column $column with a value $key. Returns the value of $field for that object.
Returns 404 if it doesnt exist.
show_item CW$model, CW$column, CW$key
Loads up a model of type $model which has a column $column with a value $key. Returns all columns for the object
Returns 404 if it doesnt exist.
search_items CW$model, [c1, v1, c2, v2, ...] [, CW$field]
Loads up all models of type $model that match the given columns and values.
If the column and value list has an odd count, then the last item is taken to
be the output column. Otherwise, all items will be returned.
Will throw a 404 if there were no matches, or $field was invalid.
__per_page => N
Return the collection as N records per page.
__page => N
Return page N of the collection
__order_by => column
Order by the given column, ascending.
__order_by_desc => column
Order by the given column, descending.
Implemented by redispatching to a CreateModel action.
Implemented by redispatching to a CreateModel or UpdateModel action.
Implemented by redispatching to a DeleteModel action.
Returns a list of all actions visible to the current user. (Canonicalizes Perl::Style to Everything.Else.Style).
Takes a single parameter, $action, supplied by the dispatcher.
Shows the user all possible parameters to the action.
Takes a single parameter, the class of an action.
Shows the user an HTML form of the actions parameters to run that action.
Expects $1 to be the name of an action we want to run.
Runs the action, with the HTTP arguments as its arguments. That is, its not looking for Jifty-encoded (J:F) arguments.
If you have an action called MyApp::Action::Ping that takes a parameter, ip, this action will look for an HTTP
argument called ip, (not J:F-myaction-ip).
Returns the actions result.
TODO, doc the format of the result.
On an invalid action name, throws a 404.
On a disallowed action name, throws a 403.
On an internal error, throws a 500.
|perl v5.20.3 ||JIFTY::PLUGIN::REST::DISPATCHER (3) ||2010-12-08 |
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.