PR #100 introduced the Wikimate::token() method, invoked by every data-modifying API call. But a CSRF token is valid for an entire login session. token() requests a new one every time, causing unnecessary repetitive API calls.
The method should store the first requested CSRF token and return that upon further calls instead of making more API requests. It should be discarded in a (future) logout method.
PR #100 introduced the
Wikimate::token()method, invoked by every data-modifying API call. But a CSRF token is valid for an entire login session.token()requests a new one every time, causing unnecessary repetitive API calls.The method should store the first requested CSRF token and return that upon further calls instead of making more API requests. It should be discarded in a (future) logout method.