<?php

	use Reflect\{Response, Path, Call};
	use Reflect\Rules\{Ruleset, Rules, Type};

	use VLW\API\Endpoints;

	require_once Path::root("src/API/Endpoints.php");

	class GET_Update {
		protected Ruleset $ruleset;

		public function __construct() {
			$this->ruleset = new Ruleset(strict: true);
			$this->ruleset->validate_or_exit();
		}

		// Update all runtime database endpoints
		public function main(): Response {
			(new Call(Endpoints::SEARCH->value))->post();
			(new Call(Endpoints::COFFEE_STATS->value))->post();
			(new Call(Endpoints::ABOUT_LANGUAGES->value))->post();

			return new Response();
		}
	}