<?xml version="1.0" encoding="utf-8" ?>
<ignite version="1.0" source="restcountries.eu">

  <func name="alpha" endpoint="https://restcountries.eu/rest/v1/alpha?" method="GET" format="JSON_ARRAY" >
    <description>
      This function returns information from restcountries.eu for a given country (2 letter country code). Because the server returns an array, the calling function includes the array Index.
    </description>
    <example>
      =Ignite("restcountries.eu","alpha","capital", 0, "us")
    </example>
    <document>
      <![CDATA[
      <a class="doc" href="https://restcountries.eu/">Documentation</a>
]]>
    </document>
    <inputs>
      <input name="codes" type ="input1"/>
    </inputs>
    <outputs>
      <output name="name" path="name"/>
      <output name="capital" path="capital"/>
      <output name="region" path="region"/>
      <output name="subregion" path="subregion"/>
      <output name="population" path="population"/>
      <output name="area" path="area"/>
      <output name="gini" path="gini"/>
      <output name="nativeName" path="nativeName"/>
      <output name="alpha2Code" path="alpha2Code"/>
      <output name="alpha3Code" path="alpha3Code"/>
      <output name="borders" path="borders"/>
    </outputs>
  </func>

  <examples>
    <![CDATA[

<table border='1' class='ExcelTable2007'>
<tr><th class='heading'>&nbsp;</th><th>A</th><th>B (Forumla)</th><th>C (Output) </th></tr>
<tr><td class='heading' >1</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","name", 0, A1)</td>
    <td>United States</td>
</tr>
<tr><td class='heading' >2</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","capital", 0, A2)</td>
    <td>Washington D.C.</td>
</tr>
<tr><td class='heading' >3</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","region", 0, A3)</td>
    <td>Americas</td>
</tr>
<tr><td class='heading' >4</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","subregion", 0, A4)</td>
    <td>Northern America</td>
</tr>
<tr><td class='heading' >5</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","population", 0, A5)</td>
    <td>321645000</td>
</tr>
<tr><td class='heading' >6</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","gini", 0, A6)</td>
    <td>48</td>
</tr>
<tr><td class='heading' >7</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","nativeName", 0, A7)</td>
    <td>United States</td>
</tr>
<tr><td class='heading' >8</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","alpha2Code", 0, A8)</td>
    <td>US</td>
</tr>
<tr><td class='heading' >9</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","alpha3Code", 0, A9)</td>
    <td>USA</td>
</tr>
<tr><td class='heading' >10</td>
    <td>us</td>
    <td>=Ignite("restcountries.eu","alpha","borders", 0, A10)</td>
    <td>["CAN","MEX"]</td>
</tr>
</table>
      ]]>
  </examples>

</ignite>
