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.
Files changed (127) hide show
  1. checksums.yaml +4 -4
  2. data/lib/reality/describers/wikidata.rb +2 -1
  3. data/lib/reality/describers/wikidata/sparql.rb +0 -1
  4. data/lib/reality/version.rb +1 -1
  5. metadata +2 -124
  6. data/lib/reality/describers/wikidata/actions/abusefiltercheckmatch.rb +0 -55
  7. data/lib/reality/describers/wikidata/actions/abusefilterchecksyntax.rb +0 -31
  8. data/lib/reality/describers/wikidata/actions/abusefilterevalexpression.rb +0 -31
  9. data/lib/reality/describers/wikidata/actions/abusefilterunblockautopromote.rb +0 -39
  10. data/lib/reality/describers/wikidata/actions/aggregategroups.rb +0 -76
  11. data/lib/reality/describers/wikidata/actions/antispoof.rb +0 -31
  12. data/lib/reality/describers/wikidata/actions/block.rb +0 -132
  13. data/lib/reality/describers/wikidata/actions/bouncehandler.rb +0 -31
  14. data/lib/reality/describers/wikidata/actions/categorytree.rb +0 -39
  15. data/lib/reality/describers/wikidata/actions/centralauthtoken.rb +0 -25
  16. data/lib/reality/describers/wikidata/actions/centralnoticechoicedata.rb +0 -39
  17. data/lib/reality/describers/wikidata/actions/centralnoticequerycampaign.rb +0 -31
  18. data/lib/reality/describers/wikidata/actions/changeauthenticationdata.rb +0 -39
  19. data/lib/reality/describers/wikidata/actions/checktoken.rb +0 -52
  20. data/lib/reality/describers/wikidata/actions/cirrus-config-dump.rb +0 -25
  21. data/lib/reality/describers/wikidata/actions/cirrus-mapping-dump.rb +0 -25
  22. data/lib/reality/describers/wikidata/actions/cirrus-settings-dump.rb +0 -25
  23. data/lib/reality/describers/wikidata/actions/clearhasmsg.rb +0 -25
  24. data/lib/reality/describers/wikidata/actions/clientlogin.rb +0 -86
  25. data/lib/reality/describers/wikidata/actions/compare.rb +0 -71
  26. data/lib/reality/describers/wikidata/actions/createaccount.rb +0 -86
  27. data/lib/reality/describers/wikidata/actions/cspreport.rb +0 -38
  28. data/lib/reality/describers/wikidata/actions/delete.rb +0 -103
  29. data/lib/reality/describers/wikidata/actions/deleteglobalaccount.rb +0 -47
  30. data/lib/reality/describers/wikidata/actions/echomarkread.rb +0 -77
  31. data/lib/reality/describers/wikidata/actions/echomarkseen.rb +0 -57
  32. data/lib/reality/describers/wikidata/actions/edit.rb +0 -266
  33. data/lib/reality/describers/wikidata/actions/editmassmessagelist.rb +0 -65
  34. data/lib/reality/describers/wikidata/actions/emailuser.rb +0 -62
  35. data/lib/reality/describers/wikidata/actions/expandtemplates.rb +0 -129
  36. data/lib/reality/describers/wikidata/actions/fancycaptchareload.rb +0 -25
  37. data/lib/reality/describers/wikidata/actions/featuredfeed.rb +0 -57
  38. data/lib/reality/describers/wikidata/actions/feedcontributions.rb +0 -121
  39. data/lib/reality/describers/wikidata/actions/feedrecentchanges.rb +0 -159
  40. data/lib/reality/describers/wikidata/actions/feedwatchlist.rb +0 -108
  41. data/lib/reality/describers/wikidata/actions/filerevert.rb +0 -55
  42. data/lib/reality/describers/wikidata/actions/flow-parsoid-utils.rb +0 -73
  43. data/lib/reality/describers/wikidata/actions/flow.rb +0 -72
  44. data/lib/reality/describers/wikidata/actions/flowthank.rb +0 -39
  45. data/lib/reality/describers/wikidata/actions/globalblock.rb +0 -76
  46. data/lib/reality/describers/wikidata/actions/globaluserrights.rb +0 -94
  47. data/lib/reality/describers/wikidata/actions/graph.rb +0 -47
  48. data/lib/reality/describers/wikidata/actions/groupreview.rb +0 -55
  49. data/lib/reality/describers/wikidata/actions/help.rb +0 -64
  50. data/lib/reality/describers/wikidata/actions/imagerotate.rb +0 -25
  51. data/lib/reality/describers/wikidata/actions/import.rb +0 -116
  52. data/lib/reality/describers/wikidata/actions/jsonconfig.rb +0 -60
  53. data/lib/reality/describers/wikidata/actions/jsondata.rb +0 -31
  54. data/lib/reality/describers/wikidata/actions/languagesearch.rb +0 -39
  55. data/lib/reality/describers/wikidata/actions/linkaccount.rb +0 -79
  56. data/lib/reality/describers/wikidata/actions/login.rb +0 -55
  57. data/lib/reality/describers/wikidata/actions/logout.rb +0 -25
  58. data/lib/reality/describers/wikidata/actions/managetags.rb +0 -80
  59. data/lib/reality/describers/wikidata/actions/massmessage.rb +0 -55
  60. data/lib/reality/describers/wikidata/actions/mergehistory.rb +0 -79
  61. data/lib/reality/describers/wikidata/actions/mobileview.rb +0 -170
  62. data/lib/reality/describers/wikidata/actions/move.rb +0 -131
  63. data/lib/reality/describers/wikidata/actions/oathvalidate.rb +0 -47
  64. data/lib/reality/describers/wikidata/actions/opensearch.rb +0 -92
  65. data/lib/reality/describers/wikidata/actions/options.rb +0 -80
  66. data/lib/reality/describers/wikidata/actions/paraminfo.rb +0 -91
  67. data/lib/reality/describers/wikidata/actions/parsoid-batch.rb +0 -31
  68. data/lib/reality/describers/wikidata/actions/patrol.rb +0 -60
  69. data/lib/reality/describers/wikidata/actions/protect.rb +0 -121
  70. data/lib/reality/describers/wikidata/actions/purge.rb +0 -152
  71. data/lib/reality/describers/wikidata/actions/removeauthenticationdata.rb +0 -39
  72. data/lib/reality/describers/wikidata/actions/resetpassword.rb +0 -47
  73. data/lib/reality/describers/wikidata/actions/revisiondelete.rb +0 -125
  74. data/lib/reality/describers/wikidata/actions/rollback.rb +0 -96
  75. data/lib/reality/describers/wikidata/actions/rsd.rb +0 -25
  76. data/lib/reality/describers/wikidata/actions/sanitize-mapdata.rb +0 -39
  77. data/lib/reality/describers/wikidata/actions/scribunto-console.rb +0 -62
  78. data/lib/reality/describers/wikidata/actions/searchtranslations.rb +0 -113
  79. data/lib/reality/describers/wikidata/actions/setglobalaccountstatus.rb +0 -81
  80. data/lib/reality/describers/wikidata/actions/setnotificationtimestamp.rb +0 -177
  81. data/lib/reality/describers/wikidata/actions/setpagelanguage.rb +0 -81
  82. data/lib/reality/describers/wikidata/actions/shortenurl.rb +0 -31
  83. data/lib/reality/describers/wikidata/actions/sitematrix.rb +0 -91
  84. data/lib/reality/describers/wikidata/actions/spamblacklist.rb +0 -36
  85. data/lib/reality/describers/wikidata/actions/stashedit.rb +0 -113
  86. data/lib/reality/describers/wikidata/actions/strikevote.rb +0 -60
  87. data/lib/reality/describers/wikidata/actions/tag.rb +0 -117
  88. data/lib/reality/describers/wikidata/actions/templatedata.rb +0 -145
  89. data/lib/reality/describers/wikidata/actions/thank.rb +0 -47
  90. data/lib/reality/describers/wikidata/actions/titleblacklist.rb +0 -51
  91. data/lib/reality/describers/wikidata/actions/tokens.rb +0 -36
  92. data/lib/reality/describers/wikidata/actions/transcodereset.rb +0 -47
  93. data/lib/reality/describers/wikidata/actions/translatesandbox.rb +0 -81
  94. data/lib/reality/describers/wikidata/actions/translationaids.rb +0 -52
  95. data/lib/reality/describers/wikidata/actions/translationreview.rb +0 -39
  96. data/lib/reality/describers/wikidata/actions/translationstash.rb +0 -76
  97. data/lib/reality/describers/wikidata/actions/ttmserver.rb +0 -60
  98. data/lib/reality/describers/wikidata/actions/ulslocalization.rb +0 -31
  99. data/lib/reality/describers/wikidata/actions/unblock.rb +0 -76
  100. data/lib/reality/describers/wikidata/actions/undelete.rb +0 -99
  101. data/lib/reality/describers/wikidata/actions/unlinkaccount.rb +0 -39
  102. data/lib/reality/describers/wikidata/actions/upload.rb +0 -172
  103. data/lib/reality/describers/wikidata/actions/userrights.rb +0 -107
  104. data/lib/reality/describers/wikidata/actions/validatepassword.rb +0 -55
  105. data/lib/reality/describers/wikidata/actions/visualeditor.rb +0 -96
  106. data/lib/reality/describers/wikidata/actions/visualeditoredit.rb +0 -164
  107. data/lib/reality/describers/wikidata/actions/watch.rb +0 -161
  108. data/lib/reality/describers/wikidata/actions/wbavailablebadges.rb +0 -25
  109. data/lib/reality/describers/wikidata/actions/wbcheckconstraints.rb +0 -62
  110. data/lib/reality/describers/wikidata/actions/wbcreateclaim.rb +0 -91
  111. data/lib/reality/describers/wikidata/actions/wbcreateredirect.rb +0 -54
  112. data/lib/reality/describers/wikidata/actions/wbeditentity.rb +0 -111
  113. data/lib/reality/describers/wikidata/actions/wblinktitles.rb +0 -80
  114. data/lib/reality/describers/wikidata/actions/wbmergeitems.rb +0 -75
  115. data/lib/reality/describers/wikidata/actions/wbremoveclaims.rb +0 -67
  116. data/lib/reality/describers/wikidata/actions/wbremovequalifiers.rb +0 -75
  117. data/lib/reality/describers/wikidata/actions/wbremovereferences.rb +0 -75
  118. data/lib/reality/describers/wikidata/actions/wbsetaliases.rb +0 -148
  119. data/lib/reality/describers/wikidata/actions/wbsetclaim.rb +0 -70
  120. data/lib/reality/describers/wikidata/actions/wbsetclaimvalue.rb +0 -83
  121. data/lib/reality/describers/wikidata/actions/wbsetdescription.rb +0 -117
  122. data/lib/reality/describers/wikidata/actions/wbsetlabel.rb +0 -117
  123. data/lib/reality/describers/wikidata/actions/wbsetqualifier.rb +0 -99
  124. data/lib/reality/describers/wikidata/actions/wbsetreference.rb +0 -94
  125. data/lib/reality/describers/wikidata/actions/wbsetsitelink.rb +0 -130
  126. data/lib/reality/describers/wikidata/actions/wbsgetsuggestions.rb +0 -94
  127. data/lib/reality/describers/wikidata/actions/webapp-manifest.rb +0 -25
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Email a user.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.emailuser.target(value).perform # returns string with raw output
11
- # # or
12
- # api.emailuser.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 Emailuser < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # User to send email to.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def target(value)
27
- merge(target: value.to_s)
28
- end
29
-
30
- # Subject header.
31
- #
32
- # @param value [String]
33
- # @return [self]
34
- def subject(value)
35
- merge(subject: value.to_s)
36
- end
37
-
38
- # Mail body.
39
- #
40
- # @param value [String]
41
- # @return [self]
42
- def text(value)
43
- merge(text: value.to_s)
44
- end
45
-
46
- # Send a copy of this mail to me.
47
- #
48
- # @return [self]
49
- def ccme()
50
- merge(ccme: 'true')
51
- end
52
-
53
- # A "csrf" token retrieved from action=query&meta=tokens
54
- #
55
- # @param value [String]
56
- # @return [self]
57
- def token(value)
58
- merge(token: value.to_s)
59
- end
60
- end
61
- end
62
- end
@@ -1,129 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Expands all templates within wikitext.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.expandtemplates.title(value).perform # returns string with raw output
11
- # # or
12
- # api.expandtemplates.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 Expandtemplates < Reality::Describers::Wikidata::Impl::Actions::Get
21
-
22
- # Title of page.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def title(value)
27
- merge(title: value.to_s)
28
- end
29
-
30
- # Wikitext to convert.
31
- #
32
- # @param value [String]
33
- # @return [self]
34
- def text(value)
35
- merge(text: value.to_s)
36
- end
37
-
38
- # Revision ID, for {{REVISIONID}} and similar variables.
39
- #
40
- # @param value [Integer]
41
- # @return [self]
42
- def revid(value)
43
- merge(revid: value.to_s)
44
- end
45
-
46
- # Which pieces of information to get.
47
- #
48
- # @param values [Array<String>] Allowed values: "wikitext" (The expanded wikitext), "categories" (Any categories present in the input that are not represented in the wikitext output), "properties" (Page properties defined by expanded magic words in the wikitext), "volatile" (Whether the output is volatile and should not be reused elsewhere within the page), "ttl" (The maximum time after which caches of the result should be invalidated), "modules" (Any ResourceLoader modules that parser functions have requested be added to the output. Either jsconfigvars or encodedjsconfigvars must be requested jointly with modules), "jsconfigvars" (Gives the JavaScript configuration variables specific to the page), "encodedjsconfigvars" (Gives the JavaScript configuration variables specific to the page as a JSON string), "parsetree" (The XML parse tree of the input).
49
- # @return [self]
50
- def prop(*values)
51
- values.inject(self) { |res, val| res._prop(val) or fail ArgumentError, "Unknown value for prop: #{val}" }
52
- end
53
-
54
- # @private
55
- def _prop(value)
56
- defined?(super) && super || ["wikitext", "categories", "properties", "volatile", "ttl", "modules", "jsconfigvars", "encodedjsconfigvars", "parsetree"].include?(value.to_s) && merge(prop: value.to_s, replace: false)
57
- end
58
-
59
- # Whether to include HTML comments in the output.
60
- #
61
- # @return [self]
62
- def includecomments()
63
- merge(includecomments: 'true')
64
- end
65
-
66
- # Generate XML parse tree (replaced by prop=parsetree).
67
- #
68
- # @return [self]
69
- def generatexml()
70
- merge(generatexml: 'true')
71
- end
72
-
73
- # Template sandbox prefix, as with Special:TemplateSandbox.
74
- #
75
- # @param values [Array<String>]
76
- # @return [self]
77
- def templatesandboxprefix(*values)
78
- values.inject(self) { |res, val| res._templatesandboxprefix(val) }
79
- end
80
-
81
- # @private
82
- def _templatesandboxprefix(value)
83
- merge(templatesandboxprefix: value.to_s, replace: false)
84
- end
85
-
86
- # Parse the page using templatesandboxtext in place of the contents of the page named here.
87
- #
88
- # @param value [String]
89
- # @return [self]
90
- def templatesandboxtitle(value)
91
- merge(templatesandboxtitle: value.to_s)
92
- end
93
-
94
- # Parse the page using this page content in place of the page named by templatesandboxtitle.
95
- #
96
- # @param value [String]
97
- # @return [self]
98
- def templatesandboxtext(value)
99
- merge(templatesandboxtext: value.to_s)
100
- end
101
-
102
- # Content model of templatesandboxtext.
103
- #
104
- # @param value [String] One of "GadgetDefinition", "SecurePoll", "MassMessageListContent", "flow-board", "JsonSchema", "wikitext", "javascript", "json", "css", "text", "Scribunto", "wikibase-item", "wikibase-property".
105
- # @return [self]
106
- def templatesandboxcontentmodel(value)
107
- _templatesandboxcontentmodel(value) or fail ArgumentError, "Unknown value for templatesandboxcontentmodel: #{value}"
108
- end
109
-
110
- # @private
111
- def _templatesandboxcontentmodel(value)
112
- defined?(super) && super || ["GadgetDefinition", "SecurePoll", "MassMessageListContent", "flow-board", "JsonSchema", "wikitext", "javascript", "json", "css", "text", "Scribunto", "wikibase-item", "wikibase-property"].include?(value.to_s) && merge(templatesandboxcontentmodel: value.to_s)
113
- end
114
-
115
- # Content format of templatesandboxtext.
116
- #
117
- # @param value [String] One of "application/json", "text/x-wiki", "text/javascript", "text/css", "text/plain", "application/vnd.php.serialized".
118
- # @return [self]
119
- def templatesandboxcontentformat(value)
120
- _templatesandboxcontentformat(value) or fail ArgumentError, "Unknown value for templatesandboxcontentformat: #{value}"
121
- end
122
-
123
- # @private
124
- def _templatesandboxcontentformat(value)
125
- defined?(super) && super || ["application/json", "text/x-wiki", "text/javascript", "text/css", "text/plain", "application/vnd.php.serialized"].include?(value.to_s) && merge(templatesandboxcontentformat: value.to_s)
126
- end
127
- end
128
- end
129
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Get a new FancyCaptcha.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.fancycaptchareload.perform # returns string with raw output
11
- # # or
12
- # api.fancycaptchareload.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 Fancycaptchareload < Reality::Describers::Wikidata::Impl::Actions::Get
23
- end
24
- end
25
- end
@@ -1,57 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Returns a featured content feed.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.featuredfeed.feedformat(value).perform # returns string with raw output
11
- # # or
12
- # api.featuredfeed.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 Featuredfeed < 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
- # Feed name.
36
- #
37
- # @param value [String] One of "".
38
- # @return [self]
39
- def feed(value)
40
- _feed(value) or fail ArgumentError, "Unknown value for feed: #{value}"
41
- end
42
-
43
- # @private
44
- def _feed(value)
45
- defined?(super) && super || [""].include?(value.to_s) && merge(feed: value.to_s)
46
- end
47
-
48
- # Feed language code. Ignored by some feeds.
49
- #
50
- # @param value [String]
51
- # @return [self]
52
- def language(value)
53
- merge(language: value.to_s)
54
- end
55
- end
56
- end
57
- end
@@ -1,121 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Returns a user contributions feed.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.feedcontributions.feedformat(value).perform # returns string with raw output
11
- # # or
12
- # api.feedcontributions.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 Feedcontributions < 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
- # What users to get the contributions for.
36
- #
37
- # @param value [String]
38
- # @return [self]
39
- def user(value)
40
- merge(user: value.to_s)
41
- end
42
-
43
- # Which namespace to filter the contributions by.
44
- #
45
- # @param value [String] One of "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "120", "121", "122", "123", "828", "829", "1198", "1199", "2300", "2301", "2302", "2303", "2600".
46
- # @return [self]
47
- def namespace(value)
48
- _namespace(value) or fail ArgumentError, "Unknown value for namespace: #{value}"
49
- end
50
-
51
- # @private
52
- def _namespace(value)
53
- defined?(super) && super || ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "120", "121", "122", "123", "828", "829", "1198", "1199", "2300", "2301", "2302", "2303", "2600"].include?(value.to_s) && merge(namespace: value.to_s)
54
- end
55
-
56
- # From year (and earlier).
57
- #
58
- # @param value [Integer]
59
- # @return [self]
60
- def year(value)
61
- merge(year: value.to_s)
62
- end
63
-
64
- # From month (and earlier).
65
- #
66
- # @param value [Integer]
67
- # @return [self]
68
- def month(value)
69
- merge(month: value.to_s)
70
- end
71
-
72
- # Filter contributions that have these tags.
73
- #
74
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget", "meta spam id", "blanking", "emoji", "repeated xwiki abuse", "OTRS permission added by non-OTRS member", "possible spambot (testing)", "ntsamr (global)", "repeated xwiki CoI abuse", "unsourced ethnicity addition by IP", "died", "unexpected value for phone number", "possible spam", "new editor changing statement", "possible vandalism", "possible non-constructive description", "description ending with punctuation", "wikisyntax", "new editor removing statement", "removal of gender property", "redirect removed", "Sitelink deleted in local wiki", "redirect created", "self-referencing", "adding non-latin script language description in latin script", "possible test edit", "adding potentially mistaken label/description/alias", "adding Qid as label/description/alias", "adding invalid links", "URL in item", "adding latin script language description in non-latin script", "merged item", "adding obsolete/deprecated property", "Ntsamr", "Unexpected value for IMDb identifier", "Unexpected value for IUCN conservation status", "Unexpected value for gender", "new editor removing sitelink", "adding language as label/description/alias", "requested for deletion", "mw-contentmodelchange", "massmessage-delivery", "visualeditor", "visualeditor-needcheck", "visualeditor-switched", "visualeditor-wikitext", "mobile edit", "mobile app edit", "mobile web edit", "HHVM", "OAuth CID: 168", "OAuth CID: 25", "OAuth CID: 29", "OAuth CID: 323", "OAuth CID: 336", "OAuth CID: 351", "OAuth CID: 357", "OAuth CID: 378", "OAuth CID: 408", "OAuth CID: 429", "OAuth CID: 454", "OAuth CID: 484", "OAuth CID: 593", "OAuth CID: 619", "OAuth CID: 639", "OAuth CID: 653", "OAuth CID: 657", "OAuth CID: 67", "OAuth CID: 68", "OAuth CID: 699", "OAuth CID: 722", "OAuth CID: 804", "OAuth CID: 809", "OAuth CID: 812", "OAuth CID: 815", "OAuth CID: 93", "OAuth CID: 94".
75
- # @return [self]
76
- def tagfilter(*values)
77
- values.inject(self) { |res, val| res._tagfilter(val) or fail ArgumentError, "Unknown value for tagfilter: #{val}" }
78
- end
79
-
80
- # @private
81
- def _tagfilter(value)
82
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget", "meta spam id", "blanking", "emoji", "repeated xwiki abuse", "OTRS permission added by non-OTRS member", "possible spambot (testing)", "ntsamr (global)", "repeated xwiki CoI abuse", "unsourced ethnicity addition by IP", "died", "unexpected value for phone number", "possible spam", "new editor changing statement", "possible vandalism", "possible non-constructive description", "description ending with punctuation", "wikisyntax", "new editor removing statement", "removal of gender property", "redirect removed", "Sitelink deleted in local wiki", "redirect created", "self-referencing", "adding non-latin script language description in latin script", "possible test edit", "adding potentially mistaken label/description/alias", "adding Qid as label/description/alias", "adding invalid links", "URL in item", "adding latin script language description in non-latin script", "merged item", "adding obsolete/deprecated property", "Ntsamr", "Unexpected value for IMDb identifier", "Unexpected value for IUCN conservation status", "Unexpected value for gender", "new editor removing sitelink", "adding language as label/description/alias", "requested for deletion", "mw-contentmodelchange", "massmessage-delivery", "visualeditor", "visualeditor-needcheck", "visualeditor-switched", "visualeditor-wikitext", "mobile edit", "mobile app edit", "mobile web edit", "HHVM", "OAuth CID: 168", "OAuth CID: 25", "OAuth CID: 29", "OAuth CID: 323", "OAuth CID: 336", "OAuth CID: 351", "OAuth CID: 357", "OAuth CID: 378", "OAuth CID: 408", "OAuth CID: 429", "OAuth CID: 454", "OAuth CID: 484", "OAuth CID: 593", "OAuth CID: 619", "OAuth CID: 639", "OAuth CID: 653", "OAuth CID: 657", "OAuth CID: 67", "OAuth CID: 68", "OAuth CID: 699", "OAuth CID: 722", "OAuth CID: 804", "OAuth CID: 809", "OAuth CID: 812", "OAuth CID: 815", "OAuth CID: 93", "OAuth CID: 94"].include?(value.to_s) && merge(tagfilter: value.to_s, replace: false)
83
- end
84
-
85
- # Show only deleted contributions.
86
- #
87
- # @return [self]
88
- def deletedonly()
89
- merge(deletedonly: 'true')
90
- end
91
-
92
- # Only show edits that are the latest revisions.
93
- #
94
- # @return [self]
95
- def toponly()
96
- merge(toponly: 'true')
97
- end
98
-
99
- # Only show edits that are page creations.
100
- #
101
- # @return [self]
102
- def newonly()
103
- merge(newonly: 'true')
104
- end
105
-
106
- # Hide minor edits.
107
- #
108
- # @return [self]
109
- def hideminor()
110
- merge(hideminor: 'true')
111
- end
112
-
113
- # Disabled due to miser mode.
114
- #
115
- # @return [self]
116
- def showsizediff()
117
- merge(showsizediff: 'true')
118
- end
119
- end
120
- end
121
- end
@@ -1,159 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Returns a recent changes feed.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.feedrecentchanges.feedformat(value).perform # returns string with raw output
11
- # # or
12
- # api.feedrecentchanges.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 Feedrecentchanges < 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
- # Namespace to limit the results to.
36
- #
37
- # @param value [String] One of "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "120", "121", "122", "123", "828", "829", "1198", "1199", "2300", "2301", "2302", "2303", "2600".
38
- # @return [self]
39
- def namespace(value)
40
- _namespace(value) or fail ArgumentError, "Unknown value for namespace: #{value}"
41
- end
42
-
43
- # @private
44
- def _namespace(value)
45
- defined?(super) && super || ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "120", "121", "122", "123", "828", "829", "1198", "1199", "2300", "2301", "2302", "2303", "2600"].include?(value.to_s) && merge(namespace: value.to_s)
46
- end
47
-
48
- # All namespaces but the selected one.
49
- #
50
- # @return [self]
51
- def invert()
52
- merge(invert: 'true')
53
- end
54
-
55
- # Include associated (talk or main) namespace.
56
- #
57
- # @return [self]
58
- def associated()
59
- merge(associated: 'true')
60
- end
61
-
62
- # Days to limit the results to.
63
- #
64
- # @param value [Integer]
65
- # @return [self]
66
- def days(value)
67
- merge(days: value.to_s)
68
- end
69
-
70
- # Maximum number of results to return.
71
- #
72
- # @param value [Integer]
73
- # @return [self]
74
- def limit(value)
75
- merge(limit: value.to_s)
76
- end
77
-
78
- # Show changes since then.
79
- #
80
- # @param value [Time]
81
- # @return [self]
82
- def from(value)
83
- merge(from: value.iso8601)
84
- end
85
-
86
- # Hide minor changes.
87
- #
88
- # @return [self]
89
- def hideminor()
90
- merge(hideminor: 'true')
91
- end
92
-
93
- # Hide changes made by bots.
94
- #
95
- # @return [self]
96
- def hidebots()
97
- merge(hidebots: 'true')
98
- end
99
-
100
- # Hide changes made by anonymous users.
101
- #
102
- # @return [self]
103
- def hideanons()
104
- merge(hideanons: 'true')
105
- end
106
-
107
- # Hide changes made by registered users.
108
- #
109
- # @return [self]
110
- def hideliu()
111
- merge(hideliu: 'true')
112
- end
113
-
114
- # Hide patrolled changes.
115
- #
116
- # @return [self]
117
- def hidepatrolled()
118
- merge(hidepatrolled: 'true')
119
- end
120
-
121
- # Hide changes made by the current user.
122
- #
123
- # @return [self]
124
- def hidemyself()
125
- merge(hidemyself: 'true')
126
- end
127
-
128
- # Hide category membership changes.
129
- #
130
- # @return [self]
131
- def hidecategorization()
132
- merge(hidecategorization: 'true')
133
- end
134
-
135
- # Filter by tag.
136
- #
137
- # @param value [String]
138
- # @return [self]
139
- def tagfilter(value)
140
- merge(tagfilter: value.to_s)
141
- end
142
-
143
- # Show only changes on pages linked from this page.
144
- #
145
- # @param value [String]
146
- # @return [self]
147
- def target(value)
148
- merge(target: value.to_s)
149
- end
150
-
151
- # Show changes on pages linked to the selected page instead.
152
- #
153
- # @return [self]
154
- def showlinkedto()
155
- merge(showlinkedto: 'true')
156
- end
157
- end
158
- end
159
- end