Inconsistency in XML API

0 views
Skip to first unread message

Xperimental

unread,
Oct 5, 2008, 11:54:26 AM10/5/08
to Twitter Development Talk
Hi,

While writing the Api for my client I came across an inconsistency in
the XML API and I would like to ask, if this is deliberate or
accidental.

The API documentation suggests to use the "since_id" parameter to
lessen the load on the servers. That worked fine when using the
"friends_timeline" method (XML URL: http://twitter.com/statuses/friends_timeline.xml),
but when I tried using it for the direct_messages feed (http://
twitter.com/direct_messages.xml), I got an unexpected result, when I
requested the feed with a "since_id" parameter that generated an empty
list of responses.

The friends_timeline returns an empty array with the right tag
(although it is not quite correctly formed), as expected:
<statuses type="array"></statuses>

But the direct_messages method uses a totally different tag (again not
correctly formed):
<nilclasses type="array"></nilclasses>

I would have expected the following result:
<direct-messages type="array" />
or
<direct-messages type="array"></direct-messages>

Thanks for looking into this.

-Robert

Alex Payne

unread,
Oct 6, 2008, 7:47:05 PM10/6/08
to twitter-deve...@googlegroups.com
Robert,

That's definitely inconsistent, but it's an inconsistency that many
Twitter client libraries have come to expect from the current version
of the Twitter API. I'll be saying this a lot from now on, but this
is something we'll be resolving in the next version of the API. Rest
assured, these inconsistencies make me cringe.

--
Alex Payne - API Lead, Twitter, Inc.
http://twitter.com/al3x

Xperimental

unread,
Oct 7, 2008, 8:24:04 AM10/7/08
to Twitter Development Talk
Hi Alex,

Ok, I just wanted to make sure, that someone noticed. But that seems
to have happened before...
Should I report a bug in the issues tracker (http://code.google.com/p/
twitter-api/issues/list)? (Did a quick search and couldn't find a
match...)

Thanks for the quick reply.

-Robert

Xperimental

unread,
Oct 7, 2008, 8:24:04 AM10/7/08
to Twitter Development Talk

Alex Payne

unread,
Oct 7, 2008, 2:38:31 PM10/7/08
to twitter-deve...@googlegroups.com
Yes, feel free to file an issue, although we're aware of this defect.

--

Reply all
Reply to author
Forward
0 new messages