OK, I'm a newbie.   I'd like to use something like this, especially
after wrestling this morning trying to get the RSS example from the
manual working.  Almost there but not quite.   And using that example
would mean adding code to every single function

/application/controller/function/        [RSS]  gets you the default
RSS feed for this function

/application/controller/function/arg1/arg2/     [ RSS] More detailed
feed

/application/controller/function/arg1/arg2/?color=red&object=widgets
[RSS] Extremely detailed

/application/controller/   [RSS] very broad feed

/application/    [RSS] incredibly broad - basically used by search
engines

Maybe that's possible with the way this is laid out.

Can you explain more about how that would work?


On Mar 6, 6:11 am, mdipierro <[email protected]> wrote:
> Has anybody tried this yet?
>
> Please try this and send me comments:
>
> from gluon.tools import Service
>
> service=Service(globals())
> @service.run
> @service.json
> @service.jsonrpc
> @service.xmlrpc
> @service.amfrpc
> def f(a,b):
>     return a+b
>
> @service.rss
> def myfeed():
>     return dict
> (title='title',link='link',description='description',created_on=request.now,
>                 entries=[dict
> (title='title',link='link',description='description',created_on=request.now])
>
> def call():
>     return service()
>
> USAGE:
>    http://..../app/default/call/run/f?a=3&b=4
>    http://...../app/default//call/run/f/3/4
>    http://...../app/default//call/json/f/3/4
>     etc etc
> etc ...
>    http://..../app/default//call/rss/myfeed
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to