Page MenuHomePhabricator

Use formatversion=2 in API requests
Closed, ResolvedPublic

Description

Someone should review the FIXME's in MobileFrontend associated with API and see if adding the API parameter formatversion=2 fixes any of them.

Gruntfile x ~/git/core/extensions/MobileFrontend $ ag 'FIXME.*API'
javascripts/modules/editor/EditorApi.js
67: FIXME: MediaWiki API, seriously?
73:
FIXME: API - missing is set to empty string (face palm)
183: // FIXME: AbuseFilter should have more consistent API responses

javascripts/modules/gallery/PhotoListApi.js
76: FIXME: [API] have to request timestamp since api returns an object
96:
FIXME [API] a lot of duplication follows due to the silly way generators work
116: FIXME: [API] in an ideal world imageData would be a sorted array
124:
FIXME: API I hate you.

javascripts/modules/nearby/NearbyApi.js
144: FIXME: API bug 48512
153:
FIXME: API returns object when array would make much sense

javascripts/modules/uploads/PhotoApi.js
253: // FIXME: API doesn't return this information on duplicate images...

resources/mobile.mediaViewer/ImageApi.js
54: // FIXME: API

resources/mobile.startup/PageApi.js
148: FIXME: [API] the API sometimes returns an object and sometimes an array
211:
FIXME: API returns an object when a list makes much more sense
215: // FIXME: "|| []" wouldn't be needed if API was more consistent

Event Timeline

Jdlrobson raised the priority of this task from to Needs Triage.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a project: Web-Team-Backlog.
Jdlrobson moved this task to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson subscribed.
Florian subscribed.

javascripts/modules/editor/EditorApi.js
67: FIXME: MediaWiki API, seriously?

Yeah, can be fixed by the new format!

73: FIXME: API - missing is set to empty string (face palm)

Yap, now returns true, but is missing when page exists, but better as before :)

183: // FIXME: AbuseFilter should have more consistent API responses

Nope

javascripts/modules/gallery/PhotoListApi.js
76: FIXME: [API] have to request timestamp since api returns an object

now it returns an array, but it's still unsorted as far as i can see.

116: FIXME: [API] in an ideal world imageData would be a sorted array

Not really, same as above

124: FIXME: API I hate you.

;) Not really, still different names for continue-part.

javascripts/modules/nearby/NearbyApi.js
144: FIXME: API bug 48512

I can't reproduce the bug, but i would say, that it isn't fixed :/

153: FIXME: API returns object when array would make much sense

Yeah, same like EditorApi :)

javascripts/modules/uploads/PhotoApi.js
253: // FIXME: API doesn't return this information on duplicate images...

Nope

resources/mobile.mediaViewer/ImageApi.js
54: // FIXME: API

Fixed!

resources/mobile.startup/PageApi.js
148: FIXME: [API] the API sometimes returns an object and sometimes an array

Nope

211: FIXME: API returns an object when a list makes much more sense

Fixed.

215: // FIXME: "|| []" wouldn't be needed if API was more consistent

Still needed

Change 209872 had a related patch set uploaded (by Florianschmidtwelzow):
Use formatversion=2 where it fixes errors we manually work around

https://gerrit.wikimedia.org/r/209872

Change 209872 merged by jenkins-bot:
Use formatversion=2 where it fixes errors we manually work around

https://gerrit.wikimedia.org/r/209872