Page MenuHomePhabricator

Load replies to a Flow post in Pywikibot
Closed, ResolvedPublic


The object of this task is to implement the Post.replies() method, as described in the design. Unlike the implementation of Board.topics(), this method will not have any parameters, making it suitable as a property. This method will load the list of reply posts from the cached internal data, loading it from APISite.view_post() if necessary, and create new Post objects using the called object's page and the UUIDs pulled from the cache. The contents of these posts will not be loaded at this point. The Post objects will be cached and returned to the caller.

Event Timeline

happy5214 claimed this task.
happy5214 raised the priority of this task from to Medium.
happy5214 updated the task description. (Show Details)
happy5214 added a project: Pywikibot-Flow.
happy5214 added subscribers: Unknown Object (MLST), Ladsgroup, Multichill and 15 others.

Since view-topic and view-topiclist both return entire topics (with all posts), it should preferably reuse this if available rather than loading each post individually with view-post. That approach requires T100244: view-topiclist and view-topic should support wikitext, to return wikitext.

Sorry, just saw that you already addressed the caching issue.

The cache can presumably keep track of which variants and content are loaded (if any) (e.g. if you post as html, then request as wikitext, it won't be cached).

Change 217717 had a related patch set uploaded (by Happy5214):
[WIP] Load Flow object content in Pywikibot

Change 217717 merged by jenkins-bot:
Load Flow object content in Pywikibot

I don't think this is fully solved. The view-topic issue needs to be addressed.

The view-topic issue mentioned has been resolved. Closing.