mediawiktory 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +18 -0
- data/CONTRIBUTING.md +16 -0
- data/LICENSE.txt +22 -0
- data/README.md +5 -5
- data/examples/query_generator.rb +1 -1
- data/lib/mediawiktory.rb +2 -1
- data/lib/mediawiktory/action.rb +9 -0
- data/lib/mediawiktory/client.rb +27 -2
- data/lib/mediawiktory/generated/abusefilters.rb +3 -3
- data/lib/mediawiktory/generated/abuselog.rb +2 -2
- data/lib/mediawiktory/generated/allcategories.rb +2 -2
- data/lib/mediawiktory/generated/alldeletedrevisions.rb +4 -4
- data/lib/mediawiktory/generated/allfileusages.rb +2 -2
- data/lib/mediawiktory/generated/allimages.rb +4 -4
- data/lib/mediawiktory/generated/alllinks.rb +3 -3
- data/lib/mediawiktory/generated/allmessages.rb +2 -2
- data/lib/mediawiktory/generated/allpages.rb +8 -8
- data/lib/mediawiktory/generated/allredirects.rb +3 -3
- data/lib/mediawiktory/generated/alltransclusions.rb +3 -3
- data/lib/mediawiktory/generated/allusers.rb +5 -5
- data/lib/mediawiktory/generated/backlinks.rb +3 -3
- data/lib/mediawiktory/generated/blocks.rb +3 -3
- data/lib/mediawiktory/generated/categories.rb +3 -3
- data/lib/mediawiktory/generated/categorymembers.rb +5 -5
- data/lib/mediawiktory/generated/checktoken.rb +1 -1
- data/lib/mediawiktory/generated/checkuser.rb +1 -1
- data/lib/mediawiktory/generated/checkuserlog.rb +1 -1
- data/lib/mediawiktory/generated/close-open-topic.rb +1 -1
- data/lib/mediawiktory/generated/contenttranslation.rb +1 -1
- data/lib/mediawiktory/generated/contenttranslationlangtrend.rb +1 -1
- data/lib/mediawiktory/generated/contributors.rb +4 -4
- data/lib/mediawiktory/generated/coordinates.rb +2 -2
- data/lib/mediawiktory/generated/cxpublish.rb +1 -1
- data/lib/mediawiktory/generated/delete.rb +1 -1
- data/lib/mediawiktory/generated/deletedrevisions.rb +3 -3
- data/lib/mediawiktory/generated/deletedrevs.rb +3 -3
- data/lib/mediawiktory/generated/deleteeducation.rb +1 -1
- data/lib/mediawiktory/generated/duplicatefiles.rb +1 -1
- data/lib/mediawiktory/generated/echomarkread.rb +1 -1
- data/lib/mediawiktory/generated/echomarkseen.rb +1 -1
- data/lib/mediawiktory/generated/edit-header.rb +1 -1
- data/lib/mediawiktory/generated/edit-post.rb +1 -1
- data/lib/mediawiktory/generated/edit-topic-summary.rb +1 -1
- data/lib/mediawiktory/generated/edit.rb +4 -4
- data/lib/mediawiktory/generated/editlist.rb +2 -2
- data/lib/mediawiktory/generated/embeddedin.rb +3 -3
- data/lib/mediawiktory/generated/enlist.rb +2 -2
- data/lib/mediawiktory/generated/expandtemplates.rb +1 -1
- data/lib/mediawiktory/generated/extlinks.rb +1 -1
- data/lib/mediawiktory/generated/extracts.rb +1 -1
- data/lib/mediawiktory/generated/exturlusage.rb +3 -3
- data/lib/mediawiktory/generated/featuredfeed.rb +2 -2
- data/lib/mediawiktory/generated/feedcontributions.rb +3 -3
- data/lib/mediawiktory/generated/feedrecentchanges.rb +2 -2
- data/lib/mediawiktory/generated/feedwatchlist.rb +3 -3
- data/lib/mediawiktory/generated/filearchive.rb +2 -2
- data/lib/mediawiktory/generated/filerepoinfo.rb +1 -1
- data/lib/mediawiktory/generated/fileusage.rb +3 -3
- data/lib/mediawiktory/generated/flow-parsoid-utils.rb +2 -2
- data/lib/mediawiktory/generated/gadgetcategories.rb +1 -1
- data/lib/mediawiktory/generated/gadgets.rb +1 -1
- data/lib/mediawiktory/generated/geosearch.rb +4 -4
- data/lib/mediawiktory/generated/globalallusers.rb +4 -4
- data/lib/mediawiktory/generated/globalblocks.rb +2 -2
- data/lib/mediawiktory/generated/globalgroups.rb +1 -1
- data/lib/mediawiktory/generated/globalusage.rb +1 -1
- data/lib/mediawiktory/generated/globaluserinfo.rb +1 -1
- data/lib/mediawiktory/generated/globaluserrights.rb +2 -2
- data/lib/mediawiktory/generated/imageinfo.rb +1 -1
- data/lib/mediawiktory/generated/images.rb +1 -1
- data/lib/mediawiktory/generated/imageusage.rb +3 -3
- data/lib/mediawiktory/generated/import.rb +2 -2
- data/lib/mediawiktory/generated/info.rb +2 -2
- data/lib/mediawiktory/generated/iwbacklinks.rb +2 -2
- data/lib/mediawiktory/generated/iwlinks.rb +2 -2
- data/lib/mediawiktory/generated/jsonconfig.rb +1 -1
- data/lib/mediawiktory/generated/langbacklinks.rb +2 -2
- data/lib/mediawiktory/generated/langlinks.rb +2 -2
- data/lib/mediawiktory/generated/links.rb +2 -2
- data/lib/mediawiktory/generated/linkshere.rb +3 -3
- data/lib/mediawiktory/generated/listpages.rb +3 -3
- data/lib/mediawiktory/generated/lists.rb +2 -2
- data/lib/mediawiktory/generated/liststudents.rb +1 -1
- data/lib/mediawiktory/generated/lock-topic.rb +1 -1
- data/lib/mediawiktory/generated/logevents.rb +5 -5
- data/lib/mediawiktory/generated/managetags.rb +1 -1
- data/lib/mediawiktory/generated/mobileview.rb +3 -3
- data/lib/mediawiktory/generated/moderate-post.rb +1 -1
- data/lib/mediawiktory/generated/moderate-topic.rb +1 -1
- data/lib/mediawiktory/generated/move.rb +1 -1
- data/lib/mediawiktory/generated/new-topic.rb +1 -1
- data/lib/mediawiktory/generated/notifications.rb +3 -3
- data/lib/mediawiktory/generated/oldreviewedpages.rb +4 -4
- data/lib/mediawiktory/generated/opensearch.rb +3 -3
- data/lib/mediawiktory/generated/options.rb +1 -1
- data/lib/mediawiktory/generated/pageimages.rb +1 -1
- data/lib/mediawiktory/generated/pageswithprop.rb +2 -2
- data/lib/mediawiktory/generated/pageterms.rb +1 -1
- data/lib/mediawiktory/generated/pagetriageaction.rb +1 -1
- data/lib/mediawiktory/generated/paraminfo.rb +3 -3
- data/lib/mediawiktory/generated/parse.rb +3 -3
- data/lib/mediawiktory/generated/prefixsearch.rb +1 -1
- data/lib/mediawiktory/generated/protect.rb +1 -1
- data/lib/mediawiktory/generated/protectedtitles.rb +4 -4
- data/lib/mediawiktory/generated/querypage.rb +1 -1
- data/lib/mediawiktory/generated/random.rb +2 -2
- data/lib/mediawiktory/generated/recentchanges.rb +6 -6
- data/lib/mediawiktory/generated/redirects.rb +3 -3
- data/lib/mediawiktory/generated/refresheducation.rb +1 -1
- data/lib/mediawiktory/generated/reply.rb +1 -1
- data/lib/mediawiktory/generated/reviewactivity.rb +1 -1
- data/lib/mediawiktory/generated/revisiondelete.rb +4 -4
- data/lib/mediawiktory/generated/revisions.rb +4 -4
- data/lib/mediawiktory/generated/rollback.rb +1 -1
- data/lib/mediawiktory/generated/search.rb +4 -4
- data/lib/mediawiktory/generated/setglobalaccountstatus.rb +2 -2
- data/lib/mediawiktory/generated/siteinfo.rb +2 -2
- data/lib/mediawiktory/generated/sitematrix.rb +4 -4
- data/lib/mediawiktory/generated/stabilize.rb +1 -1
- data/lib/mediawiktory/generated/stashedit.rb +2 -2
- data/lib/mediawiktory/generated/stashimageinfo.rb +1 -1
- data/lib/mediawiktory/generated/strikevote.rb +1 -1
- data/lib/mediawiktory/generated/tag.rb +1 -1
- data/lib/mediawiktory/generated/tags.rb +1 -1
- data/lib/mediawiktory/generated/templatedata.rb +1 -1
- data/lib/mediawiktory/generated/templates.rb +2 -2
- data/lib/mediawiktory/generated/titleblacklist.rb +1 -1
- data/lib/mediawiktory/generated/tokens.rb +1 -1
- data/lib/mediawiktory/generated/transcludedin.rb +3 -3
- data/lib/mediawiktory/generated/undelete.rb +1 -1
- data/lib/mediawiktory/generated/upload.rb +1 -1
- data/lib/mediawiktory/generated/usercontribs.rb +4 -4
- data/lib/mediawiktory/generated/userinfo.rb +1 -1
- data/lib/mediawiktory/generated/userrights.rb +2 -2
- data/lib/mediawiktory/generated/users.rb +2 -2
- data/lib/mediawiktory/generated/videoinfo.rb +1 -1
- data/lib/mediawiktory/generated/view-header.rb +1 -1
- data/lib/mediawiktory/generated/view-post-history.rb +1 -1
- data/lib/mediawiktory/generated/view-post.rb +1 -1
- data/lib/mediawiktory/generated/view-topic-history.rb +1 -1
- data/lib/mediawiktory/generated/view-topic-summary.rb +1 -1
- data/lib/mediawiktory/generated/view-topic.rb +1 -1
- data/lib/mediawiktory/generated/view-topiclist.rb +3 -3
- data/lib/mediawiktory/generated/visualeditor.rb +2 -2
- data/lib/mediawiktory/generated/watchlist.rb +5 -5
- data/lib/mediawiktory/generated/watchlistraw.rb +4 -4
- data/lib/mediawiktory/generated/wikibase.rb +1 -1
- data/lib/mediawiktory/generated/wikisets.rb +1 -1
- data/lib/mediawiktory/generated/zeroconfig.rb +1 -1
- data/lib/mediawiktory/mw_module.rb +6 -2
- data/lib/mediawiktory/page.rb +46 -0
- data/lib/mediawiktory/query.rb +21 -23
- data/lib/mediawiktory/version.rb +4 -1
- data/script/lib/parameter.rb +2 -5
- metadata +6 -4
- data/Gemfile.lock +0 -63
- data/lib/mediawiktory/array_with_keys.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e4652318560b8eec98eb6888985fff574f6889d
|
4
|
+
data.tar.gz: f3ef76a2903851dd1b2ff3701faa687ea660fb72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ddfc4dd9d04c9c84064c578406ce0d558ce665ab1b128c44311146b39b6dc0f0019080d1bde801c7b7cda554f7ac8c29c197401d8e0b7ae55af3dc70de867e5
|
7
|
+
data.tar.gz: 2ba01693d9c89a00dabd34650e6e966b20dd705c15c1822b85e398c5c9d322296585d9ea662a72637387508b105a8ceff75fef61bc0749c3f2e7d4565511cb7b
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# MediaWiktory Changelog
|
2
|
+
|
3
|
+
# 0.0.2 (21.11.2015)
|
4
|
+
|
5
|
+
* `Page` class for grouping records in `Query::Response`;
|
6
|
+
* `User-Agent` header support;
|
7
|
+
* Enums handling changed to symbols (were strings before);
|
8
|
+
* Correct behavior on empty pagelist when using generator (@smostovoy);
|
9
|
+
* Raise on errors in response (@smostovoy);
|
10
|
+
* Access to warnings in response (@smostovoy);
|
11
|
+
* Domain redirects transparent handling,
|
12
|
+
http://en.wikipedia.org -> https://en.wikipedia.org (@smostovoy).
|
13
|
+
|
14
|
+
# 0.0.1 (30.11.2015)
|
15
|
+
|
16
|
+
Initial!
|
17
|
+
|
18
|
+
|
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Contributing to MediaWiktory
|
2
|
+
|
3
|
+
Currently, MediaWiktory at early stages of development (aka "young yet
|
4
|
+
useful"). Currenty problems and roadmap can be found at
|
5
|
+
[GitHub Issues](https://github.com/molybdenum-99/mediawiktory/issues) and
|
6
|
+
are grouped into milestones.
|
7
|
+
|
8
|
+
Therefore, the big picture of "what next" is:
|
9
|
+
* more documentation for generated MediaWiki wrappers (both YARD and
|
10
|
+
on-the-fly accessible from code);
|
11
|
+
* more validations and cleaner errors;
|
12
|
+
* simplification of frequent and common tasks.
|
13
|
+
|
14
|
+
You can join MediaWiktory development by usual fork-commit-pull request
|
15
|
+
process, or by providing your own cases and problems you'd like to solve
|
16
|
+
with it.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Victor 'Zverok' Shepelev and contributors.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
is Dec 3, 2015**
|
1
|
+
# MediaWiktory, The MediaWiki Client
|
3
2
|
|
4
3
|
**MediaWiktory** is MediaWiki API client that doesn't suck. No, seriously.
|
5
4
|
|
@@ -94,10 +93,11 @@ response = client.
|
|
94
93
|
|
95
94
|
...but it should be done without flexibility loss.
|
96
95
|
|
97
|
-
##
|
96
|
+
## Authors
|
98
97
|
|
99
|
-
[Victor Shepelev](
|
98
|
+
* [Victor Shepelev](https://zverok.github.io) [@zverok](https://github.com/zverok);
|
99
|
+
* Sergey Mostovoy [@smostovoy](https://github.com/smostovoy).
|
100
100
|
|
101
101
|
## License
|
102
102
|
|
103
|
-
MIT.
|
103
|
+
[MIT](https://github.com/molybdenum-99/mediawiktory/blob/master/LICENSE.txt)
|
data/examples/query_generator.rb
CHANGED
@@ -7,7 +7,7 @@ require 'pp'
|
|
7
7
|
c = Client.new('https://en.wikipedia.org/w/api.php')
|
8
8
|
res = c.query.
|
9
9
|
generator(categorymembers: {title: 'Category:Countries_in_South_America', limit: 50}).
|
10
|
-
prop(revisions: {prop:
|
10
|
+
prop(revisions: {prop: :content}).
|
11
11
|
perform
|
12
12
|
|
13
13
|
res.continue! while res.continue?
|
data/lib/mediawiktory.rb
CHANGED
data/lib/mediawiktory/action.rb
CHANGED
@@ -10,6 +10,7 @@ module MediaWiktory
|
|
10
10
|
super(**values)
|
11
11
|
end
|
12
12
|
|
13
|
+
# FIXME: should be initialize_copy
|
13
14
|
def dup
|
14
15
|
self.class.new(client, to_h)
|
15
16
|
end
|
@@ -33,6 +34,7 @@ module MediaWiktory
|
|
33
34
|
def initialize(action, raw)
|
34
35
|
@action = action
|
35
36
|
@raw = Hashie::Mash.new(raw)
|
37
|
+
raise RequestError, @raw.error.info unless @raw.error.nil?
|
36
38
|
end
|
37
39
|
|
38
40
|
def initialize_copy(other)
|
@@ -43,6 +45,13 @@ module MediaWiktory
|
|
43
45
|
def to_h
|
44
46
|
raw.to_h
|
45
47
|
end
|
48
|
+
|
49
|
+
def warnings
|
50
|
+
@raw.warnings
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
class RequestError < StandardError
|
46
55
|
end
|
47
56
|
end
|
48
57
|
end
|
data/lib/mediawiktory/client.rb
CHANGED
@@ -2,11 +2,30 @@ require_relative 'generated/actions_mixin'
|
|
2
2
|
|
3
3
|
module MediaWiktory
|
4
4
|
class Client
|
5
|
+
# Default MediaWiktory User-Agent header.
|
6
|
+
#
|
7
|
+
# You can set yours as an option to {#initialize}
|
8
|
+
UA = "MediaWiktory/#{MediaWiktory::VERSION} (https://github.com/molybdenum-99/mediawiktory; zverok.offline@gmail.com)"
|
9
|
+
|
10
|
+
class << self
|
11
|
+
# User agent getter/setter.
|
12
|
+
#
|
13
|
+
# Default value is {UA}.
|
14
|
+
#
|
15
|
+
# You can also use per-instance option, see {#initialize}
|
16
|
+
attr_accessor :user_agent
|
17
|
+
end
|
18
|
+
|
5
19
|
attr_reader :url
|
6
20
|
|
7
|
-
def initialize(url)
|
21
|
+
def initialize(url, **options)
|
8
22
|
@url = Addressable::URI.parse(url)
|
9
|
-
@faraday = Faraday.new(url)
|
23
|
+
@faraday = Faraday.new(url) do |f|
|
24
|
+
f.request :url_encoded
|
25
|
+
f.use FaradayMiddleware::FollowRedirects, limit: 5
|
26
|
+
f.adapter Faraday.default_adapter
|
27
|
+
end
|
28
|
+
@faraday.headers.merge!(headers(options))
|
10
29
|
end
|
11
30
|
|
12
31
|
def get(params)
|
@@ -18,5 +37,11 @@ module MediaWiktory
|
|
18
37
|
end
|
19
38
|
|
20
39
|
include ActionsMixin
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
def headers(options)
|
44
|
+
{'User-Agent' => options[:user_agent] || options[:ua] || self.class.user_agent || UA}
|
45
|
+
end
|
21
46
|
end
|
22
47
|
end
|
@@ -4,9 +4,9 @@ module MediaWiktory
|
|
4
4
|
prefix "abf"
|
5
5
|
param :startid, Params::Integer
|
6
6
|
param :endid, Params::Integer
|
7
|
-
param :dir, Params::Enum[
|
8
|
-
param :show, Params::List[Params::Enum[
|
7
|
+
param :dir, Params::Enum[:newer, :older]
|
8
|
+
param :show, Params::List[Params::Enum[:enabled, :"!enabled", :deleted, :"!deleted", :private, :"!private"]]
|
9
9
|
param :limit, Params::IntegerOrMax
|
10
|
-
param :prop, Params::List[Params::Enum[
|
10
|
+
param :prop, Params::List[Params::Enum[:id, :description, :pattern, :actions, :hits, :comments, :lasteditor, :lastedittime, :status, :private]]
|
11
11
|
end
|
12
12
|
end
|
@@ -4,11 +4,11 @@ module MediaWiktory
|
|
4
4
|
prefix "afl"
|
5
5
|
param :start, Params::Timestamp
|
6
6
|
param :end, Params::Timestamp
|
7
|
-
param :dir, Params::Enum[
|
7
|
+
param :dir, Params::Enum[:newer, :older]
|
8
8
|
param :user, Params::String
|
9
9
|
param :title, Params::String
|
10
10
|
param :filter, Params::List[Params::String]
|
11
11
|
param :limit, Params::IntegerOrMax
|
12
|
-
param :prop, Params::List[Params::Enum[
|
12
|
+
param :prop, Params::List[Params::Enum[:ids, :filter, :user, :ip, :title, :action, :details, :result, :timestamp, :hidden, :revid]]
|
13
13
|
end
|
14
14
|
end
|
@@ -6,10 +6,10 @@ module MediaWiktory
|
|
6
6
|
param :continue, Params::String
|
7
7
|
param :to, Params::String
|
8
8
|
param :prefix, Params::String
|
9
|
-
param :dir, Params::Enum[
|
9
|
+
param :dir, Params::Enum[:ascending, :descending]
|
10
10
|
param :min, Params::Integer
|
11
11
|
param :max, Params::Integer
|
12
12
|
param :limit, Params::IntegerOrMax
|
13
|
-
param :prop, Params::List[Params::Enum[
|
13
|
+
param :prop, Params::List[Params::Enum[:size, :hidden]]
|
14
14
|
end
|
15
15
|
end
|
@@ -2,7 +2,7 @@ module MediaWiktory
|
|
2
2
|
class Alldeletedrevisions < MWModule
|
3
3
|
symbol :alldeletedrevisions
|
4
4
|
prefix "adr"
|
5
|
-
param :prop, Params::List[Params::Enum[
|
5
|
+
param :prop, Params::List[Params::Enum[:ids, :flags, :timestamp, :user, :userid, :size, :sha1, :contentmodel, :comment, :parsedcomment, :content, :tags, :parsetree]]
|
6
6
|
param :limit, Params::IntegerOrMax
|
7
7
|
param :expandtemplates, Params::Boolean
|
8
8
|
param :generatexml, Params::Boolean
|
@@ -10,12 +10,12 @@ module MediaWiktory
|
|
10
10
|
param :section, Params::String
|
11
11
|
param :diffto, Params::String
|
12
12
|
param :difftotext, Params::String
|
13
|
-
param :contentformat, Params::Enum["application/json", "text/x-wiki", "text/javascript", "text/css", "text/plain"]
|
13
|
+
param :contentformat, Params::Enum[:"application/json", :"text/x-wiki", :"text/javascript", :"text/css", :"text/plain"]
|
14
14
|
param :user, Params::String
|
15
|
-
param :namespace, Params::List[Params::Enum["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "2300", "2301", "2302", "2303", "710", "711", "446", "447", "2600", "828", "829"]]
|
15
|
+
param :namespace, Params::List[Params::Enum[:"0", :"1", :"2", :"3", :"4", :"5", :"6", :"7", :"8", :"9", :"10", :"11", :"12", :"13", :"14", :"15", :"100", :"101", :"108", :"109", :"118", :"119", :"2300", :"2301", :"2302", :"2303", :"710", :"711", :"446", :"447", :"2600", :"828", :"829"]]
|
16
16
|
param :start, Params::Timestamp
|
17
17
|
param :end, Params::Timestamp
|
18
|
-
param :dir, Params::Enum[
|
18
|
+
param :dir, Params::Enum[:newer, :older]
|
19
19
|
param :from, Params::String
|
20
20
|
param :to, Params::String
|
21
21
|
param :prefix, Params::String
|
@@ -7,8 +7,8 @@ module MediaWiktory
|
|
7
7
|
param :to, Params::String
|
8
8
|
param :prefix, Params::String
|
9
9
|
param :unique, Params::Boolean
|
10
|
-
param :prop, Params::List[Params::Enum[
|
10
|
+
param :prop, Params::List[Params::Enum[:ids, :title]]
|
11
11
|
param :limit, Params::IntegerOrMax
|
12
|
-
param :dir, Params::Enum[
|
12
|
+
param :dir, Params::Enum[:ascending, :descending]
|
13
13
|
end
|
14
14
|
end
|
@@ -2,21 +2,21 @@ module MediaWiktory
|
|
2
2
|
class Allimages < MWModule
|
3
3
|
symbol :allimages
|
4
4
|
prefix "ai"
|
5
|
-
param :sort, Params::Enum[
|
6
|
-
param :dir, Params::Enum[
|
5
|
+
param :sort, Params::Enum[:name, :timestamp]
|
6
|
+
param :dir, Params::Enum[:ascending, :descending, :newer, :older]
|
7
7
|
param :from, Params::String
|
8
8
|
param :to, Params::String
|
9
9
|
param :continue, Params::String
|
10
10
|
param :start, Params::Timestamp
|
11
11
|
param :end, Params::Timestamp
|
12
|
-
param :prop, Params::List[Params::Enum[
|
12
|
+
param :prop, Params::List[Params::Enum[:timestamp, :user, :userid, :comment, :parsedcomment, :canonicaltitle, :url, :size, :dimensions, :sha1, :mime, :mediatype, :metadata, :commonmetadata, :extmetadata, :bitdepth]]
|
13
13
|
param :prefix, Params::String
|
14
14
|
param :minsize, Params::Integer
|
15
15
|
param :maxsize, Params::Integer
|
16
16
|
param :sha1, Params::String
|
17
17
|
param :sha1base36, Params::String
|
18
18
|
param :user, Params::String
|
19
|
-
param :filterbots, Params::Enum[
|
19
|
+
param :filterbots, Params::Enum[:all, :bots, :nobots]
|
20
20
|
param :mime, Params::List[Params::String]
|
21
21
|
param :limit, Params::IntegerOrMax
|
22
22
|
end
|
@@ -7,9 +7,9 @@ module MediaWiktory
|
|
7
7
|
param :to, Params::String
|
8
8
|
param :prefix, Params::String
|
9
9
|
param :unique, Params::Boolean
|
10
|
-
param :prop, Params::List[Params::Enum[
|
11
|
-
param :namespace, Params::Enum["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "2300", "2301", "2302", "2303", "710", "711", "446", "447", "2600", "828", "829"]
|
10
|
+
param :prop, Params::List[Params::Enum[:ids, :title]]
|
11
|
+
param :namespace, Params::Enum[:"0", :"1", :"2", :"3", :"4", :"5", :"6", :"7", :"8", :"9", :"10", :"11", :"12", :"13", :"14", :"15", :"100", :"101", :"108", :"109", :"118", :"119", :"2300", :"2301", :"2302", :"2303", :"710", :"711", :"446", :"447", :"2600", :"828", :"829"]
|
12
12
|
param :limit, Params::IntegerOrMax
|
13
|
-
param :dir, Params::Enum[
|
13
|
+
param :dir, Params::Enum[:ascending, :descending]
|
14
14
|
end
|
15
15
|
end
|
@@ -3,13 +3,13 @@ module MediaWiktory
|
|
3
3
|
symbol :allmessages
|
4
4
|
prefix "am"
|
5
5
|
param :messages, Params::List[Params::String]
|
6
|
-
param :prop, Params::List[Params::Enum[
|
6
|
+
param :prop, Params::List[Params::Enum[:default]]
|
7
7
|
param :enableparser, Params::Boolean
|
8
8
|
param :nocontent, Params::Boolean
|
9
9
|
param :includelocal, Params::Boolean
|
10
10
|
param :args, Params::List[Params::String]
|
11
11
|
param :filter, Params::String
|
12
|
-
param :customised, Params::Enum[
|
12
|
+
param :customised, Params::Enum[:all, :modified, :unmodified]
|
13
13
|
param :lang, Params::String
|
14
14
|
param :from, Params::String
|
15
15
|
param :to, Params::String
|
@@ -6,16 +6,16 @@ module MediaWiktory
|
|
6
6
|
param :continue, Params::String
|
7
7
|
param :to, Params::String
|
8
8
|
param :prefix, Params::String
|
9
|
-
param :namespace, Params::Enum["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "2300", "2301", "2302", "2303", "710", "711", "446", "447", "2600", "828", "829"]
|
10
|
-
param :filterredir, Params::Enum[
|
9
|
+
param :namespace, Params::Enum[:"0", :"1", :"2", :"3", :"4", :"5", :"6", :"7", :"8", :"9", :"10", :"11", :"12", :"13", :"14", :"15", :"100", :"101", :"108", :"109", :"118", :"119", :"2300", :"2301", :"2302", :"2303", :"710", :"711", :"446", :"447", :"2600", :"828", :"829"]
|
10
|
+
param :filterredir, Params::Enum[:all, :redirects, :nonredirects]
|
11
11
|
param :minsize, Params::Integer
|
12
12
|
param :maxsize, Params::Integer
|
13
|
-
param :prtype, Params::List[Params::Enum[
|
14
|
-
param :prlevel, Params::List[Params::Enum[
|
15
|
-
param :prfiltercascade, Params::Enum[
|
13
|
+
param :prtype, Params::List[Params::Enum[:edit, :move, :upload]]
|
14
|
+
param :prlevel, Params::List[Params::Enum[:autoconfirmed, :templateeditor, :sysop, :superprotect]]
|
15
|
+
param :prfiltercascade, Params::Enum[:cascading, :noncascading, :all]
|
16
16
|
param :limit, Params::IntegerOrMax
|
17
|
-
param :dir, Params::Enum[
|
18
|
-
param :filterlanglinks, Params::Enum[
|
19
|
-
param :prexpiry, Params::Enum[
|
17
|
+
param :dir, Params::Enum[:ascending, :descending]
|
18
|
+
param :filterlanglinks, Params::Enum[:withlanglinks, :withoutlanglinks, :all]
|
19
|
+
param :prexpiry, Params::Enum[:indefinite, :definite, :all]
|
20
20
|
end
|
21
21
|
end
|
@@ -7,9 +7,9 @@ module MediaWiktory
|
|
7
7
|
param :to, Params::String
|
8
8
|
param :prefix, Params::String
|
9
9
|
param :unique, Params::Boolean
|
10
|
-
param :prop, Params::List[Params::Enum[
|
11
|
-
param :namespace, Params::Enum["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "2300", "2301", "2302", "2303", "710", "711", "446", "447", "2600", "828", "829"]
|
10
|
+
param :prop, Params::List[Params::Enum[:ids, :title, :fragment, :interwiki]]
|
11
|
+
param :namespace, Params::Enum[:"0", :"1", :"2", :"3", :"4", :"5", :"6", :"7", :"8", :"9", :"10", :"11", :"12", :"13", :"14", :"15", :"100", :"101", :"108", :"109", :"118", :"119", :"2300", :"2301", :"2302", :"2303", :"710", :"711", :"446", :"447", :"2600", :"828", :"829"]
|
12
12
|
param :limit, Params::IntegerOrMax
|
13
|
-
param :dir, Params::Enum[
|
13
|
+
param :dir, Params::Enum[:ascending, :descending]
|
14
14
|
end
|
15
15
|
end
|
@@ -7,9 +7,9 @@ module MediaWiktory
|
|
7
7
|
param :to, Params::String
|
8
8
|
param :prefix, Params::String
|
9
9
|
param :unique, Params::Boolean
|
10
|
-
param :prop, Params::List[Params::Enum[
|
11
|
-
param :namespace, Params::Enum["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "2300", "2301", "2302", "2303", "710", "711", "446", "447", "2600", "828", "829"]
|
10
|
+
param :prop, Params::List[Params::Enum[:ids, :title]]
|
11
|
+
param :namespace, Params::Enum[:"0", :"1", :"2", :"3", :"4", :"5", :"6", :"7", :"8", :"9", :"10", :"11", :"12", :"13", :"14", :"15", :"100", :"101", :"108", :"109", :"118", :"119", :"2300", :"2301", :"2302", :"2303", :"710", :"711", :"446", :"447", :"2600", :"828", :"829"]
|
12
12
|
param :limit, Params::IntegerOrMax
|
13
|
-
param :dir, Params::Enum[
|
13
|
+
param :dir, Params::Enum[:ascending, :descending]
|
14
14
|
end
|
15
15
|
end
|
@@ -5,11 +5,11 @@ module MediaWiktory
|
|
5
5
|
param :from, Params::String
|
6
6
|
param :to, Params::String
|
7
7
|
param :prefix, Params::String
|
8
|
-
param :dir, Params::Enum[
|
9
|
-
param :group, Params::List[Params::Enum[
|
10
|
-
param :excludegroup, Params::List[Params::Enum[
|
11
|
-
param :rights, Params::List[Params::Enum[
|
12
|
-
param :prop, Params::List[Params::Enum[
|
8
|
+
param :dir, Params::Enum[:ascending, :descending]
|
9
|
+
param :group, Params::List[Params::Enum[:bot, :sysop, :bureaucrat, :reviewer, :steward, :accountcreator, :import, :transwiki, :"ipblock-exempt", :oversight, :founder, :rollbacker, :autoreviewer, :researcher, :filemover, :checkuser, :templateeditor, :"massmessage-sender", :abusefilter, :epcoordinator, :eponline, :epcampus, :epinstructor, :suppress, :"flow-bot", :confirmed]]
|
10
|
+
param :excludegroup, Params::List[Params::Enum[:bot, :sysop, :bureaucrat, :reviewer, :steward, :accountcreator, :import, :transwiki, :"ipblock-exempt", :oversight, :founder, :rollbacker, :autoreviewer, :researcher, :filemover, :checkuser, :templateeditor, :"massmessage-sender", :abusefilter, :epcoordinator, :eponline, :epcampus, :epinstructor, :suppress, :"flow-bot", :confirmed]]
|
11
|
+
param :rights, Params::List[Params::Enum[:apihighlimits, :applychangetags, :autoconfirmed, :autopatrol, :bigdelete, :block, :blockemail, :bot, :browsearchive, :changetags, :createaccount, :createpage, :createtalk, :delete, :deletedhistory, :deletedtext, :deletelogentry, :deleterevision, :edit, :editcontentmodel, :editinterface, :editprotected, :editmyoptions, :editmyprivateinfo, :editmyusercss, :editmyuserjs, :editmywatchlist, :editsemiprotected, :editusercssjs, :editusercss, :edituserjs, :hideuser, :import, :importupload, :"ipblock-exempt", :managechangetags, :markbotedits, :mergehistory, :minoredit, :move, :movefile, :"move-categorypages", :"move-rootuserpages", :"move-subpages", :nominornewtalk, :noratelimit, :"override-export-depth", :pagelang, :passwordreset, :patrol, :patrolmarks, :protect, :proxyunbannable, :purge, :read, :reupload, :"reupload-own", :"reupload-shared", :rollback, :sendemail, :siteadmin, :suppressionlog, :suppressredirect, :suppressrevision, :unblockself, :undelete, :unwatchedpages, :upload, :upload_by_url, :userrights, :"userrights-interwiki", :viewmyprivateinfo, :viewmywatchlist, :viewsuppressed, :writeapi, :spamblacklistlog, :tboverride, :"tboverride-account", :titleblacklistlog, :"gadgets-edit", :"gadgets-definition-edit", :renameuser, :nuke, :massmessage, :"gather-hidelist", :usermerge, :review, :validate, :autoreview, :autoreviewrestore, :unreviewedpages, :movestable, :stablesettings, :templateeditor, :superprotect, :editeditorprotected, :"flow-edit-post", :"flow-suppress", :"flow-hide", :"flow-delete", :"transcode-reset", :"transcode-status", :globalblock, :"globalblock-whitelist", :"globalblock-exempt", :"securepoll-create-poll", :torunblocked, :skipcaptcha, :"override-antispoof", :"centralauth-merge", :"centralauth-unmerge", :"centralauth-lock", :"centralauth-oversight", :globalgrouppermissions, :globalgroupmembership, :"centralauth-autoaccount", :"centralauth-rename", :"centralauth-usermerge", :viewdeletedfile, :collectionsaveasuserpage, :collectionsaveascommunitypage, :"abusefilter-modify", :"abusefilter-log-detail", :"abusefilter-view", :"abusefilter-log", :"abusefilter-modify-restricted", :"abusefilter-revert", :"abusefilter-view-private", :"abusefilter-log-private", :"abusefilter-hidden-log", :"abusefilter-hide-log", :"abusefilter-modify-global", :"moodbar-admin", :"mf-uploadbutton", :"vipsscaler-test", :"ep-org", :"ep-course", :"ep-token", :"ep-enroll", :"ep-remstudent", :"ep-online", :"ep-campus", :"ep-instructor", :"ep-beonline", :"ep-becampus", :"ep-beinstructor", :"ep-bereviewer", :"ep-remreviewer", :"ep-bulkdelorgs", :"ep-bulkdelcourses", :"ep-remarticle", :"ep-addstudent", :"flow-lock", :"flow-create-board", :mwoauthproposeconsumer, :mwoauthupdateownconsumer, :mwoauthmanageconsumer, :mwoauthsuppress, :mwoauthviewsuppressed, :mwoauthviewprivate, :mwoauthmanagemygrants, :checkuser, :"checkuser-log"]]
|
12
|
+
param :prop, Params::List[Params::Enum[:blockinfo, :groups, :implicitgroups, :rights, :editcount, :registration]]
|
13
13
|
param :limit, Params::IntegerOrMax
|
14
14
|
param :witheditsonly, Params::Boolean
|
15
15
|
param :activeusers, Params::Boolean
|
@@ -5,9 +5,9 @@ module MediaWiktory
|
|
5
5
|
param :title, Params::String
|
6
6
|
param :pageid, Params::Integer
|
7
7
|
param :continue, Params::String
|
8
|
-
param :namespace, Params::List[Params::Enum["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "2300", "2301", "2302", "2303", "710", "711", "446", "447", "2600", "828", "829"]]
|
9
|
-
param :dir, Params::Enum[
|
10
|
-
param :filterredir, Params::Enum[
|
8
|
+
param :namespace, Params::List[Params::Enum[:"0", :"1", :"2", :"3", :"4", :"5", :"6", :"7", :"8", :"9", :"10", :"11", :"12", :"13", :"14", :"15", :"100", :"101", :"108", :"109", :"118", :"119", :"2300", :"2301", :"2302", :"2303", :"710", :"711", :"446", :"447", :"2600", :"828", :"829"]]
|
9
|
+
param :dir, Params::Enum[:ascending, :descending]
|
10
|
+
param :filterredir, Params::Enum[:all, :redirects, :nonredirects]
|
11
11
|
param :limit, Params::IntegerOrMax
|
12
12
|
param :redirect, Params::Boolean
|
13
13
|
end
|
@@ -4,13 +4,13 @@ module MediaWiktory
|
|
4
4
|
prefix "bk"
|
5
5
|
param :start, Params::Timestamp
|
6
6
|
param :end, Params::Timestamp
|
7
|
-
param :dir, Params::Enum[
|
7
|
+
param :dir, Params::Enum[:newer, :older]
|
8
8
|
param :ids, Params::List[Params::Integer]
|
9
9
|
param :users, Params::List[Params::String]
|
10
10
|
param :ip, Params::String
|
11
11
|
param :limit, Params::IntegerOrMax
|
12
|
-
param :prop, Params::List[Params::Enum[
|
13
|
-
param :show, Params::List[Params::Enum[
|
12
|
+
param :prop, Params::List[Params::Enum[:id, :user, :userid, :by, :byid, :timestamp, :expiry, :reason, :range, :flags]]
|
13
|
+
param :show, Params::List[Params::Enum[:account, :"!account", :temp, :"!temp", :ip, :"!ip", :range, :"!range"]]
|
14
14
|
param :continue, Params::String
|
15
15
|
end
|
16
16
|
end
|
@@ -2,11 +2,11 @@ module MediaWiktory
|
|
2
2
|
class Categories < MWModule
|
3
3
|
symbol :categories
|
4
4
|
prefix "cl"
|
5
|
-
param :prop, Params::List[Params::Enum[
|
6
|
-
param :show, Params::List[Params::Enum[
|
5
|
+
param :prop, Params::List[Params::Enum[:sortkey, :timestamp, :hidden]]
|
6
|
+
param :show, Params::List[Params::Enum[:hidden, :"!hidden"]]
|
7
7
|
param :limit, Params::IntegerOrMax
|
8
8
|
param :continue, Params::String
|
9
9
|
param :categories, Params::List[Params::String]
|
10
|
-
param :dir, Params::Enum[
|
10
|
+
param :dir, Params::Enum[:ascending, :descending]
|
11
11
|
end
|
12
12
|
end
|