Content deleted Content added
dump a bunch of code to test this and Module:IP: some of the code, after refactoring, would be useful for this module; see talk page for test results |
make the response more similar to the MediaWiki Action API |
||
Line 57:
--
-- {
--
-- ips = {
--
--
-- ['
-- ['
--
-- }
-- ranges = {▼
-- {▼
-- range = '4.5.6.0/24',▼
-- ['ip-version'] = 'IPv4',▼
-- ['matches-range'] = '4.5.0.0/16',▼
-- ['entity-id'] = 'entityid'▼
-- }▼
-- },▼
-- ['matched-ranges'] = {▼
-- {▼
-- range = '1.2.3.0/24',▼
-- ['ip-version'] = 'IPv4',▼
-- ['entity-id'] = 'entityid'▼
-- },
-- ranges = {
--
--
-- ['
--
▲-- ['entity-id'] = 'entityid'
-- },▼
--
--
--
--
--
-- ['
-- ['
-- '4.5.0.0/16'▼
-- '6.7.0.0/16'▼
-- },
--
-- range = '
--
--
▲-- }
-- entities = {
▲-- {
-- name = 'The entity name',
-- description = 'A description of the entity',
-- notes = 'Notes about the entity or its ranges'
-- }
-- }
--
-- Response with errors:
--
-- {
-- code = 'example-error',
-- info = 'There was an error',
-- ['*'] = 'See https://en.wikipedia.org/wiki/Module:Sensitive_IP_addresses for API usage'
-- }
-- }
|