[geeklog-devel] Webservices API (was: Student wakeup call)
dirk at haun-online.de
Wed Oct 24 14:47:47 EDT 2007
Ramnath R Iyer wrote:
>I'm not sure what the problem is exactly. Could you please elaborate on this
>part: "we don't even recognize it."
Yeah, I guess it wasn't clear. In fact I think I'm missing a piece of
APE uses a long ID for the entry it's trying to create. Let's just say
it's 60 characters long. Geeklog just takes the ID as it is and creates
the story with it. But a story ID is only 40 characters long, so the
rest is lost. Now as long as the first 40 characters are unique, that
should work (even though it's not good to do it) - but something
happened and APE wasn't able to edit the newly created entry afterwards.
That _may_ be because, according to the specification, a PUT should
return the created entry. I'll have to re-test that.
In any case, returning the entry after the PUT will also allow us to
assign it a new ID - one that's only 40 characters (max.) long. APE
should then pick up the new ID and work with that.
The problem here is that nowhere in Geeklog does it say how long an ID
(sid in this case) really is. It's only defined by the length of the
database field. And I know of some people who have extended it to have
more room for nice / search-engine friendly IDs.
So what we may have to do is just try to save the story with the
original ID, read it back and then see if the ID was cut off. In which
case we would have to assign it a new ID. Sounds a bit messy but I can't
think of a better way without having to define some constants somewhere
(with all the downsides of having to keep those in sync with the actual
field length in the database).
>The second consequence is that the ID can actually be changed. That is
>original system worked. You can edit an entry and change the associated ID.
>Now this shouldn't happen unless it is specifically requested; maybe
>simply doing things in a way that changes the ID every time. I can look into
>that, but when you say "a PUT should not change the ID" are you quoting the
>protocol, or are you saying that this is how GL should do it?
There was a discussion about it on the atom-protocol mailing list
recently. The atom:id should not change once the entry was created.
Now if the user chooses to change the sid in Geeklog's story editor, I
think we should just do it anyway. But it shouldn't change on it's own -
which is what it does at the moment.
As I said, I'll look into that.
>Windows Live Writer is a standalone desktop application (...)
>I didn't see Atom support mentioned anywhere on the site, though.
The author is also on the atom-protocol list and mentioned that it did
support Atompub. Maybe only in a beta, though.
More information about the geeklog-devel