Page MenuHomePhabricator

API's xml parameter 'log events start' (lestart) is broken
Closed, InvalidPublic

Description

If I enter, for instance, the following query:

http://pt.wikipedia.org/w/api.php?action=query&list=logevents&lestart=20070619150000

I get in the results

(...)
<logevents lestart="20070619143631" />
(...)

However, the results are correct. It seems to me that the xml tag shows the timestamp of the edit right after the default limit (10). And this can be seen by querying

http://pt.wikipedia.org/w/api.php?action=query&list=logevents&lestart=20070619150000&lelimit=11

As can be seen, the timestamp of the last entry on the list is the same as the one that was presented in the tag on the previous query:

<item pageid="0" ns="2" title="Usuário:Jorge Bispo Lopes Fausto" type="newusers" action="create" user="Jorge Bispo Lopes Fausto" timestamp="2007-06-19T14:36:31Z" />

Please, fix this as even not compromising the results, it gets very confusing until you understand what is going on.


Version: unspecified
Severity: enhancement

Details

Reference
bz10315

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:47 PM
bzimport set Reference to bz10315.
bzimport added a subscriber: Unknown Object (MLST).

This is actually correct behavior. You may understand this better when you see some of the XML context:

<query-continue>
  <logevents lestart="20070619143631" />
</query-continue>

This means that to continue your query (i.e. to get the next ten logevents), you need to set the lestart parameter to 20070619143631. It does *not* mean the lists starts at that timestamp, although the name may lead you to think that.

Hum, I see.. it really seems to be that, though... :\

Can you think of a less ambiguous way to express that? I think it's rather confusing the way it is...

(In reply to comment #2)

Can you think of a less ambiguous way to express that? I think it's rather
confusing the way it is...

The query-continue thing is pretty clear to me. I agree that it should be documented, but then the API hardly documents what it returns. Someone should work on that.

(In reply to comment #4)

http://www.mediawiki.org/wiki/API awaits you!

If you mean me, I prefer writing the code ;) But it wouldn't be a bad idea to recruit one or two people to write documentation.

Doc is for the API. API is for devs. Devs like to write code. Devs do not like to write docs... Catch 22 :)

No, i didn't mean you, I meant everyone :)