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,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Patrol a page or revision.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.patrol.rcid(value).perform # returns string with raw output
11
- # # or
12
- # api.patrol.rcid(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 Patrol < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Recentchanges ID to patrol.
23
- #
24
- # @param value [Integer]
25
- # @return [self]
26
- def rcid(value)
27
- merge(rcid: value.to_s)
28
- end
29
-
30
- # Revision ID to patrol.
31
- #
32
- # @param value [Integer]
33
- # @return [self]
34
- def revid(value)
35
- merge(revid: value.to_s)
36
- end
37
-
38
- # Change tags to apply to the entry in the patrol log.
39
- #
40
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
41
- # @return [self]
42
- def tags(*values)
43
- values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
44
- end
45
-
46
- # @private
47
- def _tags(value)
48
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
49
- end
50
-
51
- # A "patrol" token retrieved from action=query&meta=tokens
52
- #
53
- # @param value [String]
54
- # @return [self]
55
- def token(value)
56
- merge(token: value.to_s)
57
- end
58
- end
59
- end
60
- end
@@ -1,121 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Change the protection level of a page.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.protect.title(value).perform # returns string with raw output
11
- # # or
12
- # api.protect.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 Protect < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Title of the page to (un)protect. 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
- # ID of the page to (un)protect. 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
- # List of protection levels, formatted action=level (e.g. edit=sysop). A level of all means everyone is allowed to take the action, i.e. no restriction.
39
- #
40
- # @param values [Array<String>]
41
- # @return [self]
42
- def protections(*values)
43
- values.inject(self) { |res, val| res._protections(val) }
44
- end
45
-
46
- # @private
47
- def _protections(value)
48
- merge(protections: value.to_s, replace: false)
49
- end
50
-
51
- # Expiry timestamps. If only one timestamp is set, it'll be used for all protections. Use infinite, indefinite, infinity, or never, for a never-expiring protection.
52
- #
53
- # @param values [Array<String>]
54
- # @return [self]
55
- def expiry(*values)
56
- values.inject(self) { |res, val| res._expiry(val) }
57
- end
58
-
59
- # @private
60
- def _expiry(value)
61
- merge(expiry: value.to_s, replace: false)
62
- end
63
-
64
- # Reason for (un)protecting.
65
- #
66
- # @param value [String]
67
- # @return [self]
68
- def reason(value)
69
- merge(reason: value.to_s)
70
- end
71
-
72
- # Change tags to apply to the entry in the protection log.
73
- #
74
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
75
- # @return [self]
76
- def tags(*values)
77
- values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
78
- end
79
-
80
- # @private
81
- def _tags(value)
82
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
83
- end
84
-
85
- # Enable cascading protection (i.e. protect transcluded templates and images used in this page). Ignored if none of the given protection levels support cascading.
86
- #
87
- # @return [self]
88
- def cascade()
89
- merge(cascade: 'true')
90
- end
91
-
92
- # If set, add the page being (un)protected to the current user's watchlist.
93
- #
94
- # @return [self]
95
- def watch()
96
- merge(watch: 'true')
97
- end
98
-
99
- # Unconditionally add or remove the page from the current user's watchlist, use preferences or do not change watch.
100
- #
101
- # @param value [String] One of "watch", "unwatch", "preferences", "nochange".
102
- # @return [self]
103
- def watchlist(value)
104
- _watchlist(value) or fail ArgumentError, "Unknown value for watchlist: #{value}"
105
- end
106
-
107
- # @private
108
- def _watchlist(value)
109
- defined?(super) && super || ["watch", "unwatch", "preferences", "nochange"].include?(value.to_s) && merge(watchlist: value.to_s)
110
- end
111
-
112
- # A "csrf" token retrieved from action=query&meta=tokens
113
- #
114
- # @param value [String]
115
- # @return [self]
116
- def token(value)
117
- merge(token: value.to_s)
118
- end
119
- end
120
- end
121
- end
@@ -1,152 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Purge the cache for the given titles.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.purge.forcelinkupdate(value).perform # returns string with raw output
11
- # # or
12
- # api.purge.forcelinkupdate(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 Purge < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Update the links tables.
23
- #
24
- # @return [self]
25
- def forcelinkupdate()
26
- merge(forcelinkupdate: 'true')
27
- end
28
-
29
- # Update the links table, and update the links tables for any page that uses this page as a template.
30
- #
31
- # @return [self]
32
- def forcerecursivelinkupdate()
33
- merge(forcerecursivelinkupdate: 'true')
34
- end
35
-
36
- # When more results are available, use this to continue.
37
- #
38
- # @param value [String]
39
- # @return [self]
40
- def continue(value)
41
- merge(continue: value.to_s)
42
- end
43
-
44
- # A list of titles to work on.
45
- #
46
- # @param values [Array<String>]
47
- # @return [self]
48
- def titles(*values)
49
- values.inject(self) { |res, val| res._titles(val) }
50
- end
51
-
52
- # @private
53
- def _titles(value)
54
- merge(titles: value.to_s, replace: false)
55
- end
56
-
57
- # A list of page IDs to work on.
58
- #
59
- # @param values [Array<Integer>]
60
- # @return [self]
61
- def pageids(*values)
62
- values.inject(self) { |res, val| res._pageids(val) }
63
- end
64
-
65
- # @private
66
- def _pageids(value)
67
- merge(pageids: value.to_s, replace: false)
68
- end
69
-
70
- # A list of revision IDs to work on.
71
- #
72
- # @param values [Array<Integer>]
73
- # @return [self]
74
- def revids(*values)
75
- values.inject(self) { |res, val| res._revids(val) }
76
- end
77
-
78
- # @private
79
- def _revids(value)
80
- merge(revids: value.to_s, replace: false)
81
- end
82
-
83
- # Get the list of pages to work on by executing the specified query module.
84
- #
85
- # @param value [Symbol] Selecting an option includes tweaking methods from corresponding module:
86
- # * `:allcategories` - {Reality::Describers::Wikidata::Impl::Modules::Allcategories} Enumerate all categories.
87
- # * `:alldeletedrevisions` - {Reality::Describers::Wikidata::Impl::Modules::Alldeletedrevisions} List all deleted revisions by a user or in a namespace.
88
- # * `:allfileusages` - {Reality::Describers::Wikidata::Impl::Modules::Allfileusages} List all file usages, including non-existing.
89
- # * `:allimages` - {Reality::Describers::Wikidata::Impl::Modules::Allimages} Enumerate all images sequentially.
90
- # * `:alllinks` - {Reality::Describers::Wikidata::Impl::Modules::Alllinks} Enumerate all links that point to a given namespace.
91
- # * `:allpages` - {Reality::Describers::Wikidata::Impl::Modules::Allpages} Enumerate all pages sequentially in a given namespace.
92
- # * `:allredirects` - {Reality::Describers::Wikidata::Impl::Modules::Allredirects} List all redirects to a namespace.
93
- # * `:allrevisions` - {Reality::Describers::Wikidata::Impl::Modules::Allrevisions} List all revisions.
94
- # * `:alltransclusions` - {Reality::Describers::Wikidata::Impl::Modules::Alltransclusions} List all transclusions (pages embedded using {{x}}), including non-existing.
95
- # * `:backlinks` - {Reality::Describers::Wikidata::Impl::Modules::Backlinks} Find all pages that link to the given page.
96
- # * `:categories` - {Reality::Describers::Wikidata::Impl::Modules::Categories} List all categories the pages belong to.
97
- # * `:categorymembers` - {Reality::Describers::Wikidata::Impl::Modules::Categorymembers} List all pages in a given category.
98
- # * `:deletedrevisions` - {Reality::Describers::Wikidata::Impl::Modules::Deletedrevisions} Get deleted revision information.
99
- # * `:duplicatefiles` - {Reality::Describers::Wikidata::Impl::Modules::Duplicatefiles} List all files that are duplicates of the given files based on hash values.
100
- # * `:embeddedin` - {Reality::Describers::Wikidata::Impl::Modules::Embeddedin} Find all pages that embed (transclude) the given title.
101
- # * `:exturlusage` - {Reality::Describers::Wikidata::Impl::Modules::Exturlusage} Enumerate pages that contain a given URL.
102
- # * `:fileusage` - {Reality::Describers::Wikidata::Impl::Modules::Fileusage} Find all pages that use the given files.
103
- # * `:geosearch` - {Reality::Describers::Wikidata::Impl::Modules::Geosearch} Returns pages having coordinates that are located in a certain area.
104
- # * `:images` - {Reality::Describers::Wikidata::Impl::Modules::Images} Returns all files contained on the given pages.
105
- # * `:imageusage` - {Reality::Describers::Wikidata::Impl::Modules::Imageusage} Find all pages that use the given image title.
106
- # * `:iwbacklinks` - {Reality::Describers::Wikidata::Impl::Modules::Iwbacklinks} Find all pages that link to the given interwiki link.
107
- # * `:langbacklinks` - {Reality::Describers::Wikidata::Impl::Modules::Langbacklinks} Find all pages that link to the given language link.
108
- # * `:links` - {Reality::Describers::Wikidata::Impl::Modules::Links} Returns all links from the given pages.
109
- # * `:linkshere` - {Reality::Describers::Wikidata::Impl::Modules::Linkshere} Find all pages that link to the given pages.
110
- # * `:messagecollection` - {Reality::Describers::Wikidata::Impl::Modules::Messagecollection} Query MessageCollection about translations.
111
- # * `:mostviewed` - {Reality::Describers::Wikidata::Impl::Modules::Mostviewed} Lists the most viewed pages (based on last day's pageview count).
112
- # * `:pageswithprop` - {Reality::Describers::Wikidata::Impl::Modules::Pageswithprop} List all pages using a given page property.
113
- # * `:prefixsearch` - {Reality::Describers::Wikidata::Impl::Modules::Prefixsearch} Perform a prefix search for page titles.
114
- # * `:protectedtitles` - {Reality::Describers::Wikidata::Impl::Modules::Protectedtitles} List all titles protected from creation.
115
- # * `:querypage` - {Reality::Describers::Wikidata::Impl::Modules::Querypage} Get a list provided by a QueryPage-based special page.
116
- # * `:random` - {Reality::Describers::Wikidata::Impl::Modules::Random} Get a set of random pages.
117
- # * `:recentchanges` - {Reality::Describers::Wikidata::Impl::Modules::Recentchanges} Enumerate recent changes.
118
- # * `:redirects` - {Reality::Describers::Wikidata::Impl::Modules::Redirects} Returns all redirects to the given pages.
119
- # * `:revisions` - {Reality::Describers::Wikidata::Impl::Modules::Revisions} Get revision information.
120
- # * `:search` - {Reality::Describers::Wikidata::Impl::Modules::Search} Perform a full text search.
121
- # * `:templates` - {Reality::Describers::Wikidata::Impl::Modules::Templates} Returns all pages transcluded on the given pages.
122
- # * `:transcludedin` - {Reality::Describers::Wikidata::Impl::Modules::Transcludedin} Find all pages that transclude the given pages.
123
- # * `:watchlist` - {Reality::Describers::Wikidata::Impl::Modules::Watchlist} Get recent changes to pages in the current user's watchlist.
124
- # * `:watchlistraw` - {Reality::Describers::Wikidata::Impl::Modules::Watchlistraw} Get all pages on the current user's watchlist.
125
- # * `:wblistentityusage` - {Reality::Describers::Wikidata::Impl::Modules::Wblistentityusage} Returns all pages that use the given entity IDs.
126
- # * `:wbsearch` - {Reality::Describers::Wikidata::Impl::Modules::Wbsearch} Searches for entities using labels and aliases. This can be used as a generator for other queries. Returns the matched term that should be displayed.
127
- # @return [self]
128
- def generator(value)
129
- _generator(value) or fail ArgumentError, "Unknown value for generator: #{value}"
130
- end
131
-
132
- # @private
133
- def _generator(value)
134
- defined?(super) && super || [:allcategories, :alldeletedrevisions, :allfileusages, :allimages, :alllinks, :allpages, :allredirects, :allrevisions, :alltransclusions, :backlinks, :categories, :categorymembers, :deletedrevisions, :duplicatefiles, :embeddedin, :exturlusage, :fileusage, :geosearch, :images, :imageusage, :iwbacklinks, :langbacklinks, :links, :linkshere, :messagecollection, :mostviewed, :pageswithprop, :prefixsearch, :protectedtitles, :querypage, :random, :recentchanges, :redirects, :revisions, :search, :templates, :transcludedin, :watchlist, :watchlistraw, :wblistentityusage, :wbsearch].include?(value.to_sym) && merge(generator: value.to_s).submodule({allcategories: Modules::Allcategories, alldeletedrevisions: Modules::Alldeletedrevisions, allfileusages: Modules::Allfileusages, allimages: Modules::Allimages, alllinks: Modules::Alllinks, allpages: Modules::Allpages, allredirects: Modules::Allredirects, allrevisions: Modules::Allrevisions, alltransclusions: Modules::Alltransclusions, backlinks: Modules::Backlinks, categories: Modules::Categories, categorymembers: Modules::Categorymembers, deletedrevisions: Modules::Deletedrevisions, duplicatefiles: Modules::Duplicatefiles, embeddedin: Modules::Embeddedin, exturlusage: Modules::Exturlusage, fileusage: Modules::Fileusage, geosearch: Modules::Geosearch, images: Modules::Images, imageusage: Modules::Imageusage, iwbacklinks: Modules::Iwbacklinks, langbacklinks: Modules::Langbacklinks, links: Modules::Links, linkshere: Modules::Linkshere, messagecollection: Modules::Messagecollection, mostviewed: Modules::Mostviewed, pageswithprop: Modules::Pageswithprop, prefixsearch: Modules::Prefixsearch, protectedtitles: Modules::Protectedtitles, querypage: Modules::Querypage, random: Modules::Random, recentchanges: Modules::Recentchanges, redirects: Modules::Redirects, revisions: Modules::Revisions, search: Modules::Search, templates: Modules::Templates, transcludedin: Modules::Transcludedin, watchlist: Modules::Watchlist, watchlistraw: Modules::Watchlistraw, wblistentityusage: Modules::Wblistentityusage, wbsearch: Modules::Wbsearch}[value.to_sym])
135
- end
136
-
137
- # Automatically resolve redirects in titles, pageids, and revids, and in pages returned by generator.
138
- #
139
- # @return [self]
140
- def redirects()
141
- merge(redirects: 'true')
142
- end
143
-
144
- # Convert titles to other variants if necessary. Only works if the wiki's content language supports variant conversion. Languages that support variant conversion include gan, iu, kk, ku, shi, sr, tg, uz and zh.
145
- #
146
- # @return [self]
147
- def converttitles()
148
- merge(converttitles: 'true')
149
- end
150
- end
151
- end
152
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Remove authentication data for the current user.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.removeauthenticationdata.request(value).perform # returns string with raw output
11
- # # or
12
- # api.removeauthenticationdata.request(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 Removeauthenticationdata < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Use this authentication request, by the id returned from action=query&meta=authmanagerinfo with amirequestsfor=remove.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def request(value)
27
- merge(request: 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,47 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Send a password reset email to a user.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.resetpassword.user(value).perform # returns string with raw output
11
- # # or
12
- # api.resetpassword.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 Resetpassword < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # User being reset.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def user(value)
27
- merge(user: value.to_s)
28
- end
29
-
30
- # Email address of the user being reset.
31
- #
32
- # @param value [String]
33
- # @return [self]
34
- def email(value)
35
- merge(email: value.to_s)
36
- end
37
-
38
- # A "csrf" 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
@@ -1,125 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Delete and undelete revisions.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.revisiondelete.type(value).perform # returns string with raw output
11
- # # or
12
- # api.revisiondelete.type(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 Revisiondelete < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Type of revision deletion being performed.
23
- #
24
- # @param value [String] One of "revision", "archive", "oldimage", "filearchive", "logging".
25
- # @return [self]
26
- def type(value)
27
- _type(value) or fail ArgumentError, "Unknown value for type: #{value}"
28
- end
29
-
30
- # @private
31
- def _type(value)
32
- defined?(super) && super || ["revision", "archive", "oldimage", "filearchive", "logging"].include?(value.to_s) && merge(type: value.to_s)
33
- end
34
-
35
- # Page title for the revision deletion, if required for the type.
36
- #
37
- # @param value [String]
38
- # @return [self]
39
- def target(value)
40
- merge(target: value.to_s)
41
- end
42
-
43
- # Identifiers for the revisions to be deleted.
44
- #
45
- # @param values [Array<String>]
46
- # @return [self]
47
- def ids(*values)
48
- values.inject(self) { |res, val| res._ids(val) }
49
- end
50
-
51
- # @private
52
- def _ids(value)
53
- merge(ids: value.to_s, replace: false)
54
- end
55
-
56
- # What to hide for each revision.
57
- #
58
- # @param values [Array<String>] Allowed values: "content", "comment", "user".
59
- # @return [self]
60
- def hide(*values)
61
- values.inject(self) { |res, val| res._hide(val) or fail ArgumentError, "Unknown value for hide: #{val}" }
62
- end
63
-
64
- # @private
65
- def _hide(value)
66
- defined?(super) && super || ["content", "comment", "user"].include?(value.to_s) && merge(hide: value.to_s, replace: false)
67
- end
68
-
69
- # What to unhide for each revision.
70
- #
71
- # @param values [Array<String>] Allowed values: "content", "comment", "user".
72
- # @return [self]
73
- def show(*values)
74
- values.inject(self) { |res, val| res._show(val) or fail ArgumentError, "Unknown value for show: #{val}" }
75
- end
76
-
77
- # @private
78
- def _show(value)
79
- defined?(super) && super || ["content", "comment", "user"].include?(value.to_s) && merge(show: value.to_s, replace: false)
80
- end
81
-
82
- # Whether to suppress data from administrators as well as others.
83
- #
84
- # @param value [String] One of "yes", "no", "nochange".
85
- # @return [self]
86
- def suppress(value)
87
- _suppress(value) or fail ArgumentError, "Unknown value for suppress: #{value}"
88
- end
89
-
90
- # @private
91
- def _suppress(value)
92
- defined?(super) && super || ["yes", "no", "nochange"].include?(value.to_s) && merge(suppress: value.to_s)
93
- end
94
-
95
- # Reason for the deletion or undeletion.
96
- #
97
- # @param value [String]
98
- # @return [self]
99
- def reason(value)
100
- merge(reason: value.to_s)
101
- end
102
-
103
- # Tags to apply to the entry in the deletion log.
104
- #
105
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
106
- # @return [self]
107
- def tags(*values)
108
- values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
109
- end
110
-
111
- # @private
112
- def _tags(value)
113
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
114
- end
115
-
116
- # A "csrf" token retrieved from action=query&meta=tokens
117
- #
118
- # @param value [String]
119
- # @return [self]
120
- def token(value)
121
- merge(token: value.to_s)
122
- end
123
- end
124
- end
125
- end