/* * SPDX-License-Identifier: AGPL-3.0-or-later * Copyright (C) 2025 Sergej Görzen * This file is part of OmiLAXR. */ using OmiLAXR.Utils; using UnityEngine; namespace OmiLAXR.Endpoints { /// /// Abstract base class for web-based endpoints. /// Provides utility methods for web-related operations in Unity. /// public abstract class WebEndpoint : Endpoint { /// /// Retrieves the absolute URL of the current application. /// Useful for web-based context and configuration. /// /// The full URL of the current application public static string GetAbsoluteUrl() => Application.absoluteURL; /// /// Lazy-initialized web queries utility. /// Creates a new WebQueries instance if not already existing. /// private WebQueries _queries; /// /// Provides access to web-related query utilities. /// Initializes with the current application's absolute URL. /// public WebQueries Queries => _queries ??= new WebQueries(GetAbsoluteUrl()); } }