Skip to content

Use image info instead of event logs for getting user uploads #2904

Closed
@maskaravivek

Description

@maskaravivek

Summary:

Currently, the app fetches the user's contributions by:

  • Step 1: querying logevents API (ApacheHttpClientMediaWikiApi:logEvents). This gives the pageid, filename and dateUpdated for user's uploads

  • Step 2: Deleted files(the ones with pageid 0) are skipped and the rest is inserted int the contributions 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:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions