A-F-İ-Ş Projesi API'si, şifreleme ve çözme işlemlerini programatik olarak yapmanızı sağlar. RESTful JSON API kullanarak doğrusal fonksiyon tabanlı şifreleme ve çözme işlemlerinizi gerçekleştirebilirsiniz.
API Dokümanı
Endpoint'ler
POST /process
Metin şifreleme veya şifre çözme işlemini gerçekleştirir.
İstek Parametreleri
{
"text": "Şifrelenecek veya çözülecek metin",
"function": "3x + 7",
"alphabet": "abcdefghijklmnopqrstuvwxyz",
"operation": "encrypt" // veya "decrypt"
}
Başarılı Yanıt
{
"result": "Şifrelenmiş veya çözülmüş metin",
"status": "success"
}
Hata Yanıtı
{
"error": "Hata mesajı"
}
GET /health
API servisinin durumunu kontrol eder.
Başarılı Yanıt
{
"status": "ok",
"timestamp": "2025-05-19T12:34:56.789",
"version": "2.0.0"
}
Örnekler
curl -X POST https://afis-proje.com/process \
-H "Content-Type: application/json" \
-d '{
"text": "Merhaba Dünya",
"function": "3x + 7",
"alphabet": "abcdefghijklmnopqrstuvwxyz",
"operation": "encrypt"
}'
import requests
url = "https://afis-proje.com/process"
payload = {
"text": "Merhaba Dünya",
"function": "3x + 7",
"alphabet": "abcdefghijklmnopqrstuvwxyz",
"operation": "encrypt"
}
response = requests.post(url, json=payload)
data = response.json()
if response.status_code == 200:
print(f"Sonuç: {data['result']}")
else:
print(f"Hata: {data.get('error', 'Bilinmeyen hata')}")
fetch('https://afis-proje.com/process', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
text: 'Merhaba Dünya',
function: '3x + 7',
alphabet: 'abcdefghijklmnopqrstuvwxyz',
operation: 'encrypt'
})
})
.then(response => response.json())
.then(data => {
if (data.status === 'success') {
console.log(`Sonuç: ${data.result}`);
} else {
console.error(`Hata: ${data.error}`);
}
})
.catch(error => console.error('Hata:', error));
Kısıtlamalar
- İstek Limiti: Dakikada 10 istek
- Maksimum Metin Uzunluğu: 10,000 karakter
- Alfabe Uzunluğu: 2-100 karakter