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,81 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Change the language of a page.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.setpagelanguage.title(value).perform # returns string with raw output
11
- # # or
12
- # api.setpagelanguage.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 Setpagelanguage < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Title of the page whose language you wish to change. Cannot be used together with pageid.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def title(value)
27
- merge(title: value.to_s)
28
- end
29
-
30
- # Page ID of the page whose language you wish to change. 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
- # Language code of the language to change the page to. Use default to reset the page to the wiki's default content language.
39
- #
40
- # @param value [String] One of "default", "ab", "ace", "ady", "ady-cyrl", "aeb", "aeb-arab", "aeb-latn", "af", "ak", "aln", "am", "an", "ang", "anp", "ar", "arc", "arn", "arq", "ary", "arz", "as", "ase", "ast", "atj", "av", "avk", "awa", "ay", "az", "azb", "ba", "ban", "bar", "bbc", "bbc-latn", "bcc", "bcl", "be", "be-tarask", "bg", "bgn", "bh", "bho", "bi", "bjn", "bm", "bn", "bo", "bpy", "bqi", "br", "brh", "bs", "bto", "bug", "bxr", "ca", "cbk-zam", "cdo", "ce", "ceb", "ch", "chr", "chy", "ckb", "co", "cps", "cr", "crh", "crh-cyrl", "crh-latn", "cs", "csb", "cu", "cv", "cy", "da", "de", "de-at", "de-ch", "de-formal", "din", "diq", "dsb", "dtp", "dty", "dv", "dz", "ee", "egl", "el", "eml", "en", "en-ca", "en-gb", "eo", "es", "et", "eu", "ext", "fa", "ff", "fi", "fit", "fj", "fo", "fr", "frc", "frp", "frr", "fur", "fy", "ga", "gag", "gan", "gan-hans", "gan-hant", "gd", "gl", "glk", "gn", "gom", "gom-deva", "gom-latn", "gor", "got", "grc", "gsw", "gu", "gv", "ha", "hak", "haw", "he", "hi", "hif", "hif-latn", "hil", "hr", "hrx", "hsb", "ht", "hu", "hy", "ia", "id", "ie", "ig", "ii", "ik", "ike-cans", "ike-latn", "ilo", "inh", "io", "is", "it", "iu", "ja", "jam", "jbo", "jut", "jv", "ka", "kaa", "kab", "kbd", "kbd-cyrl", "kg", "khw", "ki", "kiu", "kk", "kk-arab", "kk-cn", "kk-cyrl", "kk-kz", "kk-latn", "kk-tr", "kl", "km", "kn", "ko", "ko-kp", "koi", "krc", "kri", "krj", "krl", "ks", "ks-arab", "ks-deva", "ksh", "ku", "ku-arab", "ku-latn", "kv", "kw", "ky", "la", "lad", "lb", "lbe", "lez", "lfn", "lg", "li", "lij", "liv", "lki", "lmo", "ln", "lo", "loz", "lrc", "lt", "ltg", "lus", "luz", "lv", "lzh", "lzz", "mai", "map-bms", "mdf", "mg", "mhr", "mi", "min", "mk", "ml", "mn", "mo", "mr", "mrj", "ms", "mt", "mwl", "my", "myv", "mzn", "na", "nah", "nan", "nap", "nb", "nds", "nds-nl", "ne", "new", "niu", "nl", "nl-informal", "nn", "nov", "nrm", "nso", "nv", "ny", "oc", "olo", "om", "or", "os", "pa", "pag", "pam", "pap", "pcd", "pdc", "pdt", "pfl", "pi", "pih", "pl", "pms", "pnb", "pnt", "prg", "ps", "pt", "pt-br", "qu", "qug", "rgn", "rif", "rm", "rmy", "ro", "roa-tara", "ru", "rue", "rup", "ruq", "ruq-cyrl", "ruq-latn", "rw", "sa", "sah", "sat", "sc", "scn", "sco", "sd", "sdc", "sdh", "se", "sei", "ses", "sg", "sgs", "sh", "shi", "shn", "si", "sk", "sl", "sli", "sm", "sma", "sn", "so", "sq", "sr", "sr-ec", "sr-el", "srn", "ss", "st", "stq", "su", "sv", "sw", "szl", "ta", "tcy", "te", "tet", "tg", "tg-cyrl", "tg-latn", "th", "ti", "tk", "tl", "tly", "tn", "to", "tokipona", "tpi", "tr", "tru", "ts", "tt", "tt-cyrl", "tt-latn", "tw", "ty", "tyv", "tzm", "udm", "ug", "ug-arab", "ug-latn", "uk", "ur", "uz", "ve", "vec", "vep", "vi", "vls", "vmf", "vo", "vot", "vro", "wa", "war", "wo", "wuu", "xal", "xh", "xmf", "yi", "yo", "yue", "za", "zea", "zh", "zh-cn", "zh-hans", "zh-hant", "zh-hk", "zh-mo", "zh-my", "zh-sg", "zh-tw", "zu".
41
- # @return [self]
42
- def lang(value)
43
- _lang(value) or fail ArgumentError, "Unknown value for lang: #{value}"
44
- end
45
-
46
- # @private
47
- def _lang(value)
48
- defined?(super) && super || ["default", "ab", "ace", "ady", "ady-cyrl", "aeb", "aeb-arab", "aeb-latn", "af", "ak", "aln", "am", "an", "ang", "anp", "ar", "arc", "arn", "arq", "ary", "arz", "as", "ase", "ast", "atj", "av", "avk", "awa", "ay", "az", "azb", "ba", "ban", "bar", "bbc", "bbc-latn", "bcc", "bcl", "be", "be-tarask", "bg", "bgn", "bh", "bho", "bi", "bjn", "bm", "bn", "bo", "bpy", "bqi", "br", "brh", "bs", "bto", "bug", "bxr", "ca", "cbk-zam", "cdo", "ce", "ceb", "ch", "chr", "chy", "ckb", "co", "cps", "cr", "crh", "crh-cyrl", "crh-latn", "cs", "csb", "cu", "cv", "cy", "da", "de", "de-at", "de-ch", "de-formal", "din", "diq", "dsb", "dtp", "dty", "dv", "dz", "ee", "egl", "el", "eml", "en", "en-ca", "en-gb", "eo", "es", "et", "eu", "ext", "fa", "ff", "fi", "fit", "fj", "fo", "fr", "frc", "frp", "frr", "fur", "fy", "ga", "gag", "gan", "gan-hans", "gan-hant", "gd", "gl", "glk", "gn", "gom", "gom-deva", "gom-latn", "gor", "got", "grc", "gsw", "gu", "gv", "ha", "hak", "haw", "he", "hi", "hif", "hif-latn", "hil", "hr", "hrx", "hsb", "ht", "hu", "hy", "ia", "id", "ie", "ig", "ii", "ik", "ike-cans", "ike-latn", "ilo", "inh", "io", "is", "it", "iu", "ja", "jam", "jbo", "jut", "jv", "ka", "kaa", "kab", "kbd", "kbd-cyrl", "kg", "khw", "ki", "kiu", "kk", "kk-arab", "kk-cn", "kk-cyrl", "kk-kz", "kk-latn", "kk-tr", "kl", "km", "kn", "ko", "ko-kp", "koi", "krc", "kri", "krj", "krl", "ks", "ks-arab", "ks-deva", "ksh", "ku", "ku-arab", "ku-latn", "kv", "kw", "ky", "la", "lad", "lb", "lbe", "lez", "lfn", "lg", "li", "lij", "liv", "lki", "lmo", "ln", "lo", "loz", "lrc", "lt", "ltg", "lus", "luz", "lv", "lzh", "lzz", "mai", "map-bms", "mdf", "mg", "mhr", "mi", "min", "mk", "ml", "mn", "mo", "mr", "mrj", "ms", "mt", "mwl", "my", "myv", "mzn", "na", "nah", "nan", "nap", "nb", "nds", "nds-nl", "ne", "new", "niu", "nl", "nl-informal", "nn", "nov", "nrm", "nso", "nv", "ny", "oc", "olo", "om", "or", "os", "pa", "pag", "pam", "pap", "pcd", "pdc", "pdt", "pfl", "pi", "pih", "pl", "pms", "pnb", "pnt", "prg", "ps", "pt", "pt-br", "qu", "qug", "rgn", "rif", "rm", "rmy", "ro", "roa-tara", "ru", "rue", "rup", "ruq", "ruq-cyrl", "ruq-latn", "rw", "sa", "sah", "sat", "sc", "scn", "sco", "sd", "sdc", "sdh", "se", "sei", "ses", "sg", "sgs", "sh", "shi", "shn", "si", "sk", "sl", "sli", "sm", "sma", "sn", "so", "sq", "sr", "sr-ec", "sr-el", "srn", "ss", "st", "stq", "su", "sv", "sw", "szl", "ta", "tcy", "te", "tet", "tg", "tg-cyrl", "tg-latn", "th", "ti", "tk", "tl", "tly", "tn", "to", "tokipona", "tpi", "tr", "tru", "ts", "tt", "tt-cyrl", "tt-latn", "tw", "ty", "tyv", "tzm", "udm", "ug", "ug-arab", "ug-latn", "uk", "ur", "uz", "ve", "vec", "vep", "vi", "vls", "vmf", "vo", "vot", "vro", "wa", "war", "wo", "wuu", "xal", "xh", "xmf", "yi", "yo", "yue", "za", "zea", "zh", "zh-cn", "zh-hans", "zh-hant", "zh-hk", "zh-mo", "zh-my", "zh-sg", "zh-tw", "zu"].include?(value.to_s) && merge(lang: value.to_s)
49
- end
50
-
51
- # Reason for the change.
52
- #
53
- # @param value [String]
54
- # @return [self]
55
- def reason(value)
56
- merge(reason: value.to_s)
57
- end
58
-
59
- # Change tags to apply to the log entry resulting from this action.
60
- #
61
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
62
- # @return [self]
63
- def tags(*values)
64
- values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
65
- end
66
-
67
- # @private
68
- def _tags(value)
69
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
70
- end
71
-
72
- # A "csrf" 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
- end
80
- end
81
- end
@@ -1,31 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Shorten a long URL into a shorter one.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.shortenurl.url(value).perform # returns string with raw output
11
- # # or
12
- # api.shortenurl.url(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 Shortenurl < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # URL to be shortened.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def url(value)
27
- merge(url: value.to_s)
28
- end
29
- end
30
- end
31
- end
@@ -1,91 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Get Wikimedia sites list.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.sitematrix.type(value).perform # returns string with raw output
11
- # # or
12
- # api.sitematrix.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 Sitematrix < Reality::Describers::Wikidata::Impl::Actions::Get
21
-
22
- # Filter the Site Matrix by type:
23
- #
24
- # @param values [Array<String>] Allowed values: "special" (One off and multilingual Wikimedia projects), "language" (Wikimedia projects under this language code).
25
- # @return [self]
26
- def type(*values)
27
- values.inject(self) { |res, val| res._type(val) or fail ArgumentError, "Unknown value for type: #{val}" }
28
- end
29
-
30
- # @private
31
- def _type(value)
32
- defined?(super) && super || ["special", "language"].include?(value.to_s) && merge(smtype: value.to_s, replace: false)
33
- end
34
-
35
- # Filter the Site Matrix by wiki state:
36
- #
37
- # @param values [Array<String>] Allowed values: "all", "closed", "private", "fishbowl", "nonglobal".
38
- # @return [self]
39
- def state(*values)
40
- values.inject(self) { |res, val| res._state(val) or fail ArgumentError, "Unknown value for state: #{val}" }
41
- end
42
-
43
- # @private
44
- def _state(value)
45
- defined?(super) && super || ["all", "closed", "private", "fishbowl", "nonglobal"].include?(value.to_s) && merge(smstate: value.to_s, replace: false)
46
- end
47
-
48
- # Which information about a language to return.
49
- #
50
- # @param values [Array<String>] Allowed values: "code", "name", "site", "localname".
51
- # @return [self]
52
- def langprop(*values)
53
- values.inject(self) { |res, val| res._langprop(val) or fail ArgumentError, "Unknown value for langprop: #{val}" }
54
- end
55
-
56
- # @private
57
- def _langprop(value)
58
- defined?(super) && super || ["code", "name", "site", "localname"].include?(value.to_s) && merge(smlangprop: value.to_s, replace: false)
59
- end
60
-
61
- # Which information about a site to return.
62
- #
63
- # @param values [Array<String>] Allowed values: "url", "dbname", "code", "sitename".
64
- # @return [self]
65
- def siteprop(*values)
66
- values.inject(self) { |res, val| res._siteprop(val) or fail ArgumentError, "Unknown value for siteprop: #{val}" }
67
- end
68
-
69
- # @private
70
- def _siteprop(value)
71
- defined?(super) && super || ["url", "dbname", "code", "sitename"].include?(value.to_s) && merge(smsiteprop: value.to_s, replace: false)
72
- end
73
-
74
- # Maximum number of results.
75
- #
76
- # @param value [Integer, "max"]
77
- # @return [self]
78
- def limit(value)
79
- merge(smlimit: value.to_s)
80
- end
81
-
82
- # When more results are available, use this to continue.
83
- #
84
- # @param value [String]
85
- # @return [self]
86
- def continue(value)
87
- merge(smcontinue: value.to_s)
88
- end
89
- end
90
- end
91
- end
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Validate one or more URLs against the SpamBlacklist.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.spamblacklist.url(value).perform # returns string with raw output
11
- # # or
12
- # api.spamblacklist.url(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 Spamblacklist < Reality::Describers::Wikidata::Impl::Actions::Get
21
-
22
- # URLs to validate against the blacklist.
23
- #
24
- # @param values [Array<String>]
25
- # @return [self]
26
- def url(*values)
27
- values.inject(self) { |res, val| res._url(val) }
28
- end
29
-
30
- # @private
31
- def _url(value)
32
- merge(url: value.to_s, replace: false)
33
- end
34
- end
35
- end
36
- end
@@ -1,113 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Prepare an edit in shared cache.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.stashedit.title(value).perform # returns string with raw output
11
- # # or
12
- # api.stashedit.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 Stashedit < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Title of the page being edited.
23
- #
24
- # @param value [String]
25
- # @return [self]
26
- def title(value)
27
- merge(title: value.to_s)
28
- end
29
-
30
- # Section number. 0 for the top section, new for a new section.
31
- #
32
- # @param value [String]
33
- # @return [self]
34
- def section(value)
35
- merge(section: value.to_s)
36
- end
37
-
38
- # The title for a new section.
39
- #
40
- # @param value [String]
41
- # @return [self]
42
- def sectiontitle(value)
43
- merge(sectiontitle: value.to_s)
44
- end
45
-
46
- # Page content.
47
- #
48
- # @param value [String]
49
- # @return [self]
50
- def text(value)
51
- merge(text: value.to_s)
52
- end
53
-
54
- # Page content hash from a prior stash to use instead.
55
- #
56
- # @param value [String]
57
- # @return [self]
58
- def stashedtexthash(value)
59
- merge(stashedtexthash: value.to_s)
60
- end
61
-
62
- # Change summary.
63
- #
64
- # @param value [String]
65
- # @return [self]
66
- def summary(value)
67
- merge(summary: value.to_s)
68
- end
69
-
70
- # Content model of the new content.
71
- #
72
- # @param value [String] One of "GadgetDefinition", "SecurePoll", "MassMessageListContent", "flow-board", "JsonSchema", "wikitext", "javascript", "json", "css", "text", "Scribunto", "wikibase-item", "wikibase-property".
73
- # @return [self]
74
- def contentmodel(value)
75
- _contentmodel(value) or fail ArgumentError, "Unknown value for contentmodel: #{value}"
76
- end
77
-
78
- # @private
79
- def _contentmodel(value)
80
- defined?(super) && super || ["GadgetDefinition", "SecurePoll", "MassMessageListContent", "flow-board", "JsonSchema", "wikitext", "javascript", "json", "css", "text", "Scribunto", "wikibase-item", "wikibase-property"].include?(value.to_s) && merge(contentmodel: value.to_s)
81
- end
82
-
83
- # Content serialization format used for the input text.
84
- #
85
- # @param value [String] One of "application/json", "text/x-wiki", "text/javascript", "text/css", "text/plain", "application/vnd.php.serialized".
86
- # @return [self]
87
- def contentformat(value)
88
- _contentformat(value) or fail ArgumentError, "Unknown value for contentformat: #{value}"
89
- end
90
-
91
- # @private
92
- def _contentformat(value)
93
- defined?(super) && super || ["application/json", "text/x-wiki", "text/javascript", "text/css", "text/plain", "application/vnd.php.serialized"].include?(value.to_s) && merge(contentformat: value.to_s)
94
- end
95
-
96
- # Revision ID of the base revision.
97
- #
98
- # @param value [Integer]
99
- # @return [self]
100
- def baserevid(value)
101
- merge(baserevid: value.to_s)
102
- end
103
-
104
- # A "csrf" token retrieved from action=query&meta=tokens
105
- #
106
- # @param value [String]
107
- # @return [self]
108
- def token(value)
109
- merge(token: value.to_s)
110
- end
111
- end
112
- end
113
- end
@@ -1,60 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Allows admins to strike or unstrike a vote.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.strikevote.option(value).perform # returns string with raw output
11
- # # or
12
- # api.strikevote.option(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 Strikevote < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # Which action to take: strike or unstrike a vote.
23
- #
24
- # @param value [String] One of "strike" (Strike a vote (remove it from the count)), "unstrike" (Unstrike a vote (restore it to the count)).
25
- # @return [self]
26
- def option(value)
27
- _option(value) or fail ArgumentError, "Unknown value for option: #{value}"
28
- end
29
-
30
- # @private
31
- def _option(value)
32
- defined?(super) && super || ["strike", "unstrike"].include?(value.to_s) && merge(option: value.to_s)
33
- end
34
-
35
- # The reason for striking or unstriking the vote.
36
- #
37
- # @param value [String]
38
- # @return [self]
39
- def reason(value)
40
- merge(reason: value.to_s)
41
- end
42
-
43
- # The ID of the vote to be struck or unstruck.
44
- #
45
- # @param value [Integer]
46
- # @return [self]
47
- def voteid(value)
48
- merge(voteid: value.to_s)
49
- end
50
-
51
- # A "csrf" 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,117 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Reality::Describers::Wikidata::Impl
4
- module Actions
5
- # Add or remove change tags from individual revisions or log entries.
6
- #
7
- # Usage:
8
- #
9
- # ```ruby
10
- # api.tag.rcid(value).perform # returns string with raw output
11
- # # or
12
- # api.tag.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 Tag < Reality::Describers::Wikidata::Impl::Actions::Post
21
-
22
- # One or more recent changes IDs from which to add or remove the tag.
23
- #
24
- # @param values [Array<Integer>]
25
- # @return [self]
26
- def rcid(*values)
27
- values.inject(self) { |res, val| res._rcid(val) }
28
- end
29
-
30
- # @private
31
- def _rcid(value)
32
- merge(rcid: value.to_s, replace: false)
33
- end
34
-
35
- # One or more revision IDs from which to add or remove the tag.
36
- #
37
- # @param values [Array<Integer>]
38
- # @return [self]
39
- def revid(*values)
40
- values.inject(self) { |res, val| res._revid(val) }
41
- end
42
-
43
- # @private
44
- def _revid(value)
45
- merge(revid: value.to_s, replace: false)
46
- end
47
-
48
- # One or more log entry IDs from which to add or remove the tag.
49
- #
50
- # @param values [Array<Integer>]
51
- # @return [self]
52
- def logid(*values)
53
- values.inject(self) { |res, val| res._logid(val) }
54
- end
55
-
56
- # @private
57
- def _logid(value)
58
- merge(logid: value.to_s, replace: false)
59
- end
60
-
61
- # Tags to add. Only manually defined tags can be added.
62
- #
63
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
64
- # @return [self]
65
- def add(*values)
66
- values.inject(self) { |res, val| res._add(val) or fail ArgumentError, "Unknown value for add: #{val}" }
67
- end
68
-
69
- # @private
70
- def _add(value)
71
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(add: value.to_s, replace: false)
72
- end
73
-
74
- # Tags to remove. Only tags that are either manually defined or completely undefined can be removed.
75
- #
76
- # @param values [Array<String>]
77
- # @return [self]
78
- def remove(*values)
79
- values.inject(self) { |res, val| res._remove(val) }
80
- end
81
-
82
- # @private
83
- def _remove(value)
84
- merge(remove: value.to_s, replace: false)
85
- end
86
-
87
- # Reason for the change.
88
- #
89
- # @param value [String]
90
- # @return [self]
91
- def reason(value)
92
- merge(reason: value.to_s)
93
- end
94
-
95
- # Tags to apply to the log entry that will be created as a result of this action.
96
- #
97
- # @param values [Array<String>] Allowed values: "InfoboxExport gadget", "WE-Framework gadget".
98
- # @return [self]
99
- def tags(*values)
100
- values.inject(self) { |res, val| res._tags(val) or fail ArgumentError, "Unknown value for tags: #{val}" }
101
- end
102
-
103
- # @private
104
- def _tags(value)
105
- defined?(super) && super || ["InfoboxExport gadget", "WE-Framework gadget"].include?(value.to_s) && merge(tags: value.to_s, replace: false)
106
- end
107
-
108
- # A "csrf" token retrieved from action=query&meta=tokens
109
- #
110
- # @param value [String]
111
- # @return [self]
112
- def token(value)
113
- merge(token: value.to_s)
114
- end
115
- end
116
- end
117
- end