API Dokümantasyonu
Güçlü Twitter API'mizi Keşfedin
Kapsamlı dokümantasyon ile hızlı entegrasyon
Hızlı Başlangıç
API'mizi kullanmaya başlamak için gereken temel adımlar
Hesap Oluştur
Ücretsiz hesap oluşturun ve API anahtarınızı alın
API Anahtarı
Dashboard'tan API anahtarınızı kopyalayın
İlk İstek
API'ye ilk isteğinizi gönderin
Entegrasyon
Uygulamanıza entegre edin
Örnek
curl -X GET "https://api.emotionsmedia.com/v2/user/analyze" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"username": "elonmusk"}'
Kimlik Doğrulama
API'ye erişim için kimlik doğrulama gereklidir
API Anahtarı
Her istekte X-API-Key header'ı ile API anahtarınızı gönderin
X-API-Key: vmp_1a2b3c4d5e6f7g8h9i0j
Bearer Token
Alternatif olarak Authorization header'ı ile Bearer token kullanabilirsiniz
Authorization: Bearer vmp_1a2b3c4d5e6f7g8h9i0j
API Endpoint'leri
Mevcut tüm API endpoint'leri ve kullanımları
Temel URL
https://api.emotionsmedia.com/v2
| Yöntem | Endpoint | Açıklama |
|---|---|---|
| GET | /user/analyze | Kullanıcı Analizi |
| GET | /tweets/analyze | Tweet Analizi |
| POST | /sentiment/analyze | Sentiment Analizi |
| GET | /trends/analyze | Trend Analizi |
Hız Sınırları
API kullanım sınırları ve kota bilgileri
Ücretsiz Plan
- 100 istek/saat
- 1,000 istek/gün
- 10,000 istek/ay
Temel Plan
- 1,000 istek/saat
- 10,000 istek/gün
- 100,000 istek/ay
Profesyonel Plan
- 5,000 istek/saat
- 50,000 istek/gün
- 500,000 istek/ay
Kurumsal Plan
- ∞ istek/saat
- ∞ istek/gün
- ∞ istek/ay
Hata Yönetimi
API hata kodları ve çözümleri
| Durum Kodu | Hata Mesajı | Çözüm |
|---|---|---|
| 401 | Unauthorized | API anahtarınızı kontrol edin / Check your API key |
| 429 | Rate Limit Exceeded | İstek hızınızı azaltın / Reduce request rate |
| 500 | Internal Server Error | Tekrar deneyin veya desteğe başvurun / Retry or contact support |
Kod Örnekleri
Farklı programlama dillerinde kullanım örnekleri
JavaScript
const response = await fetch('https://api.emotionsmedia.com/v2/user/analyze', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
username: 'elonmusk',
days: 30
})
});
const data = await response.json();
console.log(data);
Python
import requests
headers = {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
}
data = {
'username': 'elonmusk',
'days': 30
}
response = requests.post(
'https://api.emotionsmedia.com/v2/user/analyze',
headers=headers,
json=data
)
result = response.json()
print(result)
PHP
<?php
$url = 'https://api.emotionsmedia.com/v2/user/analyze';
$data = array(
'username' => 'elonmusk',
'days' => 30
);
$options = array(
'http' => array(
'header' => "X-API-Key: your_api_key_here\r\n" .
"Content-Type: application/json\r\n",
'method' => 'POST',
'content' => json_encode($data)
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
$response = json_decode($result, true);
?>
Node.js
const axios = require('axios');
const config = {
method: 'post',
url: 'https://api.emotionsmedia.com/v2/user/analyze',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
data: {
username: 'elonmusk',
days: 30
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
SDK'lar
Popüler programlama dilleri için hazır SDK'lar
JavaScript SDK
Modern tarayıcılar ve Node.js için
Kurulum
npm install @emotionsmedia/api-client
Kullanım
import { EmotionsMediaAPI } from
'@emotionsmedia/api-client';
const api = new EmotionsMediaAPI(
'your_api_key'
);
const result = await api.analyzeUser(
'elonmusk'
);
Python SDK
Python 3.6+ için resmi SDK
Kurulum
pip install emotionsmedia-api
Kullanım
from emotionsmedia import
EmotionsMediaAPI
api = EmotionsMediaAPI(
'your_api_key'
)
result = api.analyze_user(
'elonmusk'
)
PHP SDK
PHP 7.4+ için Composer paketi
Kurulum
composer require emotionsmedia/api-client
Kullanım
use EmotionsMediaAPI\Client;
$api = new Client(
'your_api_key'
);
$result = $api->analyzeUser(
'elonmusk'
);
Destek
Teknik destek ve yardım kaynakları
Bugün Twitter Analizinize Başlayın
Geliştiriciler için tasarlanmış güçlü API ile projenizi hızlandırın
Kredi kartı gerekmez • İstediğiniz zaman iptal edin