Jump to content

Module:Video game wikidata/sandbox

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Ferret (talk | contribs) at 19:37, 25 April 2016 (Created page with 'local p = {} -- Translation table for converting numeric-IDs to shorthand aliases. local systemAliases = { [10677] = 'PS1', [1323662] = 'PS1', -- Placeholder,...'). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
local p = {}

-- Translation table for converting numeric-IDs to shorthand aliases.
local systemAliases = {
	[10677] = 'PS1',
	[1323662] = 'PS1', -- Placeholder, this is actually the series but could be mistakenly used for PS1.
	[10680] = 'PS2',
	[10683] = 'PS3',
	[5014725] = 'PS4',
	[16338] = 'PC',
	[8079] = 'Wii',
	[56942] = 'WiiU',
	[132020] = 'XBOX',
	[48263] = 'X360',
	[13361286] = 'XONE',
	[203597] = '3DS',
	[188808] = 'PSV',
	[170323] = 'DS', -- Sometimes has been NDS
	[170325] = 'PSP',
	[48493] = 'IOS', -- iOS, iPhone, iPad
	[94] = 'AND', -- Android
	[186437] = 'GB',
	[188642] = 'GBA',
	[203992] = 'GBC',
	[184198] = 'DC',
	[200912] = 'SAT',
	[172742] = 'NES',
	[183259] = 'SNES',
	[184839] = 'N64',
	[182172] = 'GC', -- Sometimes has been NGC
}

-- Translation table for converting system aliases to QIDs
local systemIDs = {
	['PS1'] = 10677,
	['PS2'] = 10680,
	['PS3'] = 10683,
	['PS4'] = 5014725,
	['PC'] = 16338,
	['WII'] = 8079,
	['WIIU'] = 56942,
	['XBOX'] = 132020,
	['X360'] = 48263,
	['XONE'] = 13361286,
	['3DS'] = 203597,
	['PSV'] = 188808,
	['DS'] = 170323,
	['NDS'] = 170323,
	['PSP'] = 170325,
	['IOS'] = 48493,
	['AND'] = 94,
	['GB'] = 186437,
	['GBA'] = 188642,
	['GBC'] = 203992,
	['DC'] = 184198,
	['SAT'] = 200912,
	['NES'] = 172742,
	['SNES'] = 183259,
	['N64'] = 184839,
	['GC'] = 182172,
	['NGC'] = 182172,
}

-- List of accepted aggregator arguments and their related QID.
local aggregatorAliases = {
    [150248] = 'MC',
    [40160] = 'GR'
}   

-- List of accepted aggregator arguments and their related QID.
local aggregatorIDs = {
    ['MC'] = 150248,
    ['GR'] = 40160
}   

-- List of accepted reviewer arguments and their related QID.
local reviewerAliases = {
}   

-- List of accepted reviewer arguments and their related QID.
local reviewerIDs = {
} 

function p.getSystemAlias(numericId)
	return systemAliases[numericId];
end

function p.getSystemID(system)
	return systemIDs[system];
end

function p.getAggregatorAlias(numericId)
	return aggregatorAliases[numericId];
end

function p.getAggregatorID(system)
	return aggregatorIDs[system];
end


function p.getReviewerAlias(numericId)
	return reviewerAliases[numericId];
end

function p.getReviewerID(system)
	return reviewerIDs[system];
end

return p