reality 0.1.0.alpha → 0.1.0.alpha2
Sign up to get free protection for your applications and to get access to all the features.
- 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,108 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Returns a watchlist feed.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.feedwatchlist.feedformat(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.feedwatchlist.feedformat(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 Feedwatchlist < Reality::Describers::Wikidata::Impl::Actions::Get
|
21
|
-
|
22
|
-
# The format of the feed.
|
23
|
-
#
|
24
|
-
# @param value [String] One of "rss", "atom".
|
25
|
-
# @return [self]
|
26
|
-
def feedformat(value)
|
27
|
-
_feedformat(value) or fail ArgumentError, "Unknown value for feedformat: #{value}"
|
28
|
-
end
|
29
|
-
|
30
|
-
# @private
|
31
|
-
def _feedformat(value)
|
32
|
-
defined?(super) && super || ["rss", "atom"].include?(value.to_s) && merge(feedformat: value.to_s)
|
33
|
-
end
|
34
|
-
|
35
|
-
# List pages modified within this many hours from now.
|
36
|
-
#
|
37
|
-
# @param value [Integer]
|
38
|
-
# @return [self]
|
39
|
-
def hours(value)
|
40
|
-
merge(hours: value.to_s)
|
41
|
-
end
|
42
|
-
|
43
|
-
# Link directly to changed sections if possible.
|
44
|
-
#
|
45
|
-
# @return [self]
|
46
|
-
def linktosections()
|
47
|
-
merge(linktosections: 'true')
|
48
|
-
end
|
49
|
-
|
50
|
-
# Include multiple revisions of the same page within given timeframe.
|
51
|
-
#
|
52
|
-
# @return [self]
|
53
|
-
def allrev()
|
54
|
-
merge(allrev: 'true')
|
55
|
-
end
|
56
|
-
|
57
|
-
# Used along with token to access a different user's watchlist.
|
58
|
-
#
|
59
|
-
# @param value [String]
|
60
|
-
# @return [self]
|
61
|
-
def wlowner(value)
|
62
|
-
merge(wlowner: value.to_s)
|
63
|
-
end
|
64
|
-
|
65
|
-
# A security token (available in the user's preferences) to allow access to another user's watchlist.
|
66
|
-
#
|
67
|
-
# @param value [String]
|
68
|
-
# @return [self]
|
69
|
-
def wltoken(value)
|
70
|
-
merge(wltoken: value.to_s)
|
71
|
-
end
|
72
|
-
|
73
|
-
# Show only items that meet these criteria. For example, to see only minor edits done by logged-in users, set show=minor|!anon.
|
74
|
-
#
|
75
|
-
# @param values [Array<String>] Allowed values: "minor", "!minor", "bot", "!bot", "anon", "!anon", "patrolled", "!patrolled", "unread", "!unread".
|
76
|
-
# @return [self]
|
77
|
-
def wlshow(*values)
|
78
|
-
values.inject(self) { |res, val| res._wlshow(val) or fail ArgumentError, "Unknown value for wlshow: #{val}" }
|
79
|
-
end
|
80
|
-
|
81
|
-
# @private
|
82
|
-
def _wlshow(value)
|
83
|
-
defined?(super) && super || ["minor", "!minor", "bot", "!bot", "anon", "!anon", "patrolled", "!patrolled", "unread", "!unread"].include?(value.to_s) && merge(wlshow: value.to_s, replace: false)
|
84
|
-
end
|
85
|
-
|
86
|
-
# Which types of changes to show:
|
87
|
-
#
|
88
|
-
# @param values [Array<String>] Allowed values: "edit" (Regular page edits), "new" (Page creations), "log" (Log entries), "external" (External changes), "categorize" (Category membership changes).
|
89
|
-
# @return [self]
|
90
|
-
def wltype(*values)
|
91
|
-
values.inject(self) { |res, val| res._wltype(val) or fail ArgumentError, "Unknown value for wltype: #{val}" }
|
92
|
-
end
|
93
|
-
|
94
|
-
# @private
|
95
|
-
def _wltype(value)
|
96
|
-
defined?(super) && super || ["edit", "new", "log", "external", "categorize"].include?(value.to_s) && merge(wltype: value.to_s, replace: false)
|
97
|
-
end
|
98
|
-
|
99
|
-
# Don't list changes by this user.
|
100
|
-
#
|
101
|
-
# @param value [String]
|
102
|
-
# @return [self]
|
103
|
-
def wlexcludeuser(value)
|
104
|
-
merge(wlexcludeuser: value.to_s)
|
105
|
-
end
|
106
|
-
end
|
107
|
-
end
|
108
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Revert a file to an old version.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.filerevert.filename(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.filerevert.filename(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 Filerevert < Reality::Describers::Wikidata::Impl::Actions::Post
|
21
|
-
|
22
|
-
# Target filename, without the File: prefix.
|
23
|
-
#
|
24
|
-
# @param value [String]
|
25
|
-
# @return [self]
|
26
|
-
def filename(value)
|
27
|
-
merge(filename: value.to_s)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Upload comment.
|
31
|
-
#
|
32
|
-
# @param value [String]
|
33
|
-
# @return [self]
|
34
|
-
def comment(value)
|
35
|
-
merge(comment: value.to_s)
|
36
|
-
end
|
37
|
-
|
38
|
-
# Archive name of the revision to revert to.
|
39
|
-
#
|
40
|
-
# @param value [String]
|
41
|
-
# @return [self]
|
42
|
-
def archivename(value)
|
43
|
-
merge(archivename: value.to_s)
|
44
|
-
end
|
45
|
-
|
46
|
-
# A "csrf" token retrieved from action=query&meta=tokens
|
47
|
-
#
|
48
|
-
# @param value [String]
|
49
|
-
# @return [self]
|
50
|
-
def token(value)
|
51
|
-
merge(token: value.to_s)
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,73 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Convert text between wikitext and HTML.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.flow-parsoid-utils.from(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.flow-parsoid-utils.from(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 FlowParsoidUtils < Reality::Describers::Wikidata::Impl::Actions::Get
|
21
|
-
|
22
|
-
# Format to convert content from.
|
23
|
-
#
|
24
|
-
# @param value [String] One of "html", "wikitext".
|
25
|
-
# @return [self]
|
26
|
-
def from(value)
|
27
|
-
_from(value) or fail ArgumentError, "Unknown value for from: #{value}"
|
28
|
-
end
|
29
|
-
|
30
|
-
# @private
|
31
|
-
def _from(value)
|
32
|
-
defined?(super) && super || ["html", "wikitext"].include?(value.to_s) && merge(from: value.to_s)
|
33
|
-
end
|
34
|
-
|
35
|
-
# Format to convert content to.
|
36
|
-
#
|
37
|
-
# @param value [String] One of "html", "wikitext".
|
38
|
-
# @return [self]
|
39
|
-
def to(value)
|
40
|
-
_to(value) or fail ArgumentError, "Unknown value for to: #{value}"
|
41
|
-
end
|
42
|
-
|
43
|
-
# @private
|
44
|
-
def _to(value)
|
45
|
-
defined?(super) && super || ["html", "wikitext"].include?(value.to_s) && merge(to: value.to_s)
|
46
|
-
end
|
47
|
-
|
48
|
-
# Content to be converted.
|
49
|
-
#
|
50
|
-
# @param value [String]
|
51
|
-
# @return [self]
|
52
|
-
def content(value)
|
53
|
-
merge(content: value.to_s)
|
54
|
-
end
|
55
|
-
|
56
|
-
# Title of the page. Cannot be used together with pageid.
|
57
|
-
#
|
58
|
-
# @param value [String]
|
59
|
-
# @return [self]
|
60
|
-
def title(value)
|
61
|
-
merge(title: value.to_s)
|
62
|
-
end
|
63
|
-
|
64
|
-
# ID of the page. Cannot be used together with title.
|
65
|
-
#
|
66
|
-
# @param value [Integer]
|
67
|
-
# @return [self]
|
68
|
-
def pageid(value)
|
69
|
-
merge(pageid: value.to_s)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
@@ -1,72 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Allows actions to be taken on Flow pages.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.flow.submodule(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.flow.submodule(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 Flow < Reality::Describers::Wikidata::Impl::Actions::Get
|
21
|
-
|
22
|
-
# The Flow submodule to invoke.
|
23
|
-
#
|
24
|
-
# @param value [Symbol] Selecting an option includes tweaking methods from corresponding module:
|
25
|
-
# * `:close-open-topic` - {Reality::Describers::Wikidata::Impl::Modules::CloseOpenTopic} Deprecated in favor of action=flow&submodule=lock-topic.
|
26
|
-
# * `:edit-header` - {Reality::Describers::Wikidata::Impl::Modules::EditHeader} Edits a board description.
|
27
|
-
# * `:edit-post` - {Reality::Describers::Wikidata::Impl::Modules::EditPost} Edits a post's content.
|
28
|
-
# * `:edit-title` - {Reality::Describers::Wikidata::Impl::Modules::EditTitle} Edits a topic's title.
|
29
|
-
# * `:edit-topic-summary` - {Reality::Describers::Wikidata::Impl::Modules::EditTopicSummary} Edits a topic summary's content.
|
30
|
-
# * `:lock-topic` - {Reality::Describers::Wikidata::Impl::Modules::LockTopic} Lock or unlock a Flow topic.
|
31
|
-
# * `:moderate-post` - {Reality::Describers::Wikidata::Impl::Modules::ModeratePost} Moderates a Flow post.
|
32
|
-
# * `:moderate-topic` - {Reality::Describers::Wikidata::Impl::Modules::ModerateTopic} Moderates a Flow topic.
|
33
|
-
# * `:new-topic` - {Reality::Describers::Wikidata::Impl::Modules::NewTopic} Creates a new Flow topic on the given workflow.
|
34
|
-
# * `:reply` - {Reality::Describers::Wikidata::Impl::Modules::Reply} Replies to a post.
|
35
|
-
# * `:undo-edit-header` - {Reality::Describers::Wikidata::Impl::Modules::UndoEditHeader} Retrieve information necessary to undo description edits.
|
36
|
-
# * `:undo-edit-post` - {Reality::Describers::Wikidata::Impl::Modules::UndoEditPost} Retrieve information necesary to undo post edit.
|
37
|
-
# * `:undo-edit-topic-summary` - {Reality::Describers::Wikidata::Impl::Modules::UndoEditTopicSummary} Retrieve information necessary to undo topic summary edits.
|
38
|
-
# * `:view-header` - {Reality::Describers::Wikidata::Impl::Modules::ViewHeader} View a board description.
|
39
|
-
# * `:view-post` - {Reality::Describers::Wikidata::Impl::Modules::ViewPost} View a post.
|
40
|
-
# * `:view-post-history` - {Reality::Describers::Wikidata::Impl::Modules::ViewPostHistory} View the revision history of a post.
|
41
|
-
# * `:view-topic` - {Reality::Describers::Wikidata::Impl::Modules::ViewTopic} View a topic.
|
42
|
-
# * `:view-topic-history` - {Reality::Describers::Wikidata::Impl::Modules::ViewTopicHistory} View the revision history of a topic.
|
43
|
-
# * `:view-topic-summary` - {Reality::Describers::Wikidata::Impl::Modules::ViewTopicSummary} View a topic summary.
|
44
|
-
# * `:view-topiclist` - {Reality::Describers::Wikidata::Impl::Modules::ViewTopiclist} View a list of topics.
|
45
|
-
# @return [self]
|
46
|
-
def submodule(value)
|
47
|
-
_submodule(value) or fail ArgumentError, "Unknown value for submodule: #{value}"
|
48
|
-
end
|
49
|
-
|
50
|
-
# @private
|
51
|
-
def _submodule(value)
|
52
|
-
defined?(super) && super || [:"close-open-topic", :"edit-header", :"edit-post", :"edit-title", :"edit-topic-summary", :"lock-topic", :"moderate-post", :"moderate-topic", :"new-topic", :reply, :"undo-edit-header", :"undo-edit-post", :"undo-edit-topic-summary", :"view-header", :"view-post", :"view-post-history", :"view-topic", :"view-topic-history", :"view-topic-summary", :"view-topiclist"].include?(value.to_sym) && merge(submodule: value.to_s).submodule({close_open_topic: Modules::CloseOpenTopic, edit_header: Modules::EditHeader, edit_post: Modules::EditPost, edit_title: Modules::EditTitle, edit_topic_summary: Modules::EditTopicSummary, lock_topic: Modules::LockTopic, moderate_post: Modules::ModeratePost, moderate_topic: Modules::ModerateTopic, new_topic: Modules::NewTopic, reply: Modules::Reply, undo_edit_header: Modules::UndoEditHeader, undo_edit_post: Modules::UndoEditPost, undo_edit_topic_summary: Modules::UndoEditTopicSummary, view_header: Modules::ViewHeader, view_post: Modules::ViewPost, view_post_history: Modules::ViewPostHistory, view_topic: Modules::ViewTopic, view_topic_history: Modules::ViewTopicHistory, view_topic_summary: Modules::ViewTopicSummary, view_topiclist: Modules::ViewTopiclist}[value.to_sym])
|
53
|
-
end
|
54
|
-
|
55
|
-
# The page to take the action on.
|
56
|
-
#
|
57
|
-
# @param value [String]
|
58
|
-
# @return [self]
|
59
|
-
def page(value)
|
60
|
-
merge(page: value.to_s)
|
61
|
-
end
|
62
|
-
|
63
|
-
# A token retrieved from action=query&meta=tokens
|
64
|
-
#
|
65
|
-
# @param value [String]
|
66
|
-
# @return [self]
|
67
|
-
def token(value)
|
68
|
-
merge(token: value.to_s)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Send a public thank-you notification for a Flow comment.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.flowthank.postid(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.flowthank.postid(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 Flowthank < Reality::Describers::Wikidata::Impl::Actions::Post
|
21
|
-
|
22
|
-
# The UUID of the post to thank for.
|
23
|
-
#
|
24
|
-
# @param value [String]
|
25
|
-
# @return [self]
|
26
|
-
def postid(value)
|
27
|
-
merge(postid: value.to_s)
|
28
|
-
end
|
29
|
-
|
30
|
-
# A "csrf" token retrieved from action=query&meta=tokens
|
31
|
-
#
|
32
|
-
# @param value [String]
|
33
|
-
# @return [self]
|
34
|
-
def token(value)
|
35
|
-
merge(token: value.to_s)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
@@ -1,76 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Globally block or unblock a user.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.globalblock.target(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.globalblock.target(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 Globalblock < Reality::Describers::Wikidata::Impl::Actions::Post
|
21
|
-
|
22
|
-
# The target IP address.
|
23
|
-
#
|
24
|
-
# @param value [String]
|
25
|
-
# @return [self]
|
26
|
-
def target(value)
|
27
|
-
merge(target: value.to_s)
|
28
|
-
end
|
29
|
-
|
30
|
-
# If specified, will block or reblock the user. Determines how long the block will last for, e.g. "5 months" or "2 weeks". If set to "infinite" or "indefinite" the block will never expire.
|
31
|
-
#
|
32
|
-
# @param value [String]
|
33
|
-
# @return [self]
|
34
|
-
def expiry(value)
|
35
|
-
merge(expiry: value.to_s)
|
36
|
-
end
|
37
|
-
|
38
|
-
# If specified, will unblock the user.
|
39
|
-
#
|
40
|
-
# @return [self]
|
41
|
-
def unblock()
|
42
|
-
merge(unblock: 'true')
|
43
|
-
end
|
44
|
-
|
45
|
-
# The reason for blocking/unblocking.
|
46
|
-
#
|
47
|
-
# @param value [String]
|
48
|
-
# @return [self]
|
49
|
-
def reason(value)
|
50
|
-
merge(reason: value.to_s)
|
51
|
-
end
|
52
|
-
|
53
|
-
# Specify this if the block should only affect logged-out users.
|
54
|
-
#
|
55
|
-
# @return [self]
|
56
|
-
def anononly()
|
57
|
-
merge(anononly: 'true')
|
58
|
-
end
|
59
|
-
|
60
|
-
# Specify this if the existing block on the target should be modified
|
61
|
-
#
|
62
|
-
# @return [self]
|
63
|
-
def modify()
|
64
|
-
merge(modify: 'true')
|
65
|
-
end
|
66
|
-
|
67
|
-
# A "csrf" token retrieved from action=query&meta=tokens
|
68
|
-
#
|
69
|
-
# @param value [String]
|
70
|
-
# @return [self]
|
71
|
-
def token(value)
|
72
|
-
merge(token: value.to_s)
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
@@ -1,94 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Reality::Describers::Wikidata::Impl
|
4
|
-
module Actions
|
5
|
-
# Add/remove a user to/from global groups.
|
6
|
-
#
|
7
|
-
# Usage:
|
8
|
-
#
|
9
|
-
# ```ruby
|
10
|
-
# api.globaluserrights.user(value).perform # returns string with raw output
|
11
|
-
# # or
|
12
|
-
# api.globaluserrights.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 Globaluserrights < Reality::Describers::Wikidata::Impl::Actions::Post
|
21
|
-
|
22
|
-
# Global user name.
|
23
|
-
#
|
24
|
-
# @param value [String]
|
25
|
-
# @return [self]
|
26
|
-
def user(value)
|
27
|
-
merge(user: value.to_s)
|
28
|
-
end
|
29
|
-
|
30
|
-
# Global user ID.
|
31
|
-
#
|
32
|
-
# @param value [Integer]
|
33
|
-
# @return [self]
|
34
|
-
def userid(value)
|
35
|
-
merge(userid: value.to_s)
|
36
|
-
end
|
37
|
-
|
38
|
-
# Add the user to these global groups.
|
39
|
-
#
|
40
|
-
# @param values [Array<String>] Allowed values: "OTRS-member", "abusefilter-helper", "apihighlimits-requestor", "captcha-exempt", "delete-global", "founder", "global-bot", "global-flow-create", "global-interface-editor", "global-ipblock-exempt", "global-rollbacker", "global-sysop", "new-wikis-importer", "oathauth-tester", "ombudsman", "recursive-export", "staff", "steward", "sysadmin", "wmf-ops-monitoring", "wmf-researcher".
|
41
|
-
# @return [self]
|
42
|
-
def add(*values)
|
43
|
-
values.inject(self) { |res, val| res._add(val) or fail ArgumentError, "Unknown value for add: #{val}" }
|
44
|
-
end
|
45
|
-
|
46
|
-
# @private
|
47
|
-
def _add(value)
|
48
|
-
defined?(super) && super || ["OTRS-member", "abusefilter-helper", "apihighlimits-requestor", "captcha-exempt", "delete-global", "founder", "global-bot", "global-flow-create", "global-interface-editor", "global-ipblock-exempt", "global-rollbacker", "global-sysop", "new-wikis-importer", "oathauth-tester", "ombudsman", "recursive-export", "staff", "steward", "sysadmin", "wmf-ops-monitoring", "wmf-researcher"].include?(value.to_s) && merge(add: value.to_s, replace: false)
|
49
|
-
end
|
50
|
-
|
51
|
-
# Remove the user from these global groups.
|
52
|
-
#
|
53
|
-
# @param values [Array<String>] Allowed values: "OTRS-member", "abusefilter-helper", "apihighlimits-requestor", "captcha-exempt", "delete-global", "founder", "global-bot", "global-flow-create", "global-interface-editor", "global-ipblock-exempt", "global-rollbacker", "global-sysop", "new-wikis-importer", "oathauth-tester", "ombudsman", "recursive-export", "staff", "steward", "sysadmin", "wmf-ops-monitoring", "wmf-researcher".
|
54
|
-
# @return [self]
|
55
|
-
def remove(*values)
|
56
|
-
values.inject(self) { |res, val| res._remove(val) or fail ArgumentError, "Unknown value for remove: #{val}" }
|
57
|
-
end
|
58
|
-
|
59
|
-
# @private
|
60
|
-
def _remove(value)
|
61
|
-
defined?(super) && super || ["OTRS-member", "abusefilter-helper", "apihighlimits-requestor", "captcha-exempt", "delete-global", "founder", "global-bot", "global-flow-create", "global-interface-editor", "global-ipblock-exempt", "global-rollbacker", "global-sysop", "new-wikis-importer", "oathauth-tester", "ombudsman", "recursive-export", "staff", "steward", "sysadmin", "wmf-ops-monitoring", "wmf-researcher"].include?(value.to_s) && merge(remove: value.to_s, replace: false)
|
62
|
-
end
|
63
|
-
|
64
|
-
# Reason for the change.
|
65
|
-
#
|
66
|
-
# @param value [String]
|
67
|
-
# @return [self]
|
68
|
-
def reason(value)
|
69
|
-
merge(reason: value.to_s)
|
70
|
-
end
|
71
|
-
|
72
|
-
# A "userrights" token retrieved from action=query&meta=tokens
|
73
|
-
#
|
74
|
-
# @param value [String]
|
75
|
-
# @return [self]
|
76
|
-
def token(value)
|
77
|
-
merge(token: value.to_s)
|
78
|
-
end
|
79
|
-
|
80
|
-
# This parameter is currently unused.
|
81
|
-
#
|
82
|
-
# @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
|
83
|
-
# @return [self]
|
84
|
-
def tags(*values)
|
85
|
-
values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
|
86
|
-
end
|
87
|
-
|
88
|
-
# @private
|
89
|
-
def _tags(value)
|
90
|
-
defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|