reality 0.1.0.alpha → 0.1.0.alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/reality/describers/wikidata.rb +2 -1
- data/lib/reality/describers/wikidata/sparql.rb +0 -1
- data/lib/reality/version.rb +1 -1
- metadata +2 -124
- data/lib/reality/describers/wikidata/actions/abusefiltercheckmatch.rb +0 -55
- data/lib/reality/describers/wikidata/actions/abusefilterchecksyntax.rb +0 -31
- data/lib/reality/describers/wikidata/actions/abusefilterevalexpression.rb +0 -31
- data/lib/reality/describers/wikidata/actions/abusefilterunblockautopromote.rb +0 -39
- data/lib/reality/describers/wikidata/actions/aggregategroups.rb +0 -76
- data/lib/reality/describers/wikidata/actions/antispoof.rb +0 -31
- data/lib/reality/describers/wikidata/actions/block.rb +0 -132
- data/lib/reality/describers/wikidata/actions/bouncehandler.rb +0 -31
- data/lib/reality/describers/wikidata/actions/categorytree.rb +0 -39
- data/lib/reality/describers/wikidata/actions/centralauthtoken.rb +0 -25
- data/lib/reality/describers/wikidata/actions/centralnoticechoicedata.rb +0 -39
- data/lib/reality/describers/wikidata/actions/centralnoticequerycampaign.rb +0 -31
- data/lib/reality/describers/wikidata/actions/changeauthenticationdata.rb +0 -39
- data/lib/reality/describers/wikidata/actions/checktoken.rb +0 -52
- data/lib/reality/describers/wikidata/actions/cirrus-config-dump.rb +0 -25
- data/lib/reality/describers/wikidata/actions/cirrus-mapping-dump.rb +0 -25
- data/lib/reality/describers/wikidata/actions/cirrus-settings-dump.rb +0 -25
- data/lib/reality/describers/wikidata/actions/clearhasmsg.rb +0 -25
- data/lib/reality/describers/wikidata/actions/clientlogin.rb +0 -86
- data/lib/reality/describers/wikidata/actions/compare.rb +0 -71
- data/lib/reality/describers/wikidata/actions/createaccount.rb +0 -86
- data/lib/reality/describers/wikidata/actions/cspreport.rb +0 -38
- data/lib/reality/describers/wikidata/actions/delete.rb +0 -103
- data/lib/reality/describers/wikidata/actions/deleteglobalaccount.rb +0 -47
- data/lib/reality/describers/wikidata/actions/echomarkread.rb +0 -77
- data/lib/reality/describers/wikidata/actions/echomarkseen.rb +0 -57
- data/lib/reality/describers/wikidata/actions/edit.rb +0 -266
- data/lib/reality/describers/wikidata/actions/editmassmessagelist.rb +0 -65
- data/lib/reality/describers/wikidata/actions/emailuser.rb +0 -62
- data/lib/reality/describers/wikidata/actions/expandtemplates.rb +0 -129
- data/lib/reality/describers/wikidata/actions/fancycaptchareload.rb +0 -25
- data/lib/reality/describers/wikidata/actions/featuredfeed.rb +0 -57
- data/lib/reality/describers/wikidata/actions/feedcontributions.rb +0 -121
- data/lib/reality/describers/wikidata/actions/feedrecentchanges.rb +0 -159
- data/lib/reality/describers/wikidata/actions/feedwatchlist.rb +0 -108
- data/lib/reality/describers/wikidata/actions/filerevert.rb +0 -55
- data/lib/reality/describers/wikidata/actions/flow-parsoid-utils.rb +0 -73
- data/lib/reality/describers/wikidata/actions/flow.rb +0 -72
- data/lib/reality/describers/wikidata/actions/flowthank.rb +0 -39
- data/lib/reality/describers/wikidata/actions/globalblock.rb +0 -76
- data/lib/reality/describers/wikidata/actions/globaluserrights.rb +0 -94
- data/lib/reality/describers/wikidata/actions/graph.rb +0 -47
- data/lib/reality/describers/wikidata/actions/groupreview.rb +0 -55
- data/lib/reality/describers/wikidata/actions/help.rb +0 -64
- data/lib/reality/describers/wikidata/actions/imagerotate.rb +0 -25
- data/lib/reality/describers/wikidata/actions/import.rb +0 -116
- data/lib/reality/describers/wikidata/actions/jsonconfig.rb +0 -60
- data/lib/reality/describers/wikidata/actions/jsondata.rb +0 -31
- data/lib/reality/describers/wikidata/actions/languagesearch.rb +0 -39
- data/lib/reality/describers/wikidata/actions/linkaccount.rb +0 -79
- data/lib/reality/describers/wikidata/actions/login.rb +0 -55
- data/lib/reality/describers/wikidata/actions/logout.rb +0 -25
- data/lib/reality/describers/wikidata/actions/managetags.rb +0 -80
- data/lib/reality/describers/wikidata/actions/massmessage.rb +0 -55
- data/lib/reality/describers/wikidata/actions/mergehistory.rb +0 -79
- data/lib/reality/describers/wikidata/actions/mobileview.rb +0 -170
- data/lib/reality/describers/wikidata/actions/move.rb +0 -131
- data/lib/reality/describers/wikidata/actions/oathvalidate.rb +0 -47
- data/lib/reality/describers/wikidata/actions/opensearch.rb +0 -92
- data/lib/reality/describers/wikidata/actions/options.rb +0 -80
- data/lib/reality/describers/wikidata/actions/paraminfo.rb +0 -91
- data/lib/reality/describers/wikidata/actions/parsoid-batch.rb +0 -31
- data/lib/reality/describers/wikidata/actions/patrol.rb +0 -60
- data/lib/reality/describers/wikidata/actions/protect.rb +0 -121
- data/lib/reality/describers/wikidata/actions/purge.rb +0 -152
- data/lib/reality/describers/wikidata/actions/removeauthenticationdata.rb +0 -39
- data/lib/reality/describers/wikidata/actions/resetpassword.rb +0 -47
- data/lib/reality/describers/wikidata/actions/revisiondelete.rb +0 -125
- data/lib/reality/describers/wikidata/actions/rollback.rb +0 -96
- data/lib/reality/describers/wikidata/actions/rsd.rb +0 -25
- data/lib/reality/describers/wikidata/actions/sanitize-mapdata.rb +0 -39
- data/lib/reality/describers/wikidata/actions/scribunto-console.rb +0 -62
- data/lib/reality/describers/wikidata/actions/searchtranslations.rb +0 -113
- data/lib/reality/describers/wikidata/actions/setglobalaccountstatus.rb +0 -81
- data/lib/reality/describers/wikidata/actions/setnotificationtimestamp.rb +0 -177
- data/lib/reality/describers/wikidata/actions/setpagelanguage.rb +0 -81
- data/lib/reality/describers/wikidata/actions/shortenurl.rb +0 -31
- data/lib/reality/describers/wikidata/actions/sitematrix.rb +0 -91
- data/lib/reality/describers/wikidata/actions/spamblacklist.rb +0 -36
- data/lib/reality/describers/wikidata/actions/stashedit.rb +0 -113
- data/lib/reality/describers/wikidata/actions/strikevote.rb +0 -60
- data/lib/reality/describers/wikidata/actions/tag.rb +0 -117
- data/lib/reality/describers/wikidata/actions/templatedata.rb +0 -145
- data/lib/reality/describers/wikidata/actions/thank.rb +0 -47
- data/lib/reality/describers/wikidata/actions/titleblacklist.rb +0 -51
- data/lib/reality/describers/wikidata/actions/tokens.rb +0 -36
- data/lib/reality/describers/wikidata/actions/transcodereset.rb +0 -47
- data/lib/reality/describers/wikidata/actions/translatesandbox.rb +0 -81
- data/lib/reality/describers/wikidata/actions/translationaids.rb +0 -52
- data/lib/reality/describers/wikidata/actions/translationreview.rb +0 -39
- data/lib/reality/describers/wikidata/actions/translationstash.rb +0 -76
- data/lib/reality/describers/wikidata/actions/ttmserver.rb +0 -60
- data/lib/reality/describers/wikidata/actions/ulslocalization.rb +0 -31
- data/lib/reality/describers/wikidata/actions/unblock.rb +0 -76
- data/lib/reality/describers/wikidata/actions/undelete.rb +0 -99
- data/lib/reality/describers/wikidata/actions/unlinkaccount.rb +0 -39
- data/lib/reality/describers/wikidata/actions/upload.rb +0 -172
- data/lib/reality/describers/wikidata/actions/userrights.rb +0 -107
- data/lib/reality/describers/wikidata/actions/validatepassword.rb +0 -55
- data/lib/reality/describers/wikidata/actions/visualeditor.rb +0 -96
- data/lib/reality/describers/wikidata/actions/visualeditoredit.rb +0 -164
- data/lib/reality/describers/wikidata/actions/watch.rb +0 -161
- data/lib/reality/describers/wikidata/actions/wbavailablebadges.rb +0 -25
- data/lib/reality/describers/wikidata/actions/wbcheckconstraints.rb +0 -62
- data/lib/reality/describers/wikidata/actions/wbcreateclaim.rb +0 -91
- data/lib/reality/describers/wikidata/actions/wbcreateredirect.rb +0 -54
- data/lib/reality/describers/wikidata/actions/wbeditentity.rb +0 -111
- data/lib/reality/describers/wikidata/actions/wblinktitles.rb +0 -80
- data/lib/reality/describers/wikidata/actions/wbmergeitems.rb +0 -75
- data/lib/reality/describers/wikidata/actions/wbremoveclaims.rb +0 -67
- data/lib/reality/describers/wikidata/actions/wbremovequalifiers.rb +0 -75
- data/lib/reality/describers/wikidata/actions/wbremovereferences.rb +0 -75
- data/lib/reality/describers/wikidata/actions/wbsetaliases.rb +0 -148
- data/lib/reality/describers/wikidata/actions/wbsetclaim.rb +0 -70
- data/lib/reality/describers/wikidata/actions/wbsetclaimvalue.rb +0 -83
- data/lib/reality/describers/wikidata/actions/wbsetdescription.rb +0 -117
- data/lib/reality/describers/wikidata/actions/wbsetlabel.rb +0 -117
- data/lib/reality/describers/wikidata/actions/wbsetqualifier.rb +0 -99
- data/lib/reality/describers/wikidata/actions/wbsetreference.rb +0 -94
- data/lib/reality/describers/wikidata/actions/wbsetsitelink.rb +0 -130
- data/lib/reality/describers/wikidata/actions/wbsgetsuggestions.rb +0 -94
- data/lib/reality/describers/wikidata/actions/webapp-manifest.rb +0 -25
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Dump of CirrusSearch settings for this wiki.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.cirrus-settings-dump.perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.cirrus-settings-dump.response # returns output parsed and wrapped into Mash-like object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# This action has no parameters.
|
|
16
|
-
#
|
|
17
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
18
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
19
|
-
#
|
|
20
|
-
# All action's parameters are documented as its public methods, see below.
|
|
21
|
-
#
|
|
22
|
-
class CirrusSettingsDump < Reality::Describers::Wikidata::Impl::Actions::Get
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Clears the hasmsg flag for the current user.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.clearhasmsg.perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.clearhasmsg.response # returns output parsed and wrapped into Mash-like object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# This action has no parameters.
|
|
16
|
-
#
|
|
17
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
18
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
19
|
-
#
|
|
20
|
-
# All action's parameters are documented as its public methods, see below.
|
|
21
|
-
#
|
|
22
|
-
class Clearhasmsg < Reality::Describers::Wikidata::Impl::Actions::Post
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Log in to the wiki using the interactive flow.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.clientlogin.requests(value).perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.clientlogin.requests(value).response # returns output parsed and wrapped into Response object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
16
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
17
|
-
#
|
|
18
|
-
# All action's parameters are documented as its public methods, see below.
|
|
19
|
-
#
|
|
20
|
-
class Clientlogin < Reality::Describers::Wikidata::Impl::Actions::Post
|
|
21
|
-
|
|
22
|
-
# Only use these authentication requests, by the id returned from action=query&meta=authmanagerinfo with amirequestsfor=login or from a previous response from this module.
|
|
23
|
-
#
|
|
24
|
-
# @param values [Array<String>]
|
|
25
|
-
# @return [self]
|
|
26
|
-
def requests(*values)
|
|
27
|
-
values.inject(self) { |res, val| res._requests(val) }
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @private
|
|
31
|
-
def _requests(value)
|
|
32
|
-
merge(loginrequests: value.to_s, replace: false)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# Format to use for returning messages.
|
|
36
|
-
#
|
|
37
|
-
# @param value [String] One of "html", "wikitext", "raw", "none".
|
|
38
|
-
# @return [self]
|
|
39
|
-
def messageformat(value)
|
|
40
|
-
_messageformat(value) or fail ArgumentError, "Unknown value for messageformat: #{value}"
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# @private
|
|
44
|
-
def _messageformat(value)
|
|
45
|
-
defined?(super) && super || ["html", "wikitext", "raw", "none"].include?(value.to_s) && merge(loginmessageformat: value.to_s)
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# Merge field information for all authentication requests into one array.
|
|
49
|
-
#
|
|
50
|
-
# @return [self]
|
|
51
|
-
def mergerequestfields()
|
|
52
|
-
merge(loginmergerequestfields: 'true')
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Preserve state from a previous failed login attempt, if possible.
|
|
56
|
-
#
|
|
57
|
-
# @return [self]
|
|
58
|
-
def preservestate()
|
|
59
|
-
merge(loginpreservestate: 'true')
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Return URL for third-party authentication flows, must be absolute. Either this or logincontinue is required.
|
|
63
|
-
#
|
|
64
|
-
# @param value [String]
|
|
65
|
-
# @return [self]
|
|
66
|
-
def returnurl(value)
|
|
67
|
-
merge(loginreturnurl: value.to_s)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# This request is a continuation after an earlier UI or REDIRECT response. Either this or loginreturnurl is required.
|
|
71
|
-
#
|
|
72
|
-
# @return [self]
|
|
73
|
-
def continue()
|
|
74
|
-
merge(logincontinue: 'true')
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# A "login" token retrieved from action=query&meta=tokens
|
|
78
|
-
#
|
|
79
|
-
# @param value [String]
|
|
80
|
-
# @return [self]
|
|
81
|
-
def token(value)
|
|
82
|
-
merge(logintoken: value.to_s)
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Get the difference between 2 pages.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.compare.fromtitle(value).perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.compare.fromtitle(value).response # returns output parsed and wrapped into Response object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
16
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
17
|
-
#
|
|
18
|
-
# All action's parameters are documented as its public methods, see below.
|
|
19
|
-
#
|
|
20
|
-
class Compare < Reality::Describers::Wikidata::Impl::Actions::Get
|
|
21
|
-
|
|
22
|
-
# First title to compare.
|
|
23
|
-
#
|
|
24
|
-
# @param value [String]
|
|
25
|
-
# @return [self]
|
|
26
|
-
def fromtitle(value)
|
|
27
|
-
merge(fromtitle: value.to_s)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# First page ID to compare.
|
|
31
|
-
#
|
|
32
|
-
# @param value [Integer]
|
|
33
|
-
# @return [self]
|
|
34
|
-
def fromid(value)
|
|
35
|
-
merge(fromid: value.to_s)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# First revision to compare.
|
|
39
|
-
#
|
|
40
|
-
# @param value [Integer]
|
|
41
|
-
# @return [self]
|
|
42
|
-
def fromrev(value)
|
|
43
|
-
merge(fromrev: value.to_s)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Second title to compare.
|
|
47
|
-
#
|
|
48
|
-
# @param value [String]
|
|
49
|
-
# @return [self]
|
|
50
|
-
def totitle(value)
|
|
51
|
-
merge(totitle: value.to_s)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# Second page ID to compare.
|
|
55
|
-
#
|
|
56
|
-
# @param value [Integer]
|
|
57
|
-
# @return [self]
|
|
58
|
-
def toid(value)
|
|
59
|
-
merge(toid: value.to_s)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Second revision to compare.
|
|
63
|
-
#
|
|
64
|
-
# @param value [Integer]
|
|
65
|
-
# @return [self]
|
|
66
|
-
def torev(value)
|
|
67
|
-
merge(torev: value.to_s)
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end
|
|
71
|
-
end
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Create a new user account.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.createaccount.requests(value).perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.createaccount.requests(value).response # returns output parsed and wrapped into Response object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
16
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
17
|
-
#
|
|
18
|
-
# All action's parameters are documented as its public methods, see below.
|
|
19
|
-
#
|
|
20
|
-
class Createaccount < Reality::Describers::Wikidata::Impl::Actions::Post
|
|
21
|
-
|
|
22
|
-
# Only use these authentication requests, by the id returned from action=query&meta=authmanagerinfo with amirequestsfor=create or from a previous response from this module.
|
|
23
|
-
#
|
|
24
|
-
# @param values [Array<String>]
|
|
25
|
-
# @return [self]
|
|
26
|
-
def requests(*values)
|
|
27
|
-
values.inject(self) { |res, val| res._requests(val) }
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @private
|
|
31
|
-
def _requests(value)
|
|
32
|
-
merge(createrequests: value.to_s, replace: false)
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
# Format to use for returning messages.
|
|
36
|
-
#
|
|
37
|
-
# @param value [String] One of "html", "wikitext", "raw", "none".
|
|
38
|
-
# @return [self]
|
|
39
|
-
def messageformat(value)
|
|
40
|
-
_messageformat(value) or fail ArgumentError, "Unknown value for messageformat: #{value}"
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
# @private
|
|
44
|
-
def _messageformat(value)
|
|
45
|
-
defined?(super) && super || ["html", "wikitext", "raw", "none"].include?(value.to_s) && merge(createmessageformat: value.to_s)
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
# Merge field information for all authentication requests into one array.
|
|
49
|
-
#
|
|
50
|
-
# @return [self]
|
|
51
|
-
def mergerequestfields()
|
|
52
|
-
merge(createmergerequestfields: 'true')
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
# Preserve state from a previous failed login attempt, if possible.
|
|
56
|
-
#
|
|
57
|
-
# @return [self]
|
|
58
|
-
def preservestate()
|
|
59
|
-
merge(createpreservestate: 'true')
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Return URL for third-party authentication flows, must be absolute. Either this or createcontinue is required.
|
|
63
|
-
#
|
|
64
|
-
# @param value [String]
|
|
65
|
-
# @return [self]
|
|
66
|
-
def returnurl(value)
|
|
67
|
-
merge(createreturnurl: value.to_s)
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
# This request is a continuation after an earlier UI or REDIRECT response. Either this or createreturnurl is required.
|
|
71
|
-
#
|
|
72
|
-
# @return [self]
|
|
73
|
-
def continue()
|
|
74
|
-
merge(createcontinue: 'true')
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
# A "createaccount" token retrieved from action=query&meta=tokens
|
|
78
|
-
#
|
|
79
|
-
# @param value [String]
|
|
80
|
-
# @return [self]
|
|
81
|
-
def token(value)
|
|
82
|
-
merge(createtoken: value.to_s)
|
|
83
|
-
end
|
|
84
|
-
end
|
|
85
|
-
end
|
|
86
|
-
end
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Used by browsers to report violations of the Content Security Policy. This module should never be used, except when used automatically by a CSP compliant web browser.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.cspreport.reportonly(value).perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.cspreport.reportonly(value).response # returns output parsed and wrapped into Response object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
16
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
17
|
-
#
|
|
18
|
-
# All action's parameters are documented as its public methods, see below.
|
|
19
|
-
#
|
|
20
|
-
class Cspreport < Reality::Describers::Wikidata::Impl::Actions::Post
|
|
21
|
-
|
|
22
|
-
# Mark as being a report from a monitoring policy, not an enforced policy
|
|
23
|
-
#
|
|
24
|
-
# @return [self]
|
|
25
|
-
def reportonly()
|
|
26
|
-
merge(reportonly: 'true')
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# What generated the CSP header that triggered this report
|
|
30
|
-
#
|
|
31
|
-
# @param value [String]
|
|
32
|
-
# @return [self]
|
|
33
|
-
def source(value)
|
|
34
|
-
merge(source: value.to_s)
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Delete a page.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.delete.title(value).perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.delete.title(value).response # returns output parsed and wrapped into Response object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
16
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
17
|
-
#
|
|
18
|
-
# All action's parameters are documented as its public methods, see below.
|
|
19
|
-
#
|
|
20
|
-
class Delete < Reality::Describers::Wikidata::Impl::Actions::Post
|
|
21
|
-
|
|
22
|
-
# Title of the page to delete. Cannot be used together with pageid.
|
|
23
|
-
#
|
|
24
|
-
# @param value [String]
|
|
25
|
-
# @return [self]
|
|
26
|
-
def title(value)
|
|
27
|
-
merge(title: value.to_s)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Page ID of the page to delete. Cannot be used together with title.
|
|
31
|
-
#
|
|
32
|
-
# @param value [Integer]
|
|
33
|
-
# @return [self]
|
|
34
|
-
def pageid(value)
|
|
35
|
-
merge(pageid: value.to_s)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# Reason for the deletion. If not set, an automatically generated reason will be used.
|
|
39
|
-
#
|
|
40
|
-
# @param value [String]
|
|
41
|
-
# @return [self]
|
|
42
|
-
def reason(value)
|
|
43
|
-
merge(reason: value.to_s)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Change tags to apply to the entry in the deletion log.
|
|
47
|
-
#
|
|
48
|
-
# @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
|
|
49
|
-
# @return [self]
|
|
50
|
-
def tags(*values)
|
|
51
|
-
values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# @private
|
|
55
|
-
def _tags(value)
|
|
56
|
-
defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
# Add the page to the current user's watchlist.
|
|
60
|
-
#
|
|
61
|
-
# @return [self]
|
|
62
|
-
def watch()
|
|
63
|
-
merge(watch: 'true')
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.
|
|
67
|
-
#
|
|
68
|
-
# @param value [String] One of "watch", "unwatch", "preferences", "nochange".
|
|
69
|
-
# @return [self]
|
|
70
|
-
def watchlist(value)
|
|
71
|
-
_watchlist(value) or fail ArgumentError, "Unknown value for watchlist: #{value}"
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
# @private
|
|
75
|
-
def _watchlist(value)
|
|
76
|
-
defined?(super) && super || ["watch", "unwatch", "preferences", "nochange"].include?(value.to_s) && merge(watchlist: value.to_s)
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
# Remove the page from the current user's watchlist.
|
|
80
|
-
#
|
|
81
|
-
# @return [self]
|
|
82
|
-
def unwatch()
|
|
83
|
-
merge(unwatch: 'true')
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# The name of the old image to delete as provided by action=query&prop=imageinfo&iiprop=archivename.
|
|
87
|
-
#
|
|
88
|
-
# @param value [String]
|
|
89
|
-
# @return [self]
|
|
90
|
-
def oldimage(value)
|
|
91
|
-
merge(oldimage: value.to_s)
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
# A "csrf" token retrieved from action=query&meta=tokens
|
|
95
|
-
#
|
|
96
|
-
# @param value [String]
|
|
97
|
-
# @return [self]
|
|
98
|
-
def token(value)
|
|
99
|
-
merge(token: value.to_s)
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
|
4
|
-
module Actions
|
|
5
|
-
# Delete a global user.
|
|
6
|
-
#
|
|
7
|
-
# Usage:
|
|
8
|
-
#
|
|
9
|
-
# ```ruby
|
|
10
|
-
# api.deleteglobalaccount.user(value).perform # returns string with raw output
|
|
11
|
-
# # or
|
|
12
|
-
# api.deleteglobalaccount.user(value).response # returns output parsed and wrapped into Response object
|
|
13
|
-
# ```
|
|
14
|
-
#
|
|
15
|
-
# See {Base} for generic explanation of working with MediaWiki actions and
|
|
16
|
-
# {Reality::Describers::Wikidata::Impl::Response} for working with action responses.
|
|
17
|
-
#
|
|
18
|
-
# All action's parameters are documented as its public methods, see below.
|
|
19
|
-
#
|
|
20
|
-
class Deleteglobalaccount < Reality::Describers::Wikidata::Impl::Actions::Post
|
|
21
|
-
|
|
22
|
-
# User to delete.
|
|
23
|
-
#
|
|
24
|
-
# @param value [String]
|
|
25
|
-
# @return [self]
|
|
26
|
-
def user(value)
|
|
27
|
-
merge(user: value.to_s)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# Reason for deleting the user.
|
|
31
|
-
#
|
|
32
|
-
# @param value [String]
|
|
33
|
-
# @return [self]
|
|
34
|
-
def reason(value)
|
|
35
|
-
merge(reason: value.to_s)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
# A "deleteglobalaccount" token retrieved from action=query&meta=tokens
|
|
39
|
-
#
|
|
40
|
-
# @param value [String]
|
|
41
|
-
# @return [self]
|
|
42
|
-
def token(value)
|
|
43
|
-
merge(token: value.to_s)
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|