-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Use image info instead of event logs for getting user uploads #2904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Most of the code in @misaochan @nicolas-raoul it would be great if you could give your opinions on this issue. |
@maskaravivek This sounds good to me. The old method is a relic from the legacy app that was implemented before category suggestions etc. I really like the idea of switching to using the same API as that used to generate category suggestions and search - maybe we could even reuse some of the common code if feasible? Not being able to retrieve deleted images may indeed be a disadvantage, but I don't think we ever reached a consensus on whether we even want that, to begin with. |
@ashishkumar468 After our latest refactoring are we still using |
@maskaravivek We are still using logEvents. |
Summary:
Currently, the app fetches the user's contributions by:
Step 1: querying
logevents
API (ApacheHttpClientMediaWikiApi:logEvents
). This gives thepageid
,filename
anddateUpdated
for user's uploadsStep 2: Deleted files(the ones with
pageid
0) are skipped and the rest is inserted int thecontributions
db.Step 3: To show the list of contributions,
findThumbnailByFilename
is called for each file and the image along with filename is shown.I propose that we move away from this approach and start consuming
imageinfo
API for displaying user's contributions.Eg:
https://commons.wikimedia.org/w/api.php?action=query&format=json&formatversion=2&generator=allimages&gaisort=timestamp&prop=imageinfo&iiprop=url%7Cextmetadata&iiurlwidth=640&iiextmetadatafilter=DateTime%7CCategories%7CGPSLatitude%7CGPSLongitude%7CImageDescription%7CDateTimeOriginal%7CArtist%7CLicenseShortName%7CLicenseUrl&gaiuser=Maskaravivek&gailimit=10
Pros:
Cons:
The text was updated successfully, but these errors were encountered: