Integration of restfulie with restfulie-restbuy

0 views
Skip to first unread message

Alexandre Atoji

unread,
Jan 17, 2011, 3:18:09 PM1/17/11
to restfulie-dev
Hi,

I'm developing the restfulie-py and I have some questions about the
restbuy and opensearch.

When I do:

description = Restfulie.at("http://localhost:3000/products/
opensearch.xml").accepts('application/opensearchdescription
+xml').get().resource()

I get a opensearch XML with description, url, contact.. etc then I
marshall this and generate an object.
With this object I do:

items = description.use("application/atom+xml").search(searchTerms =
"20", startPage = 1)

This last code doen't work yet.
what exactly use() should do?
I'm getting the "URL" on XML with "application/atom+xml" on it type
and send a GET on the template URL replaced with given parameters.

What I'm doing wrong?

I must add accepts header with "application/atom+xml"? Content-type? I
must create a atom first?

Guilherme Silveira

unread,
Jan 18, 2011, 8:29:44 AM1/18/11
to restfulie-dev
Hi Atoji,

The "use" method is not from Restfulie core, but from the opensearch
media type handler. Take a look at github.com/caelum/medie on the
opensearch media type. And also at the opensearch.rb file on
Restfulie, you will find support for client side open search there.

Regards
Guilherme Silveira
Caelum | Ensino e Inovação
http://www.caelum.com.br/

Reply all
Reply to author
Forward
0 new messages