Module WEdit


module WEdit: sig .. end
Edit queries

These queries affects the mediawiki database.



Writing pages

val write_page : session ->
?summary:string ->
?minor:minor_flag ->
?watch:watch_flag ->
?bot:bool ->
?create:create_flag ->
page -> string -> edit_status Call.t
Write a given page and return the status. This function checks that there is no conflict thanks to the last timestamp of the page.
summary : Summary of the edit. Default: empty
minor : Set the minor flag. Default: `DEFAULT
watch : Add the page to your watchlist. Default: `DEFAULT
bot : Set the bot flag. Default: false
create : Behaviour w.r.t. the existing status. Default: `DEFAULT
val write_title : session ->
?summary:string ->
?minor:minor_flag ->
?watch:watch_flag ->
?bot:bool ->
?create:create_flag ->
Title.t -> string -> edit_status Call.t
As for WEdit.write_page but with a title only. Do not check for any conflict.

Moving pages

val move_page : session ->
?summary:string ->
?watch:watch_flag ->
?rdr:bool ->
?subpages:bool ->
?talk:bool ->
?ignore_warnings:bool ->
page -> Title.t -> move_result Call.t
Move a page to a given title.
summary : Reason of the move. Default: empty
watch : Add the page to your watchlist. Default: `DEFAULT
rdr : Create the redirect. Default: true
subpages : Also move the subpages. Default: true
talk : Also move the talk page. Default: true
ignore_warnings : Ignore any warnings. Default: false
val move_title : session ->
?summary:string ->
?watch:watch_flag ->
?rdr:bool ->
?subpages:bool ->
?talk:bool ->
?ignore_warnings:bool ->
Title.t -> Title.t -> move_result Call.t
As for WEdit.move_page but with a title only.

Deleting pages

val delete_title : session ->
?summary:string ->
?watch:watch_flag -> Title.t -> unit Call.t
Delete a given page.
summary : Reason for the deletion. Default: empty
watch : Add the page to your watchlist. Default: `DEFAULT

Uploading

val upload_file : session ->
?summary:string ->
?text:string ->
?watch:watch_flag ->
?ignore_warnings:bool -> string -> string -> upload_result Call.t
upload_file s dest file uploads local file file to remote file dest.
summary : Comment to the upload. Default: empty
text : Text to put on empty description pages. Default: Same as summary
watch : Add the page to your watchlist. Default: `DEFAULT
ignore_warnings : Ignore any warnings. Default: false