It first retrieves the page data with let page_data = await enwiki.page('Wikipedia:Sandbox'); but then never uses page_data. Inside all of the edit and edit_page methods, page_data is passed in by the caller and shadows the outer variable.
Does this mean edit will do a .page() call internally for you? Is the await enwiki.page() call not needed then? Or should it be that edit actually doesn't get passed page_data?
In the README, the section on editing a page does something I don't understand.
Here's the snippet in question
It first retrieves the page data with
let page_data = await enwiki.page('Wikipedia:Sandbox');
but then never usespage_data
. Inside all of theedit
andedit_page
methods,page_data
is passed in by the caller and shadows the outer variable.Does this mean
edit
will do a.page()
call internally for you? Is theawait enwiki.page()
call not needed then? Or should it be thatedit
actually doesn't get passedpage_data
?