Difference between revisions of "Metadata:Tags/Docs"

From Neocron Wiki
Jump to: navigation, search
(Docs added)
 
 
(10 intermediate revisions by the same user not shown)
Line 2: Line 2:
  
 
This extension is designed to be used on THN websites such as the Stats DB and it is intended this extension will be expanded to be used on the upcoming THN Rares DB V2
 
This extension is designed to be used on THN websites such as the Stats DB and it is intended this extension will be expanded to be used on the upcoming THN Rares DB V2
 +
 +
== Configuration File ==
 +
 +
The main confuration file is [[MetaData:Tags/Tags.yaml]] The format of the file must be in YAML
 +
 +
== Example ==
 +
 +
<pre>
 +
tags: # Required
 +
  factions_table: # Tag name
 +
      url: http://stats.techhaven.org/api/data/en/faction-relations.html
 +
      cache: 30
 +
</pre>
 +
 +
Then using the tag <<nowiki />factions_table/> in the page will produce the following.
 +
 +
<factions_table/>
 +
 +
== Required params ==
 +
 +
<pre>
 +
tags:
 +
  faction_relation:
 +
      url: http://stats.techhaven.org/api/data/en/faction-relation.html
 +
      cache: 30
 +
      requiredParams:
 +
          - factionid
 +
</pre>
 +
 +
'''requiredParams''' ensures the correct params are specified. If they are not you will get a message as follows when you specify <<nowiki />faction_relation/>
 +
 +
<faction_relation/>
 +
 +
So to get the table to display. Use the following
 +
 +
<<nowiki />faction_relation factionid="1"/>
 +
 +
<faction_relation factionid="1"/>
 +
 +
== Optional and Default params ==
 +
 +
<pre>
 +
tags:
 +
  test_ca_table:
 +
      url: http://stats.techhaven.org/api/data/en/faction-relation.html
 +
      cache: 30   
 +
      optionalParams:
 +
          - factionid
 +
      defaultParams:
 +
          factionid: 1
 +
</pre>
 +
 +
<<nowiki />test_ca_table/>
 +
 +
<test_ca_table/>
 +
 +
<<nowiki />test_ca_table factionid="14"/>
 +
 +
<test_ca_table factionid="14"/>

Latest revision as of 09:26, 25 October 2013

Sorry you do not have permissions to view this page.