fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)
fu ([personal profile] fu) wrote2011-01-11 12:54 am

Supporting Atom Publishing Protocol

I've been working on updating our implementation of the Atom Publishing Protocol for Bug 852, and I have a patch up there now.

Have several longish comments, but the short version is that our implementation was old to the point where I don't think any clients could use it, so I have felt free to break the old URLs while updating our implementation.

That is, I've removed support for:
http://www.dreamwidth.org/interface/atomapi/username/* (completely broken;
username had no effect on which journal the interface would use)
http://www.dreamwidth.org/interface/atom/feed
http://www.dreamwidth.org/interface/atom/post
http://www.dreamwidth.org/interface/atom/...

And I've implemented a new interface:

http://www.dreamwidth.org/interface/atom
GET: service document / used to discover the APP URLs we provide

http://www.dreamwidth.org/interface/entries
GET : lists the entries
POST: makes a new entry

http://www.dreamwidth.org/interface/entries/tags
GET: lists the journal's tags

http://www.dreamwidth.org/interface/entries/123
GET: retrieves entry 123
PUT: edits entry 123
DELETE: deletes entry 123


Does anyone have any concrete reasons I shouldn't push forward with this?

Also, any suggestions for how / whether to support posting to communities? What URL should we use? :-)
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2011-01-10 05:05 pm (UTC)(link)
Second set of URLs has some broken code , I think it's a missing " in the cut text.

Definitely need to support posting to comms, but client protocol stuff is completely beyond me (trying to learn it though, in the process of updating Delicious Glue, simple enough for a newbie to get working, only, well, I can't do anything beyond the basics). Essentially, if a client won't let me post to a comm, it's not a client I can use. And I'm not a heavy Comm user.
allen: (wetkitten)

[personal profile] allen 2011-01-10 10:21 pm (UTC)(link)
Just so you know, the completely out of date Atom implementation is why bug 2296 drove me crazy enough to have to take a break from DW coding. So thanks for tackling this.
emceeaich: A close-up of a pair of cats-eye glasses (Default)

[personal profile] emceeaich 2011-01-12 09:11 am (UTC)(link)
Hi, I've been underwater lately and had not had time to follow up.

First, thank you for taking on this ticket!

Second, what do you need from me on testing?
pauamma: Cartooney crab holding drink (Default)

[personal profile] pauamma 2011-01-20 11:19 pm (UTC)(link)
If using user-domain URLs for the service document, the username would have to be "who I'm posting *as*", since the document lets the client know what they can post *to*. Thus, the username would be redundant with the authentication credentials and would also require configuring per-account service documents (even if you only have one account, you can't rely on the client knowing out of the box that the service document for Dreamwidth is http://www.dreamwidth.org/mumble - you have to tell it the URL of the service document for post-as account "pauamma"). When you add people with multiple accounts, it only gets more tedious. So I would use www. for the service document.

Now the collections listed in the service document can have user-domain URLs - and in fact should, because they're just an Atom feed for the collection, just like the one used for syndication. But what the exact URLs shouldn't matter IMO, because a conformant client would just get them by retrieving the servce document, and not by using any programmed-in notion of what the collection URLs (and resource URLs) for Dreamwidth (Or any DW clone, or LJ clone) would look like. In fact, there's no reason to believe that they will remain unchanged as time goes on...

Another point worth keeping in mind for the future: the APP lets clients create media resources (which could conceivably be icons or pictures in whchever photo album thingy ends up having, or collections of links, for DW's memories/favorites/whatever feature). However, it also allows in-place modification, which requires a stable-across-revisions URLs. This doesn't fit the current URL scheme for icons (or the LJ/ScrapbookURL scheme for pictures), and any use of the APP for those features would have to deal with that.

[personal profile] faithofone 2011-01-27 03:33 am (UTC)(link)
Please forgive me if this comment makes no sense, I'm completely uneducated about how the whole atom thing works.

Right now, I'm using the atom api with Loudtwitter to post my twitter digests. The URL that I'm using is http://www.dreamwidth.org/interface/atom/post

If you're removing that URL, it'll break my twitter syndication, and it would be sad making.