abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Woody Anderson" <wo...@xoopit.com>
Subject which is the "most correct" field for a response entry when AbderaClient.post
Date Wed, 24 Oct 2007 23:42:11 GMT
i've posted an image to a collection on a wordpress blog.

            _options.setContentType( type );
            response = _client.post( getUri( type ), is, _options );

what i need from the response is the remote URI that the blog hosts
the image as (not edit link).

the xml looks like:

<entry xmlns="http://www.w3.org/2005/Atom"
       xmlns:app="http://www.w3.org/2007/app" xml:lang="en">
    <title type="text">NAME.jpg</title>
    <link rel="edit-media" href="EDIT_URL" />
    <content type="image/jpg" src="CORRECT_REMOTE_URI"/>
    <link rel="edit" href="EDIT_URL" />
    <category scheme="http://me.wordpress.com" term="Uncategorized" />
    <summary type="text">NAME.jpg

so, there are 2 places that the CORRECT_REMOTE_URI is located in the document.

1st, it's the id of the entry
2nd, it's the src of the content.


Document<Entry> doc = response.getDocument();
Entry entry = eoc.getRoot();

// these are the same

which of these is the more robust / "correct"?
or is there a third option?


View raw message