Re: Antwort: REST interface for creating a lenya document

Florent André <[email protected]> Wed, 28 Sep 2011 14:40:26 +0200
Newsgroups gmane.comp.cms.lenya.devel
Message-ID <[email protected]>
I got this module, try to dive into test, but don't really see how to 
solve this really simple usecase :

you have a client that just send a file on the server in just one shot 
and stateless (no auth exchange),
simply, just write down a curl [1] and have a new document in the cms.

Any thought ?

[1] like this one :
$ curl -X POST
 >>> 
"http://yourhost/lenya/publication-name/modules/lenyaDocWriting/create"
 >>>      -F "[email protected]"

++


On 09/28/2011 01:53 PM, Thomas Comiotto wrote:
> http://svn.apache.org/repos/asf/lenya/contributions/2_0_X/modules/atom/
>
> The module already supports assets. So it should be easy to add document
> posts.
>
>
> Best
> Thomas
>
>
>
> On Wed, 2011-09-28 at 13:29 +0200, florent andré wrote:
>> how ? :)
>>
>> On 09/28/2011 01:23 PM, [email protected] wrote:
>>> Please use the atompub module for this!
>>>
>>> Best
>>> Thomas
>>>
>>> -----florent andré<[email protected]>  schrieb: -----
>>>
>>>      An: lenya dev<[email protected]>
>>>      Von: florent andré<[email protected]>
>>>      Datum: 09/28/2011 01:00PM
>>>      Betreff: REST interface for creating a lenya document
>>>
>>>      It's a really first version (names will change).
>>>
>>>      The more simple usecase for creating one document with specific body
>>>
>>>      $ curl -X POST
>>>      "http://yourhost/lenya/publication-name/modules/lenyaDocWriting/create"
>>>      -F "[email protected]"
>>>
>>>      For Frieburg hackers :
>>>      $ curl -X POST
>>>      "http://193.196.240.56:8080/lenya/default/modules/lenyaDocWriting/create"
>>>      -F
>>>      "[email protected]"
>>>
>>>
>>>      content of the addxhtmlfile.xml file (save on you fs do $curl in the
>>>      same folder) :
>>>      =========
>>>      <?xml version="1.0" encoding="UTF-8"?>
>>>
>>>      <lenyadoc:lenyadoc xmlns:lenyadoc="http://4sengines/lenyadoc/0.1"
>>>      xmlns:xhtml="http://www.w3.org/1999/xhtml">
>>>
>>>      <lenyadoc:parameters>
>>>      <lenyadoc:resourcetype>xhtml</lenyadoc:resourcetype>
>>>      <lenyadoc:pubname>default</lenyadoc:pubname>
>>>      <lenyadoc:parentpath>/tutorial</lenyadoc:parentpath>
>>>      <lenyadoc:language>en</lenyadoc:language>
>>>      <lenyadoc:navtitle>Title of your new document</lenyadoc:navtitle>
>>>      </lenyadoc:parameters>
>>>      <!-- replace the body content of the default resource created -->
>>>      <lenyadoc:content>
>>>      <lenyadoc:contentpath>html</lenyadoc:contentpath>
>>>      <lenyadoc:replacepath>body</lenyadoc:replacepath>
>>>      <lenyadoc:fragment>
>>>      <xhtml:body>
>>>      <xhtml:p>  here you have new content !!</xhtml:p>
>>>      </xhtml:body>
>>>      </lenyadoc:fragment>
>>>
>>>      </lenyadoc:content>
>>>
>>>      </lenyadoc:lenyadoc>
>>>      =========
>>>      end file content
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>      ---------------------------------------------------------------------
>>>      To unsubscribe, e-mail: [email protected]
>>>      For additional commands, e-mail: [email protected]
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>