Thanks!
Some quick questions since I am nowhere as good in python as in other
languages especially not in binding it to the web.
Quick glance at the code make me think it does this:
First some client code sends the subscription request
@handler.get('^/callback(.*?)$', produces=tubes.TEXT)
def confirm_subscription(request, info):
GET: You receive challenge request from HUB and echoes the challenge
back (is that valid ?)
@handler.post('^/callback(.*?)$', produces=tubes.HTML)
def receive_notification(request, info):
POST: You parse the atom and push the parsed feed to a memory Q for
consumption.
@handler.get('^/new-notices/?$', produces=tubes.HTML)
def get_new_notices(request):
Consumes the parsed items and creates a nifty html page
Was that about right ?
Cheers
//Marcus
On Oct 21, 10:04 pm, Mariano Guerra <[email protected]>
wrote:
> On Wed, Oct 21, 2009 at 6:01 PM, Marcus Herou
>
>
>
> <[email protected]> wrote:
>
> > OK I _AM_ an idiot :)
>
> > I thought it was like this:
>
> > 1. Send sub request with callback url and some options (token etc)
> > 2. Receive challenge request
> > 3. Send challenge response
> > 4. If all above went well then what will happen ? Will the same
> > callback url get a post whenever the feed is updated ?
>
> > What confused me is step 4, the example code does not handle that
> > right ?
>
> > Sorry to bother you with such lo-tech questions...
>
> here is an example in python
>
> confirm subscription:
>
> http://github.com/marianoguerra/tubes/blob/master/ihasfriendz/main.py...
>
> receive notification:
>
> http://github.com/marianoguerra/tubes/blob/master/ihasfriendz/main.py...
>
> hope that helps