PUT : Mise à jour d'un blogmark

Pour mettre un jour un blogmark, il suffit juste de mettre une entrée ATOM sur le lien editURI.

L'editURI peut être trouvé dans les entrées ATOM et est simplement http://api.blogmarks.net/marks/$MarkID

L' authentification est expliqué dans le tutorial Fr/AtomApiTutorial/Get.

Envoi du client :

PUT /marks/31523 HTTP/1.0
Host: api.blogmarks.net
Accept: application/atom+xml
Content-Type: text/xml; charset=utf-8
Content-length: 433
Authorization: WSSE profile="UsernameToken"
X-WSSE: UsernameToken Username="$Username", PasswordDigest="$PasswordDigest", Nonce="$Nonce", Created="$CreationTimestamp"

<entry
  version="draft-ietf-atompub-format-05:do not deploy"
  xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-05"
  xmlns:bm="http://api.blogmarks.net/ns#">
 <title>Znarf Blog</title>
 <link rel="related" href="http://upian.net/znarf/blog/" />
 <summary>This blog *really* rox</summary>
 <category term="http://api.blogmarks.net/tags/" sheme="blog" />
 <category term="http://api.blogmarks.net/tags/" sheme="dotclear" />
 <category term="http://api.blogmarks.net/tags/" sheme="daily" />
 <category term="http://api.blogmarks.net/tags/" sheme="topsite" />
</entry>

Réponse du serveur :

HTTP/1.1 200 OK
Date: Wed, 09 Mar 2005 11:21:03 GMT
Content-length: 811
Connection: close
Content-Type: application/atom+xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?>
<entry
  xmlns="http://purl.org/atom/ns#draft-ietf-atompub-format-05"
  xmlns:bm="http://api.blogmarks.net/ns#>
 <id>tag:blogmarks.net,2005:marks,31523</id>
 <title type="TEXT">Znarf Blog</title>
 <link rel="related" href="http://upian.net/znarf/blog/" type="text/html"/>
 <link rel="alternate" href="http://blogmarks.net/user/znarf/archives/2005/03/#mark31523" type="application/xhtml+xml" title="Znarf Blog"/>
 <link rel="image" href="http://blogmarks.net/screenshots/2005/03/09/dbc0c60c8794c0ca4f2e99f10a5f2408.png" type="image/png"/>
 <summary>This blog *really* rox</summary>
 <updated>2005-03-09T11:21:03Z</updated>
 <author><name>znarf</name></author>
 <edit>http://api.blogmarks.net/marks/31523</edit>
 <category term="http://api.blogmarks.net/tags/" sheme="blog" label="blog"/>
 <category term="http://api.blogmarks.net/tags/" sheme="dotclear" label="dotclear"/>
 <category term="http://api.blogmarks.net/tags/" sheme="daily" label="daily"/>
 <category term="http://api.blogmarks.net/tags/" sheme="topsite" label="topsite"/>
 <bm:created>2005-03-09T12:21:03Z</bm:created>
</entry>

voir aussi : Fr/AtomApiTutorial/Get, Fr/AtomApiTutorial/Post, Fr/AtomApiTutorial/Delete