Auto-Updater API Uç Noktası#
ElitHost ekosisteminde yayınlanan tüm masaüstü uygulamaları açılış esnasında aşağıdaki genel API uç noktasını sorgulayarak güncel sürüm durumunu öğrenebilir:
GET https://elithost.com.tr/api/v1/releases/{slug}/latest?platform={platform}
- Hız Sınırlaması (Rate Limit): İstemci IP başına dakikada 60 istek (
throttle:60,1). - Önbellekleme: Sunucu tarafında 10 dakika (600 saniye)
Cache::rememberile hafızada tutulur. - Desteklenen Platformlar:
windows,linux_deb,linux_appimage,macos_dmg,web.
Örnek JSON Yanıtı#
{
"product_slug": "baglanx",
"latest_version": "3.1.0",
"release_date": "2026-11-12",
"is_critical": false,
"changelog_summary": "P2P WebRTC donanım hızlandırma ve çoklu monitör desteği.",
"download_url": "https://patikahub.com/elithost/BaglanX_Setup_3.1.0_x64.exe",
"direct_download_url": "https://elithost.com.tr/download/baglanx/windows",
"file_size": "30.6 MB",
"sha256_hash": "2a47ffdc83bdce0159be4d3393ec24ec9d9ce09ebfc98be9031d45bcbf83c480"
}
Python Entegrasyon Kodu#
import requests
import sys
CURRENT_VERSION = "3.0.0"
API_URL = "https://elithost.com.tr/api/v1/releases/baglanx/latest?platform=windows"
def check_for_updates():
try:
response = requests.get(API_URL, timeout=5)
if response.status_code == 200:
data = response.json()
latest = data.get("latest_version")
if latest and latest > CURRENT_VERSION:
print(f"[GÜNCELLEME VAR] Mevcut: {CURRENT_VERSION} -> Yeni: {latest}")
print(f"İndirme Linki: {data.get('download_url')}")
if data.get("is_critical"):
print("[UYARI] Bu kritik bir güvenlik güncellemesidir!")
except Exception as e:
print(f"Güncelleme denetlenemedi: {e}")
if __name__ == "__main__":
check_for_updates()