This library’s handling of edit tokens is currently a bit inconsistent, I think:
Most of the “crud operations” (create, edit, move etc.) read the token from this.editToken, and that member is also used once in the README. It’s not mentioned in API.md, though.
The token is also stored in this.state, as this.state.csrftoken.
getEditToken() returns a Promise that resolves with this.state, not the edit token directly. This is not documented in API.md, though.
I have no idea which of these should be used when making a request directly with request(). this.editToken looks good, but it’s unclear if it’s part of the stable interface. getEditToken() is part of the stable interface, but resolves with an undocumented value that looks more like an implementation detail than this.editToken. Can you clarify this?
This library’s handling of edit tokens is currently a bit inconsistent, I think:
create
,edit
,move
etc.) read the token fromthis.editToken
, and that member is also used once in the README. It’s not mentioned in API.md, though.this.state
, asthis.state.csrftoken
.getEditToken()
returns aPromise
that resolves withthis.state
, not the edit token directly. This is not documented in API.md, though.I have no idea which of these should be used when making a request directly with
request()
.this.editToken
looks good, but it’s unclear if it’s part of the stable interface.getEditToken()
is part of the stable interface, but resolves with an undocumented value that looks more like an implementation detail thanthis.editToken
. Can you clarify this?