main.php 845 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * v1 API main view.
  4. *
  5. * Linkks to all API commands.
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package SWDB
  10. * @category API
  11. */
  12. header("Content-Type:application/json");
  13. $links = [
  14. "Archetypes" => URL::BASE . "/API/v1/archetypes",
  15. "Area types" => URL::BASE . "/API/v1/area_types",
  16. "Areas types" => URL::BASE . "/API/v1/areas",
  17. "Buildings" => URL::BASE . "/API/v1/buildings",
  18. "Decorations" => URL::BASE . "/API/v1/decorations",
  19. "Areas types" => URL::BASE . "/API/v1/areas",
  20. "Units" => URL::BASE . "/API/v1/units",
  21. "Skills" => URL::BASE . "/API/v1/skills",
  22. "Skill effects" => URL::BASE . "/API/v1/skill_efects",
  23. ];
  24. header("HTTP/1.1 200");
  25. $json_response = json_encode($links);
  26. echo $json_response;