Page MenuHomePhabricator

Migrate AWB to using JSON instead of XML for API requests
Open, Needs TriagePublicFeature

Description

Migrate AWB to using JSON instead of XML for API requests. This should be done using the Json.NET library that has been in the AWB repo for a while now.

Going to require a lot of work

Something "isolated" like the SiteInfo or SiteMatrix code may be a good starting point.

Stuff that needs doing:

  • SiteInfo::GetMessages()
  • Tools::ExpandTemplate()
  • SiteInfo::LoadSiteInfo()/LoadFromNetwork()
  • SiteMatrix::LoadFromNetwork()
  • ApiEdit::QueryApi() (used for list providers et al)
  • ApiEdit (rest of actions)

Event Timeline

Reedy claimed this task.
Reedy raised the priority of this task from to Needs Triage.
Reedy updated the task description. (Show Details)
Reedy added a project: AutoWikiBrowser.

https://github.com/reedy/AutoWikiBrowser/compare/5eba2e5...cdfa8a6

And so it begins with SiteInfo::GetMessages(). T91852 is a semi blocker for this. Allowing us to write better code for the transition...

Reedy set Security to None.
Find all "format=xml", Subfolders, Find Results 1, Entire Solution, ""
  D:\programming\autowikibrowser\AWB\WikiFunctions\API\ApiEdit.cs(329):            return ApiURL + "?format=xml" + BuildQuery(request);
  D:\programming\autowikibrowser\AWB\WikiFunctions\API\ApiEdit.cs(1122):            string result = HttpGet(ApiURL + "?action=query&format=xml&" + queryParamters);
  D:\programming\autowikibrowser\AWB\WikiFunctions\Parse\SiteMatrix.cs(117):            string strMatrix = Tools.GetHTML("https://en.wikipedia.org/w/api.php?action=sitematrix&format=xml");
  D:\programming\autowikibrowser\AWB\WikiFunctions\SiteInfo.cs(149):            siteinfoOutput = Editor.HttpGet(ApiPath + "?action=query&meta=siteinfo&siprop=general|namespaces|namespacealiases|statistics|magicwords&format=xml");
  Matching lines: 4    Matching files: 3    Total files searched: 435
Aklapper added a subscriber: Reedy.

This task has been assigned to the same task owner for more than two years. Resetting task assignee due to inactivity, to decrease task cookie-licking and to get a slightly more realistic overview of plans. Please feel free to assign this task to yourself again if you still realistically work or plan to work on this task - it would be welcome!

For tips how to manage individual work in Phabricator (noisy notifications, lists of task, etc.), see https://phabricator.wikimedia.org/T228575#6237124 for available options.
(For the records, two emails were sent to assignee addresses before resetting assignees. See T228575 for more info and for potential feedback. Thanks!)

Aklapper changed the subtype of this task from "Task" to "Feature Request".Nov 22 2022, 5:18 PM