Template:API
Revision as of 00:34, 10 September 2020 by Shaman (talk | contribs) (Created page with "<includeonly>{{prefix|{{{prefix}}}}}{{name|{{anchor|{{{name}}}}}{{{name}}}}}{{var|1=({{{args}}})}}{{#if: {{{return|}}}|<br>return: {{var|1={{{return}}}}}|}}{{#...")
{{API <!-- Callout example --> |prefix = Spring |name = UseTeamResource |arg1 = {{type|number}} teamID |arg2 = {{type|string}} "metal" {{pipe}} "energy" |arg3 = {{type|number}} amount {{pipe}} { metal = {{type|number}} amount, energy = {{type|number}} amount } |output = {{type|nil}} {{pipe}} {{type|bool}} hadEnough |info = Imposes a one-off usage of resources on the given team. The return value indicates whether or not the team had sufficient resources to meet the usage demand. }}
Template:PrefixTemplate:NameTemplate:CodeStyle(Template:Type teamID, Template:Type Template:Value Template:Pipe Template:Value, Template:Type amount Template:Pipe { metal = Template:Type amount, energy = Template:Type amount })
Template:CodeStyle-> Template:Type Template:Pipe Template:Type hadEnough
- Deduct the specified amount from the team's metal or energy resource.
Debug data:
[SQLBagOStuff] MainObjectStash using store ReplicatedBagOStuff
[objectcache] MainWANObjectCache using store EmptyBagOStuff
IP: 18.222.35.177
Start request GET /mediawiki/index.php?oldid=6866&title=Template%3AAPI
HTTP HEADERS:
CONTENT-TYPE:
CONTENT-LENGTH: 0
PRIORITY: u=0, i
SEC-FETCH-DEST: document
SEC-FETCH-USER: ?1
SEC-FETCH-MODE: navigate
SEC-FETCH-SITE: none
UPGRADE-INSECURE-REQUESTS: 1
SEC-CH-UA-PLATFORM: "Windows"
SEC-CH-UA-MOBILE: ?0
SEC-CH-UA: "HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"
USER-AGENT: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
HOST: zero-k.info
ACCEPT-ENCODING: gzip, deflate, br, zstd
ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7
PRAGMA: no-cache
CONNECTION: close
CACHE-CONTROL: no-cache[localisation] LocalisationCache: using store LCStoreDB
[session] SessionManager using store SqlBagOStuff
[DBReplication] Cannot use ChronologyProtector with EmptyBagOStuff
[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: request info {
"IPAddress": "18.222.35.177",
"UserAgent": "Mozilla\/5.0 AppleWebKit\/537.36 (KHTML, like Gecko; compatible; ClaudeBot\/1.0; +claudebot@anthropic.com)",
"ChronologyProtection": false,
"ChronologyPositionIndex": 0,
"ChronologyClientId": false
}[DBConnection] Wikimedia\Rdbms\LoadBalancer::lazyLoadReplicationPositions: executed chronology callback.
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[session] SessionBackend "d7bpjf87kr0uo8ep2kddjumnqp9rdihq" is unsaved, marking dirty in constructor
[session] SessionBackend "d7bpjf87kr0uo8ep2kddjumnqp9rdihq" save: dataDirty=1 metaDirty=1 forcePersist=0
[cookie] already deleted setcookie: "wikidb229_mw__session", "", "1713388506", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_UserID", "", "1713388506", "/", "", "", "1"
[cookie] already deleted setcookie: "wikidb229_mw_Token", "", "1713388506", "/", "", "", "1"
[cookie] already deleted setcookie: "forceHTTPS", "", "1713388506", "/", "", "", "1"
[DBConnection] Wikimedia\Rdbms\LoadBalancer::getLocalConnection: connected to database 0 at 'localhost'.
Title::getRestrictionTypes: applicable restrictions to [[Template:API]] are {edit,move}
[ContentHandler] Created handler for wikitext: WikitextContentHandler
[MessageCache] MessageCache using store SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] SqlBagOStuff::lock failed due to timeout for wikidb229-mw_:messages:en.
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[MessageCache] MessageCache::load: Loading en... local cache is empty, global cache is expired/volatile, loading from database
ParserFactory: using preprocessor: Preprocessor_Hash
Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
[caches] parser: SqlBagOStuff
Article::view using parser cache: yes
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
Article::view: doing uncached parse
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:f593b93a09ea2f934c9d5e6e4264abcf:0)
[Preprocessor] Cached preprocessor output (key: wikidb229-mw_:preprocess-hash:f593b93a09ea2f934c9d5e6e4264abcf:0)
Saved in parser cache with key wikidb229-mw_:pcache:idhash:1266-0!canonical and timestamp 20250417211506 and revision id 6866
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
[SQLBagOStuff] Connection mysql object #127 (handle id #121) will be used for SqlBagOStuff
MediaWiki::preOutputCommit: primary transaction round committed
MediaWiki::preOutputCommit: pre-send deferred updates completed
MediaWiki::preOutputCommit: session changes committed
MediaWiki::preOutputCommit: LBFactory shutdown completed
Title::getRestrictionTypes: applicable restrictions to [[Template:API]] are {edit,move}