mediawiki icon indicating copy to clipboard operation
mediawiki copied to clipboard

Login

Open brettz9 opened this issue 5 years ago • 1 comments

  • Fix: login/edit/add issues (must be body only; request requires post method now; use non-deprecated token-retrieval); it appears tokens are now always required
  • Fix: Error not given to _onError promise when response is not an object
  • Git: Add package-lock.json to ignore file
  • npm: Update request
  • npm: Add recommended package.json fields (used on npmjs.com)

This should fix #5.

I didn't expose this bodyOnly API, though I could add a special postBodyOnly method for it if you wish. (I could have added it as an argument at the end of post, but I thought if you wanted to move to ES promises, then there would be no need for isPriority--just await or don't await, and then the API would get even more confused, so best to reevaluate I think at that time.)

~I haven't gotten into edit testing yet to know whether that is working. For example, I don't know whether _edit (used by edit and add) will also need to use the bodyOnly API.~ It did; added to this commit

~For some reason bot.get({action: 'query', meta: 'tokens'}) is not getting credentials for me despite jar being set to indicate the sending of cookies. But at least the issue with logging in appears to be resolved now with this PR.~ Was my own issue

brettz9 avatar Apr 23 '19 11:04 brettz9

I've updated my original post to indicate one fix to edit and a small error fix as well as to indicate resolution to my concerns.

brettz9 avatar Apr 23 '19 12:04 brettz9