danieltanfh95/btapi

[Enhancement] Add last update timestamp for each chapter

Closed this issue · 6 comments

you can query the revisionid and timestamp using this query:

http://www.baka-tsuki.org/project/api.php?action=query&prop=info|revisions&format=json&titles=Zero%20no%20Tsukaima:Volume1%20Illustrations|Zero%20no%20Tsukaima:Volume1%20Insert%20and%20Back%20Cover

You can append multiple titles using pipe character ('|'), but I believe there is a limitation on the total url length. I'm not sure if you can use POST method to overcome this limitation.

if you know the pageid, you can use this:
http://www.baka-tsuki.org/project/api.php?action=query&prop=info|revisions&format=json&pageids=1941|1912

which is shorter, but you need to know the page ids beforehand.

you means the project page? might not be useful, as the page may be updated (e.g. translator name added), but the actual chapter is not, or the other way around.

but then, it may not really useful...

Maybe it is better to create separate API to get the updated timestamp, with input of the titles or pageid.

Getting the timestamp of when the chapter is last updated is pretty nice, but I will keep this as a separate API to keep it simple, since the titles list can be obtained from the /api API. The maximum number for bots is 500 separate values to query so I think it's more than enough.

I was thinking that this API can be used for application to show the last updated chapter, like in wenku8's windows app

What does the touched property tells us?

I think that one related to the wiki caching stuff: http://www.mediawiki.org/wiki/Manual:Page_table#page_touched

it is not related to the actual update timestamp.

I used aggregation for this so users can use either both at the same time.

http://btapi-shadowys.ngapp.io/api/time?titles=Zero_no_Tsukaima|Kino_no_Tabi&pageids=1912