Releases: ankostis/MatWiki
Releases · ankostis/MatWiki
19 Feb 2019, 4rth rel: HttpPipeline, customized UserAgent, API change MWClient-->MWSite
Changes
- RENAME main class MWClient --> MWSite
- REFACT:
- SPLIT classes across
HttpPipeline,HttpCall,HttpSession(handlers) &MwSite,
so client operations can inspect and modify request & response with callbaks (handlers)
(ala apache axis).
- SPLIT classes across
- UNIFY UNIFY HttpCall() + MWSite/apiCall() arg-parsing (uri, uriArgs, method, headers, body, hoptions)
MWSite.apiCall()accepts kv-pairs (seeHttpCall.inputParser&HttpCallconstructor).- Capitalize all props, rename Heaers-->Header.
- Refact DatumError --> MWError:
- rename property Datum --> HttpCall.
- store the hole call instead of just the response/request.
- ENH: Added User-Agent HTTP-header according to https://meta.wikimedia.org/wiki/User-Agent_policy
_ Use GET for tokens, and pass most API params in the URI - keep the post only
for password and tokens (by the API recomendation).
Status
- REQUIRES MATLAB >= R2016b(9.1.x) for string-vectors & proper HTTP support.
(e.g. for cookies: https://www.mathworks.com/help/matlab/ref/matlab.net.http.cookieinfo-class.html). - Features:
- Allow bots to login.
- run
#asksemantic-queries. - Rudimentary error-handling.
- Respects some of WP's UserAgent policies (Valid UserAgent, Easy to Debug).
- Http machinery implemented as a pipeline of "handlers" (callbacks).
- Not tested for
Matlab-9.4+(R2018a or higher), where HTTP support
forapplication/x-www-form-urlencodedwere not fully there yet. - Lightly tested only against
MediaWiki-1.31. - Read Contents for an overview of the library code.
- Read also the Changelog of the project.
Installation
- Download the archive,
- place all the mat-files of this project somewhere in your MATLAB's search-path,
- generate a bot-password with adequate permissions for your wiki, and
- try the sample code in the README.md and consult Contents.m.
14 Feb 2019, 1st rel: login & #ask queries work
- Download the archive,
- place all the mat-files of this project somewhere in your MATLAB's search-path,
- generate a bot-password with adequate permissions for your wiki, and
- try the sample code in the
README.md.
18 Feb 2019, 3rd rel: new project name, minor API changes
- RENAME PROJECT: MatMWClient --> MatWiki
- REFACT:
- Move HttpOptions from HttpSession-->MWClient.
- Add utility factory methods to convert matlab builtin-types into HTTP-onjects.
- User-friendlier client API.
15 Feb 2019, 2n rel: bugfixing & project machinery
Changes
- SUPPORT also MATLAB >= R2016b(9.1.x), instead of >= R2018a(9.4.x );
managed to encode POST body-params without relying onQueryParam. - FIX: do not ignore
MWClient.DefaultApiParams, but add them into URI. - fix: clean up cookies before
MWClient.login(), so repeated calls possible. - fix: do not override given
HttpOptionsinHttpSessionconstructor - now
possible to debug http-requests and save theirPayloadinMwClient.History. - enh:
MWClientacceptsHttpSessionon construction. - Chore & docs enhancements:
- add
MWClient.Versionconstant to discover project release on runtime. - add
.gitignoreand this changelog. - some function docs improved.
- add