social-agent-cli 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1291 @@
1
+ # Mastodon Platform Bilgi Dosyasi
2
+
3
+ > Mastodon acik kaynakli, merkeziyetsiz (federated) bir sosyal ag platformudur. Her sunucu (instance) bagimsiz calisir ancak birbirleriyle iletisim kurabilir (federation). API tamamen ucretsizdir ve rate limit disinda herhangi bir kisitlama yoktur. Otomasyon icin API kullanimi birincil yontemdir.
4
+
5
+ ---
6
+
7
+ ## 1. Kimlik Dogrulama (Authentication)
8
+
9
+ ### 1.1. OAuth 2.0 Akisi
10
+
11
+ Mastodon standart OAuth 2.0 protokolunu kullanir. Tum API istekleri icin once uygulama kaydedilmeli, sonra kullanici yetkilendirmesi alinmalidir.
12
+
13
+ **Adim 1: Uygulama Kaydi**
14
+
15
+ ```
16
+ POST /api/v1/apps
17
+ ```
18
+
19
+ | Parametre | Tip | Zorunlu | Aciklama |
20
+ |-----------|-----|---------|----------|
21
+ | `client_name` | String | Evet | Uygulama adi |
22
+ | `redirect_uris` | String/Array | Evet | Yonlendirme URL'si veya `urn:ietf:wg:oauth:2.0:oob` (kodu dogrudan gosterir) |
23
+ | `scopes` | String | Hayir | Boslukla ayrilmis izin listesi (varsayilan: `read`) |
24
+ | `website` | String | Hayir | Uygulama web sitesi |
25
+
26
+ Yanit: `client_id`, `client_secret`, `id`, `name`, `scopes`, `redirect_uris` dondurur.
27
+
28
+ > ONEMLI: `client_id` ve `client_secret` degerlerini sifre gibi saklayin. Sifrelenerek cache'lenmelidir.
29
+
30
+ **Adim 2: Kullanici Yetkilendirmesi**
31
+
32
+ ```
33
+ GET /oauth/authorize
34
+ ```
35
+
36
+ | Parametre | Tip | Zorunlu | Aciklama |
37
+ |-----------|-----|---------|----------|
38
+ | `response_type` | String | Evet | `code` olmali |
39
+ | `client_id` | String | Evet | Uygulama kaydindan alinan client_id |
40
+ | `redirect_uri` | String | Evet | Kayit sirasinda belirtilen URI |
41
+ | `scope` | String | Evet | Istenen izinler |
42
+ | `state` | String | Hayir | CSRF korumasi icin rastgele deger |
43
+ | `code_challenge` | String | Hayir | PKCE destegi (yalnizca S256) |
44
+ | `code_challenge_method` | String | Hayir | `S256` olmali |
45
+ | `force_login` | Boolean | Hayir | Yeniden giris zorla |
46
+ | `lang` | String | Hayir | ISO 639-1 dil kodu |
47
+
48
+ Kullanici yetkilendirme sonrasi `redirect_uri`'ye `code` parametresiyle yonlendirilir.
49
+
50
+ **Adim 3: Token Degisimi**
51
+
52
+ ```
53
+ POST /oauth/token
54
+ ```
55
+
56
+ | Parametre | Tip | Zorunlu | Aciklama |
57
+ |-----------|-----|---------|----------|
58
+ | `grant_type` | String | Evet | `authorization_code` (kullanici) veya `client_credentials` (uygulama) |
59
+ | `code` | String | Evet* | Yetkilendirme kodu (*authorization_code icin) |
60
+ | `client_id` | String | Evet | Uygulama client_id |
61
+ | `client_secret` | String | Evet | Uygulama client_secret |
62
+ | `redirect_uri` | String | Evet | Kayit sirasinda belirtilen URI |
63
+ | `code_verifier` | String | Hayir | PKCE kullaniliyorsa zorunlu |
64
+
65
+ Yanit: `access_token`, `token_type`, `scope`, `created_at` dondurur.
66
+
67
+ **Token Kullanimi**
68
+
69
+ Tum API isteklerinde header olarak eklenir:
70
+ ```
71
+ Authorization: Bearer <access_token>
72
+ ```
73
+
74
+ **Token Iptali**
75
+
76
+ ```
77
+ POST /oauth/revoke
78
+ ```
79
+
80
+ Idempotent islemdir - birden fazla cagri ayni sonucu verir.
81
+
82
+ ### 1.2. OAuth Kapsam (Scope) Yapisi
83
+
84
+ **Ana Kapsamlar:**
85
+ - `read` - Tum okuma islemleri
86
+ - `write` - Tum yazma islemleri
87
+ - `follow` - Takip islemleri (eski uyumluluk)
88
+ - `push` - Web Push bildirimleri
89
+ - `profile` - Profil bilgilerine erisim (OpenID Connect)
90
+
91
+ **Detayli Read Kapsamlari:**
92
+ `read:accounts`, `read:blocks`, `read:bookmarks`, `read:favourites`, `read:filters`, `read:follows`, `read:lists`, `read:mutes`, `read:notifications`, `read:search`, `read:statuses`
93
+
94
+ **Detayli Write Kapsamlari:**
95
+ `write:accounts`, `write:blocks`, `write:bookmarks`, `write:conversations`, `write:favourites`, `write:filters`, `write:follows`, `write:lists`, `write:media`, `write:mutes`, `write:notifications`, `write:reports`, `write:statuses`
96
+
97
+ **Admin Kapsamlari:**
98
+ `admin:read`, `admin:write` ve bunlarin alt kapsamlari (accounts, reports, domain_allows, domain_blocks, ip_blocks)
99
+
100
+ ### 1.3. Uygulama Dogrulama
101
+
102
+ ```
103
+ GET /api/v1/apps/verify_credentials
104
+ ```
105
+ - Yetkilendirme: `Authorization: Bearer <app_token>`
106
+ - Uygulama bilgilerini dondurur
107
+ - 401: Gecersiz token
108
+
109
+ ### 1.4. Kullanici Bilgisi (OpenID Connect)
110
+
111
+ ```
112
+ GET /oauth/userinfo
113
+ ```
114
+ - Kapsam: `profile`
115
+ - Kullanici adi, profil URL'si, resmi dondurur
116
+
117
+ ### 1.5. OAuth Metadata
118
+
119
+ ```
120
+ GET /.well-known/oauth-authorization-server
121
+ ```
122
+ - RFC 8414 uyumlu
123
+ - Desteklenen kapsamlar, endpoint'ler, grant turleri
124
+
125
+ ---
126
+
127
+ ## 2. API Endpoint'leri
128
+
129
+ ### 2.1. Gonderi (Status) Islemleri
130
+
131
+ #### Gonderi Olusturma
132
+
133
+ ```
134
+ POST /api/v1/statuses
135
+ ```
136
+ - Yetkilendirme: Kullanici token + `write:statuses`
137
+
138
+ | Parametre | Tip | Zorunlu | Aciklama |
139
+ |-----------|-----|---------|----------|
140
+ | `status` | String | Evet* | Gonderi metni (*media_ids yoksa zorunlu) |
141
+ | `media_ids[]` | Array | Hayir | Medya ekleri (onceden yuklenenmis, max 4) |
142
+ | `poll[options][]` | Array | Hayir | Anket secenekleri |
143
+ | `poll[expires_in]` | Integer | Anketse evet | Anket suresi (saniye) |
144
+ | `poll[multiple]` | Boolean | Hayir | Coklu secim izni |
145
+ | `poll[hide_totals]` | Boolean | Hayir | Toplam oylari gizle |
146
+ | `in_reply_to_id` | String | Hayir | Yanitlanan gonderinin ID'si |
147
+ | `sensitive` | Boolean | Hayir | Hassas icerik olarak isaretle |
148
+ | `spoiler_text` | String | Hayir | Icerik uyarisi (Content Warning) metni |
149
+ | `visibility` | String | Hayir | `public`, `unlisted`, `private`, `direct` |
150
+ | `language` | String | Hayir | ISO 639-1 dil kodu |
151
+ | `scheduled_at` | Datetime | Hayir | Zamanlama (en az 5 dakika sonrasi) |
152
+ | `quoted_status_id` | String | Hayir | Alinti yapilan gonderi ID'si |
153
+
154
+ Yanit: Status entity (zamanlanmissa ScheduledStatus entity) dondurur.
155
+
156
+ > ONEMLI: `status` veya `media_ids[]` parametrelerinden en az biri zorunludur. Gonderi bos olamaz.
157
+
158
+ #### Gonderi Goruntuleme
159
+
160
+ ```
161
+ GET /api/v1/statuses/:id
162
+ ```
163
+ - Public gonderiler icin kimlik dogrulama gerekmez
164
+ - Ozel gonderiler icin: Kullanici token + `read:statuses`
165
+
166
+ #### Coklu Gonderi Goruntuleme
167
+
168
+ ```
169
+ GET /api/v1/statuses
170
+ ```
171
+ - Parametre: `id[]` - Gonderi ID'leri dizisi
172
+
173
+ #### Gonderi Silme
174
+
175
+ ```
176
+ DELETE /api/v1/statuses/:id
177
+ ```
178
+ - Yetkilendirme: Kullanici token + `write:statuses`
179
+ - Parametre: `delete_media` (Boolean) - Medyayi hemen sil
180
+ - Yanit: Kaynak metin ve medya bilgileriyle birlikte Status dondurur
181
+
182
+ #### Gonderi Duzenleme
183
+
184
+ ```
185
+ PUT /api/v1/statuses/:id
186
+ ```
187
+ - Yetkilendirme: Kullanici token + `write:statuses`
188
+ - Parametreler: `status`, `spoiler_text`, `sensitive`, `language`, `media_ids[]`, `media_attributes[][]`, `poll[*]`
189
+ - NOT: Anket duzenlenirse oylar sifirlanir
190
+
191
+ #### Gonderi Baglami (Context)
192
+
193
+ ```
194
+ GET /api/v1/statuses/:id/context
195
+ ```
196
+ - Public: 40 ust + 60 alt gonderi
197
+ - Kimlik dogrulanmis: 4096 ust + 4096 alt gonderi (sinir yok)
198
+ - Yanit: `ancestors` ve `descendants` dizileri
199
+
200
+ #### Gonderi Gecmisi
201
+
202
+ ```
203
+ GET /api/v1/statuses/:id/history
204
+ ```
205
+ - Tum duzenleme versiyonlarini dondurur (StatusEdit dizisi)
206
+
207
+ #### Gonderi Kaynagi
208
+
209
+ ```
210
+ GET /api/v1/statuses/:id/source
211
+ ```
212
+ - Kapsam: `read:statuses`
213
+ - Ham metin ve spoiler_text dondurur
214
+
215
+ #### Gonderi Ceviri
216
+
217
+ ```
218
+ POST /api/v1/statuses/:id/translate
219
+ ```
220
+ - Kapsam: `read:statuses`
221
+ - Parametre: `lang` (ISO 639-1 hedef dil)
222
+ - Yalnizca public/unlisted gonderiler cevrileblir
223
+
224
+ ### 2.2. Gonderi Etkilesim Endpoint'leri
225
+
226
+ #### Begeni (Favourite)
227
+
228
+ ```
229
+ POST /api/v1/statuses/:id/favourite # Begen
230
+ POST /api/v1/statuses/:id/unfavourite # Begeniyi kaldir
231
+ ```
232
+ - Kapsam: `write:favourites`
233
+ - Yanit: `favourited` alani guncellenmis Status
234
+
235
+ #### Boost (Reblog)
236
+
237
+ ```
238
+ POST /api/v1/statuses/:id/reblog # Boost et
239
+ POST /api/v1/statuses/:id/unreblog # Boost'u kaldir
240
+ ```
241
+ - Kapsam: `write:statuses`
242
+ - Boost parametresi: `visibility` (public/unlisted/private)
243
+ - Yanit: Orijinal gonderiyi `reblog` ozelliginde saran Status
244
+
245
+ #### Yer Imi (Bookmark)
246
+
247
+ ```
248
+ POST /api/v1/statuses/:id/bookmark # Yer imine ekle
249
+ POST /api/v1/statuses/:id/unbookmark # Yer iminden cikar
250
+ ```
251
+ - Kapsam: `write:bookmarks`
252
+
253
+ #### Susturma (Mute Conversation)
254
+
255
+ ```
256
+ POST /api/v1/statuses/:id/mute # Konusmayi sustur
257
+ POST /api/v1/statuses/:id/unmute # Susturmayi kaldir
258
+ ```
259
+ - Kapsam: `write:mutes`
260
+ - NOT: Kullanici konusma katilimcisi olmali
261
+
262
+ #### Sabitleme (Pin)
263
+
264
+ ```
265
+ POST /api/v1/statuses/:id/pin # Sabitle
266
+ POST /api/v1/statuses/:id/unpin # Sabitlemeyi kaldir
267
+ ```
268
+ - Kapsam: `write:accounts`
269
+ - Yalnizca kendi gonderilerinizi sabitleyebilirsiniz
270
+ - Sunucu basina sabitlenebilir gonderi limiti vardir (genellikle 5)
271
+
272
+ ### 2.3. Gonderi Kesif Endpoint'leri
273
+
274
+ #### Boost Edenleri Gor
275
+
276
+ ```
277
+ GET /api/v1/statuses/:id/reblogged_by
278
+ ```
279
+ - Parametre: `limit` (max 80, varsayilan 40)
280
+ - Yanit: Account dizisi
281
+
282
+ #### Begeni Yapanlari Gor
283
+
284
+ ```
285
+ GET /api/v1/statuses/:id/favourited_by
286
+ ```
287
+ - Parametre: `limit` (max 80, varsayilan 40)
288
+ - Yanit: Account dizisi
289
+
290
+ #### Alintilari Gor
291
+
292
+ ```
293
+ GET /api/v1/statuses/:id/quotes
294
+ ```
295
+ - Kapsam: `read:statuses`
296
+ - Parametre: `limit` (max 40, varsayilan 20)
297
+
298
+ ### 2.4. Medya Islemleri
299
+
300
+ #### Medya Yukleme (v2 - Asenkron)
301
+
302
+ ```
303
+ POST /api/v2/media
304
+ ```
305
+ - Kapsam: `write:media`
306
+
307
+ | Parametre | Tip | Zorunlu | Aciklama |
308
+ |-----------|-----|---------|----------|
309
+ | `file` | Multipart | Evet | Medya dosyasi (MIME tipiyle birlikte) |
310
+ | `thumbnail` | Multipart | Hayir | Ozel kucuk resim |
311
+ | `description` | String | Hayir | Erisebilirlik metni (alt text, max 1500 karakter) |
312
+ | `focus` | String | Hayir | Odak noktasi koordinatlari (x,y) -1.0 ile 1.0 arasi |
313
+
314
+ Yanit Kodlari:
315
+ - `200 OK`: Kucuk resimler aninda islenir, `url` dolu gelir
316
+ - `202 Accepted`: Buyuk medya islenmeye devam ediyor, `url` null olabilir, `preview_url` mevcut
317
+ - `422`: Gecersiz dosya tipi
318
+
319
+ #### Medya Durumu Kontrol
320
+
321
+ ```
322
+ GET /api/v1/media/:id
323
+ ```
324
+ - `200 OK`: Isleme tamamlandi
325
+ - `206 Partial Content`: Hala isleniyor
326
+ - `404`: Bulunamadi veya sizin deginiz
327
+
328
+ #### Medya Guncelleme
329
+
330
+ ```
331
+ PUT /api/v1/media/:id
332
+ ```
333
+ - Parametreler: `thumbnail`, `description`, `focus`
334
+ - Gonderi olusturmadan once metadata guncellenebilir
335
+
336
+ #### Medya Silme
337
+
338
+ ```
339
+ DELETE /api/v1/media/:id
340
+ ```
341
+ - Bos yanit dondurur
342
+
343
+ #### Desteklenen Medya Formatlari
344
+
345
+ **Resim:** JPEG, PNG, GIF, WebP, HEIC, HEIF, AVIF
346
+ **Video:** WebM, MP4, QuickTime, Ogg
347
+ **Ses:** WAV, FLAC, AAC, M4A, MP3, Ogg
348
+
349
+ #### Medya Boyut Limitleri (Varsayilan Instance Ayarlari)
350
+
351
+ | Tur | Limit |
352
+ |-----|-------|
353
+ | Resim dosya boyutu | 16 MB (16,777,216 byte) |
354
+ | Video dosya boyutu | ~99 MB (103,809,024 byte) |
355
+ | Resim piksel limiti | 33,177,600 piksel (orn. ~5760x5760) |
356
+ | Video piksel limiti | 8,294,400 piksel (orn. 3840x2160) |
357
+ | Video kare hizi limiti | 120 fps |
358
+ | Gonderi basina medya | 4 adet |
359
+ | Aciklama (alt text) | 1500 karakter |
360
+
361
+ ### 2.5. Hesap Islemleri
362
+
363
+ #### Hesap Bilgisi
364
+
365
+ ```
366
+ GET /api/v1/accounts/:id # Tek hesap
367
+ GET /api/v1/accounts # Coklu hesap (id[] parametresi)
368
+ GET /api/v1/accounts/verify_credentials # Kendi hesabini dogrula
369
+ GET /api/v1/accounts/lookup # Kullanici adi ile ara (acct parametresi)
370
+ ```
371
+
372
+ #### Hesap Arama
373
+
374
+ ```
375
+ GET /api/v1/accounts/search
376
+ ```
377
+
378
+ | Parametre | Tip | Zorunlu | Aciklama |
379
+ |-----------|-----|---------|----------|
380
+ | `q` | String | Evet | Arama sorgusu |
381
+ | `limit` | Integer | Hayir | Sonuc limiti |
382
+ | `offset` | Integer | Hayir | Atlama |
383
+ | `resolve` | Boolean | Hayir | Uzak hesaplari WebFinger ile cozumle |
384
+ | `following` | Boolean | Hayir | Yalnizca takip edilenler |
385
+
386
+ #### Profil Guncelleme
387
+
388
+ ```
389
+ PATCH /api/v1/accounts/update_credentials
390
+ ```
391
+ - Kapsam: `write:accounts`
392
+
393
+ | Parametre | Tip | Aciklama |
394
+ |-----------|-----|----------|
395
+ | `display_name` | String | Gorunen ad |
396
+ | `note` | String | Biyografi |
397
+ | `avatar` | Multipart | Profil resmi |
398
+ | `header` | Multipart | Kapak resmi |
399
+ | `locked` | Boolean | Hesabi kilitle (takip onay gerektir) |
400
+ | `bot` | Boolean | Bot hesabi olarak isaretle |
401
+ | `discoverable` | Boolean | Kesif'te gorunur |
402
+ | `hide_collections` | Boolean | Takipci/takip listesini gizle |
403
+ | `indexable` | Boolean | Arama motorlarina izin ver |
404
+ | `fields_attributes` | Array | Profil alanlari (anahtar-deger ciftleri) |
405
+
406
+ #### Takip Islemleri
407
+
408
+ ```
409
+ POST /api/v1/accounts/:id/follow # Takip et
410
+ POST /api/v1/accounts/:id/unfollow # Takibi birak
411
+ POST /api/v1/accounts/:id/remove_from_followers # Takipcilerden cikar
412
+ ```
413
+
414
+ Follow parametreleri:
415
+ | Parametre | Tip | Aciklama |
416
+ |-----------|-----|----------|
417
+ | `reblogs` | Boolean | Boost'lari goster |
418
+ | `notify` | Boolean | Yeni gonderi bildirimi al |
419
+ | `languages[]` | Array | Yalnizca belirli dillerdeki gonderileri goster |
420
+
421
+ Kapsam: `write:follows`
422
+
423
+ #### Takipci/Takip Listesi
424
+
425
+ ```
426
+ GET /api/v1/accounts/:id/followers # Takipciler
427
+ GET /api/v1/accounts/:id/following # Takip edilenler
428
+ ```
429
+ - Parametre: `limit` (max 80)
430
+
431
+ #### Engelleme
432
+
433
+ ```
434
+ POST /api/v1/accounts/:id/block # Engelle
435
+ POST /api/v1/accounts/:id/unblock # Engeli kaldir
436
+ ```
437
+ - Kapsam: `write:blocks`
438
+
439
+ #### Susturma
440
+
441
+ ```
442
+ POST /api/v1/accounts/:id/mute # Sustur
443
+ POST /api/v1/accounts/:id/unmute # Susturmayi kaldir
444
+ ```
445
+ - Kapsam: `write:mutes`
446
+ - Mute parametreleri: `notifications` (Boolean), `duration` (Integer, saniye)
447
+
448
+ #### One Cikarma (Endorse)
449
+
450
+ ```
451
+ POST /api/v1/accounts/:id/endorse # One cikar
452
+ POST /api/v1/accounts/:id/unendorse # One cikarmadan kaldir
453
+ ```
454
+ - Kapsam: `write:accounts`
455
+ - Oncelikle takip ediyor olmalisiniz
456
+
457
+ #### Iliski Sorgulama
458
+
459
+ ```
460
+ GET /api/v1/accounts/relationships
461
+ ```
462
+ - Parametre: `id[]` (hesap ID dizisi), `with_suspended` (Boolean)
463
+ - Kapsam: `read:follows`
464
+ - Yanit: Relationship dizisi (following, followed_by, blocking, muting, vb.)
465
+
466
+ #### Tanidik Takipciler
467
+
468
+ ```
469
+ GET /api/v1/accounts/familiar_followers
470
+ ```
471
+ - Parametre: `id[]`
472
+ - Kapsam: `read:follows`
473
+
474
+ #### Hesap Gonderileri
475
+
476
+ ```
477
+ GET /api/v1/accounts/:id/statuses
478
+ ```
479
+
480
+ | Parametre | Tip | Aciklama |
481
+ |-----------|-----|----------|
482
+ | `max_id` | String | Ust sinir |
483
+ | `since_id` | String | Alt sinir |
484
+ | `min_id` | String | Ileri sayfalama |
485
+ | `limit` | Integer | Max 40 |
486
+ | `only_media` | Boolean | Yalnizca medyali gonderiler |
487
+ | `exclude_replies` | Boolean | Yanitlari haric tut |
488
+ | `exclude_reblogs` | Boolean | Boost'lari haric tut |
489
+ | `pinned` | Boolean | Yalnizca sabitlenmis gonderiler |
490
+ | `tagged` | String | Belirli etiketle filtrele |
491
+
492
+ #### Ozel Not
493
+
494
+ ```
495
+ POST /api/v1/accounts/:id/note
496
+ ```
497
+ - Parametre: `comment` (bos string ile temizlenir)
498
+ - Kapsam: `write:accounts`
499
+
500
+ ### 2.6. Zaman Cizelgesi (Timeline) Endpoint'leri
501
+
502
+ #### Ana Sayfa Zaman Cizelgesi
503
+
504
+ ```
505
+ GET /api/v1/timelines/home
506
+ ```
507
+ - Kapsam: `read:statuses`
508
+ - Takip edilen hesap ve etiketlerin gonderilerini gosterir
509
+
510
+ #### Genel (Public) Zaman Cizelgesi
511
+
512
+ ```
513
+ GET /api/v1/timelines/public
514
+ ```
515
+ - Kimlik dogrulama: Public (instance ayarina bagli olarak `read:statuses` gerekebilir)
516
+
517
+ | Parametre | Tip | Aciklama |
518
+ |-----------|-----|----------|
519
+ | `local` | Boolean | Yalnizca yerel gonderiler |
520
+ | `remote` | Boolean | Yalnizca uzak gonderiler |
521
+ | `only_media` | Boolean | Yalnizca medyali gonderiler |
522
+
523
+ #### Etiket (Hashtag) Zaman Cizelgesi
524
+
525
+ ```
526
+ GET /api/v1/timelines/tag/:hashtag
527
+ ```
528
+
529
+ | Parametre | Tip | Aciklama |
530
+ |-----------|-----|----------|
531
+ | `:hashtag` | String | Etiket adi (# isareti olmadan) |
532
+ | `any[]` | Array | Ek etiketlerden herhangi biri (max 4) |
533
+ | `all[]` | Array | Tum ek etiketler bulunmali |
534
+ | `none[]` | Array | Bu etiketler haric |
535
+ | `local` | Boolean | Yalnizca yerel |
536
+ | `remote` | Boolean | Yalnizca uzak |
537
+ | `only_media` | Boolean | Yalnizca medyali |
538
+
539
+ #### Liste Zaman Cizelgesi
540
+
541
+ ```
542
+ GET /api/v1/timelines/list/:list_id
543
+ ```
544
+ - Kapsam: `read:lists`
545
+
546
+ #### Baglanti Zaman Cizelgesi
547
+
548
+ ```
549
+ GET /api/v1/timelines/link?url=:url
550
+ ```
551
+ - Trend olan bir makaleye baglanti veren gonderileri gosterir
552
+
553
+ #### Tum Timeline'lar Icin Ortak Sayfalama Parametreleri
554
+
555
+ | Parametre | Tip | Aciklama |
556
+ |-----------|-----|----------|
557
+ | `max_id` | String | Bu ID'den onceki sonuclar |
558
+ | `since_id` | String | Bu ID'den sonraki sonuclar |
559
+ | `min_id` | String | Ileri yonde sayfalama imeci |
560
+ | `limit` | Integer | Varsayilan 20, max 40 |
561
+
562
+ ### 2.7. Arama
563
+
564
+ ```
565
+ GET /api/v2/search
566
+ ```
567
+ - Kapsam: `read:search` (veya public sinirli erisim)
568
+
569
+ | Parametre | Tip | Zorunlu | Aciklama |
570
+ |-----------|-----|---------|----------|
571
+ | `q` | String | Evet | Arama sorgusu |
572
+ | `type` | String | Hayir | `accounts`, `hashtags`, `statuses` |
573
+ | `resolve` | Boolean | Hayir | WebFinger ile uzak hesaplari cozumle |
574
+ | `following` | Boolean | Hayir | Yalnizca takip edilenler |
575
+ | `account_id` | String | Hayir | Belirli hesabin gonderileri |
576
+ | `exclude_unreviewed` | Boolean | Hayir | Incelenmemis etiketleri filtrele |
577
+ | `min_id` | String | Hayir | Sayfalama |
578
+ | `max_id` | String | Hayir | Sayfalama |
579
+ | `limit` | Integer | Hayir | Varsayilan 20, max 40 |
580
+ | `offset` | Integer | Hayir | Atlama (`type` parametresi gerektirir) |
581
+
582
+ Yanit: `accounts`, `statuses`, `hashtags` dizileri iceren Search entity
583
+
584
+ ### 2.8. Bildirimler
585
+
586
+ #### Tum Bildirimleri Listele
587
+
588
+ ```
589
+ GET /api/v1/notifications
590
+ ```
591
+ - Kapsam: `read:notifications`
592
+
593
+ | Parametre | Tip | Aciklama |
594
+ |-----------|-----|----------|
595
+ | `max_id`, `since_id`, `min_id` | String | Sayfalama |
596
+ | `limit` | Integer | Varsayilan 40, max 80 |
597
+ | `types[]` | Array | Dahil edilecek bildirim turleri |
598
+ | `exclude_types[]` | Array | Haric tutulacak bildirim turleri |
599
+ | `account_id` | String | Belirli hesaptan bildirimler |
600
+ | `include_filtered` | Boolean | Filtrelenmis bildirimleri dahil et |
601
+
602
+ #### Bildirim Turleri
603
+
604
+ | Tur | Aciklama |
605
+ |-----|----------|
606
+ | `mention` | Bahsetme |
607
+ | `status` | Takip edilen hesabin yeni gonderisi |
608
+ | `reblog` | Boost |
609
+ | `follow` | Yeni takipci |
610
+ | `follow_request` | Takip istegi |
611
+ | `favourite` | Begeni |
612
+ | `poll` | Katildiginiz anket sona erdi |
613
+ | `update` | Duzenlenmis gonderi |
614
+ | `admin.sign_up` | Yeni kullanici kaydi (admin) |
615
+ | `admin.report` | Yeni rapor (admin) |
616
+
617
+ #### Tek Bildirim
618
+
619
+ ```
620
+ GET /api/v1/notifications/:id
621
+ ```
622
+
623
+ #### Bildirimi Kapat
624
+
625
+ ```
626
+ POST /api/v1/notifications/:id/dismiss
627
+ ```
628
+ - Kapsam: `write:notifications`
629
+
630
+ #### Tum Bildirimleri Temizle
631
+
632
+ ```
633
+ POST /api/v1/notifications/clear
634
+ ```
635
+ - Kapsam: `write:notifications`
636
+
637
+ ### 2.9. Zamanlanmis Gonderiler
638
+
639
+ #### Zamanlanmis Gonderileri Listele
640
+
641
+ ```
642
+ GET /api/v1/scheduled_statuses
643
+ ```
644
+ - Kapsam: `read:statuses`
645
+ - Sayfalama: `max_id`, `since_id`, `min_id`, `limit` (max 40, varsayilan 20)
646
+
647
+ #### Tek Zamanlanmis Gonderi
648
+
649
+ ```
650
+ GET /api/v1/scheduled_statuses/:id
651
+ ```
652
+
653
+ #### Zamanlama Guncelle
654
+
655
+ ```
656
+ PUT /api/v1/scheduled_statuses/:id
657
+ ```
658
+ - Parametre: `scheduled_at` (en az 5 dakika sonrasi olmali)
659
+ - Kapsam: `write:statuses`
660
+
661
+ #### Zamanlanmis Gonderi Iptal
662
+
663
+ ```
664
+ DELETE /api/v1/scheduled_statuses/:id
665
+ ```
666
+ - Kapsam: `write:statuses`
667
+
668
+ ### 2.10. Listeler
669
+
670
+ #### Liste CRUD
671
+
672
+ ```
673
+ GET /api/v1/lists # Tum listeleri gor
674
+ GET /api/v1/lists/:id # Tek liste
675
+ POST /api/v1/lists # Liste olustur
676
+ PUT /api/v1/lists/:id # Liste guncelle
677
+ DELETE /api/v1/lists/:id # Liste sil
678
+ ```
679
+
680
+ Olusturma/Guncelleme parametreleri:
681
+ | Parametre | Tip | Zorunlu | Aciklama |
682
+ |-----------|-----|---------|----------|
683
+ | `title` | String | Evet | Liste adi |
684
+ | `replies_policy` | String | Hayir | `followed`, `list`, `none` |
685
+ | `exclusive` | Boolean | Hayir | Ozel liste (ana timeline'dan cikar) |
686
+
687
+ #### Liste Hesap Yonetimi
688
+
689
+ ```
690
+ GET /api/v1/lists/:id/accounts # Listedeki hesaplar
691
+ POST /api/v1/lists/:id/accounts # Hesap ekle
692
+ DELETE /api/v1/lists/:id/accounts # Hesap cikar
693
+ ```
694
+ - Parametre: `account_ids[]` (hesap ID dizisi)
695
+ - NOT: Listeye eklemek icin hesabi takip ediyor olmalisiniz
696
+ - Liste goruntuleme limiti: max 80, varsayilan 40
697
+
698
+ ### 2.11. Begeniler ve Yer Imleri Listeleme
699
+
700
+ #### Begenilen Gonderiler
701
+
702
+ ```
703
+ GET /api/v1/favourites
704
+ ```
705
+ - Kapsam: `read:favourites`
706
+ - Sayfalama: HTTP `Link` header ile (Bookmark ID'leri API'de gosterilmez)
707
+ - Parametre: `limit` (varsayilan 20, max 40)
708
+
709
+ #### Yer Imine Alinan Gonderiler
710
+
711
+ ```
712
+ GET /api/v1/bookmarks
713
+ ```
714
+ - Kapsam: `read:bookmarks`
715
+ - Sayfalama: HTTP `Link` header ile
716
+ - Parametre: `limit` (varsayilan 20, max 40)
717
+
718
+ ### 2.12. Konusmalar (Conversations)
719
+
720
+ ```
721
+ GET /api/v1/conversations # Tum konusmalari listele
722
+ DELETE /api/v1/conversations/:id # Konusmayi sil
723
+ POST /api/v1/conversations/:id/read # Okundu olarak isaretle
724
+ ```
725
+ - Listele kapsamlari: `read:statuses`
726
+ - Yazma kapsamlari: `write:conversations`
727
+ - Parametre: `limit` (varsayilan 20, max 40)
728
+
729
+ ### 2.13. Takip Istekleri
730
+
731
+ ```
732
+ GET /api/v1/follow_requests # Bekleyen istekler
733
+ POST /api/v1/follow_requests/:account_id/authorize # Onayla
734
+ POST /api/v1/follow_requests/:account_id/reject # Reddet
735
+ ```
736
+ - Okuma kapsami: `read:follows` veya `follow`
737
+ - Yazma kapsami: `write:follows` veya `follow`
738
+ - Parametre: `limit` (varsayilan 40, max 80)
739
+
740
+ ### 2.14. Trendler
741
+
742
+ ```
743
+ GET /api/v1/trends/tags # Trend etiketler
744
+ GET /api/v1/trends/statuses # Trend gonderiler
745
+ GET /api/v1/trends/links # Trend baglantilar
746
+ ```
747
+ - Kimlik dogrulama gerekmez (Public)
748
+ - Parametreler: `limit`, `offset`
749
+ - Tags/Links: varsayilan 10, max 20
750
+ - Statuses: varsayilan 20, max 40
751
+ - NOT: Sonuclar ic puanlama algoritmasina gore siralanir, kronolojik degildir
752
+
753
+ ### 2.15. Oneriler (Suggestions)
754
+
755
+ ```
756
+ GET /api/v2/suggestions # Takip onerileri
757
+ DELETE /api/v1/suggestions/:account_id # Oneriyi kaldir
758
+ ```
759
+ - Kapsam: `read`
760
+ - Parametre: `limit` (varsayilan 40, max 80)
761
+
762
+ ### 2.16. Filtreler (v2)
763
+
764
+ ```
765
+ GET /api/v2/filters # Tum filtreler
766
+ GET /api/v2/filters/:id # Tek filtre
767
+ POST /api/v2/filters # Filtre olustur
768
+ PUT /api/v2/filters/:id # Filtre guncelle
769
+ DELETE /api/v2/filters/:id # Filtre sil
770
+ ```
771
+
772
+ Olusturma parametreleri:
773
+ | Parametre | Tip | Zorunlu | Aciklama |
774
+ |-----------|-----|---------|----------|
775
+ | `title` | String | Evet | Filtre adi |
776
+ | `context[]` | Array | Evet | `home`, `notifications`, `public`, `thread`, `account` |
777
+ | `filter_action` | String | Hayir | `warn`, `hide`, `blur` |
778
+ | `expires_in` | Integer | Hayir | Sure (saniye) |
779
+ | `keywords_attributes[]` | Array | Hayir | Anahtar kelimeler |
780
+
781
+ ### 2.17. Anketler (Polls)
782
+
783
+ ```
784
+ GET /api/v1/polls/:id # Anketi gor
785
+ POST /api/v1/polls/:id/votes # Oy ver
786
+ ```
787
+
788
+ Oy verme parametresi: `choices[]` (0 tabanli indeks dizisi)
789
+
790
+ Anket Konfigurasyonu (varsayilan):
791
+ | Ayar | Deger |
792
+ |------|-------|
793
+ | Max secenek | 4 |
794
+ | Secenek basina karakter | 50 |
795
+ | Min sure | 300 saniye (5 dakika) |
796
+ | Max sure | 2,629,746 saniye (~30 gun) |
797
+
798
+ ### 2.18. Instance Bilgileri
799
+
800
+ ```
801
+ GET /api/v2/instance # Sunucu bilgileri (guncel)
802
+ GET /api/v1/instance # Sunucu bilgileri (eski, kullanmayin)
803
+ ```
804
+
805
+ Instance endpoint'i sunucu konfigurasyonunu dondurur:
806
+ - Karakter limitleri
807
+ - Medya limitleri
808
+ - Anket limitleri
809
+ - Desteklenen dosya turleri
810
+ - Kayit ayarlari
811
+ - Ceviri destegi
812
+ - VAPID public key (push bildirimleri icin)
813
+
814
+ ### 2.19. Streaming API (Canli Akis)
815
+
816
+ #### HTTP Server-Sent Events (SSE)
817
+
818
+ ```
819
+ GET /api/v1/streaming/health # Saglik kontrolu
820
+ GET /api/v1/streaming/user # Ana sayfa + bildirimler
821
+ GET /api/v1/streaming/user/notification # Yalnizca bildirimler
822
+ GET /api/v1/streaming/public # Federe zaman cizelgesi
823
+ GET /api/v1/streaming/public/local # Yerel zaman cizelgesi
824
+ GET /api/v1/streaming/public/remote # Yalnizca uzak sunucular
825
+ GET /api/v1/streaming/hashtag # Etiket akisi (tag parametresi gerekli)
826
+ GET /api/v1/streaming/hashtag/local # Yerel etiket akisi
827
+ GET /api/v1/streaming/list # Liste akisi (list parametresi gerekli)
828
+ GET /api/v1/streaming/direct # Direkt mesajlar
829
+ ```
830
+
831
+ #### WebSocket Baglantisi
832
+
833
+ ```
834
+ wss://mastodon.example/api/v1/streaming
835
+ ```
836
+ - JSON formatinda subscribe/unsubscribe mesajlari destekler
837
+ - Coklu akis tek baglantida multiplexing yapilabilir
838
+
839
+ #### Akis Turleri
840
+
841
+ `user`, `public`, `public:local`, `public:remote`, `hashtag`, `list`, `direct`
842
+
843
+ Medya varyantlari: `public:media`, `public:local:media`, `public:remote:media`
844
+
845
+ Ozel: `user:notification`
846
+
847
+ #### Olay Turleri
848
+
849
+ | Olay | Aciklama |
850
+ |------|----------|
851
+ | `update` | Yeni gonderi |
852
+ | `delete` | Gonderi silindi |
853
+ | `notification` | Yeni bildirim |
854
+ | `status.update` | Gonderi duzenlendi |
855
+ | `conversation` | Konusma guncellendi |
856
+ | `filters_changed` | Filtreler degisti |
857
+ | `announcement` | Yeni duyuru |
858
+ | `announcement.reaction` | Duyuruya reaksiyon |
859
+ | `announcement.delete` | Duyuru silindi |
860
+
861
+ ### 2.20. Web Push Bildirimleri
862
+
863
+ ```
864
+ POST /api/v1/push/subscription # Abone ol
865
+ GET /api/v1/push/subscription # Mevcut aboneligi gor
866
+ PUT /api/v1/push/subscription # Abonelik ayarlarini guncelle
867
+ DELETE /api/v1/push/subscription # Aboneligi sil
868
+ ```
869
+ - Kapsam: `push`
870
+ - Web Push API standardini kullanir
871
+ - Parametreler: endpoint URL, sifreleme anahtarlari (p256dh, auth), uyari tercihleri
872
+
873
+ ---
874
+
875
+ ## 3. Gorunurluk Seviyeleri (Visibility)
876
+
877
+ | Seviye | Aciklama | Davranis |
878
+ |--------|----------|----------|
879
+ | `public` | Herkese acik | Tum zaman cizelgelerinde gorunur, federe edilir |
880
+ | `unlisted` | Listelenmemis | Profilde gorunur ama genel zaman cizelgesinde gorulmez |
881
+ | `private` | Yalnizca takipciler | Sadece takipciler gorebilir, boost edilemez |
882
+ | `direct` | Direkt mesaj | Yalnizca bahsedilen kullanicilar gorebilir |
883
+
884
+ > NOT: `direct` gorunurluk aslinda bir DM sistemi degildir, bahsedilen kullanicilara gorunur bir gonderidir. Mastodon 4.x ile "Mentions" olarak yeniden adlandirilmistir.
885
+
886
+ ---
887
+
888
+ ## 4. URL Yapisi
889
+
890
+ ### 4.1. Instance URL Kaliplari
891
+
892
+ Mastodon merkeziyetsiz oldugu icin her instance'in kendi domain'i vardir. Tum URL'ler instance domain'ine goredir.
893
+
894
+ ```
895
+ https://{instance_domain} # Ana sayfa
896
+ https://{instance_domain}/home # Ana zaman cizelgesi (giris yapilmis)
897
+ https://{instance_domain}/public # Genel zaman cizelgesi (federe)
898
+ https://{instance_domain}/public/local # Yerel zaman cizelgesi
899
+ https://{instance_domain}/public/remote # Uzak zaman cizelgesi
900
+ ```
901
+
902
+ ### 4.2. Profil URL'leri
903
+
904
+ ```
905
+ https://{instance_domain}/@{kullanici_adi} # Profil sayfasi
906
+ https://{instance_domain}/@{kullanici_adi}/followers # Takipciler
907
+ https://{instance_domain}/@{kullanici_adi}/following # Takip edilenler
908
+ https://{instance_domain}/@{kullanici_adi}/with_replies # Yanitlarla birlikte
909
+ https://{instance_domain}/@{kullanici_adi}/media # Medya gonderileri
910
+ https://{instance_domain}/@{kullanici_adi}/tagged/{etiket} # Etiketli gonderiler
911
+ ```
912
+
913
+ Uzak kullanicilar icin WebFinger adresi: `@kullanici@uzak_instance.com`
914
+
915
+ ### 4.3. Gonderi URL'leri
916
+
917
+ ```
918
+ https://{instance_domain}/@{kullanici_adi}/{gonderi_id} # Tek gonderi
919
+ ```
920
+
921
+ ### 4.4. Arama ve Kesif
922
+
923
+ ```
924
+ https://{instance_domain}/search # Arama sayfasi
925
+ https://{instance_domain}/explore # Kesfet (trendler)
926
+ https://{instance_domain}/explore/tags # Trend etiketler
927
+ https://{instance_domain}/explore/links # Trend baglantilar
928
+ https://{instance_domain}/explore/posts # Trend gonderiler
929
+ https://{instance_domain}/tags/{etiket} # Etiket sayfasi
930
+ ```
931
+
932
+ ### 4.5. Ayarlar ve Yonetim
933
+
934
+ ```
935
+ https://{instance_domain}/settings/preferences # Tercihler
936
+ https://{instance_domain}/settings/profile # Profil duzenleme
937
+ https://{instance_domain}/settings/appearance # Gorunum ayarlari
938
+ https://{instance_domain}/settings/notifications # Bildirim ayarlari
939
+ https://{instance_domain}/settings/import # Veri iceri aktarma
940
+ https://{instance_domain}/settings/export # Veri disi aktarma
941
+ https://{instance_domain}/settings/applications # OAuth uygulamalari
942
+ https://{instance_domain}/settings/aliases # Hesap takma adlari
943
+ https://{instance_domain}/settings/migration # Hesap tasima
944
+ ```
945
+
946
+ ### 4.6. Listeler, Filtreler, Yer Imleri
947
+
948
+ ```
949
+ https://{instance_domain}/lists # Listeler
950
+ https://{instance_domain}/lists/{liste_id} # Tek liste
951
+ https://{instance_domain}/bookmarks # Yer imleri
952
+ https://{instance_domain}/favourites # Begeniler
953
+ https://{instance_domain}/filters # Filtreler
954
+ https://{instance_domain}/mutes # Sessize alinanlar
955
+ https://{instance_domain}/blocks # Engellenenler
956
+ https://{instance_domain}/domain_blocks # Engellenen alan adlari
957
+ https://{instance_domain}/follow_requests # Takip istekleri
958
+ ```
959
+
960
+ ### 4.7. Diger URL'ler
961
+
962
+ ```
963
+ https://{instance_domain}/notifications # Bildirimler
964
+ https://{instance_domain}/conversations # Direkt mesajlar
965
+ https://{instance_domain}/about # Hakkinda sayfasi
966
+ https://{instance_domain}/about/more # Sunucu kurallari
967
+ https://{instance_domain}/directory # Kullanici dizini
968
+ https://{instance_domain}/invite # Davet linkleri
969
+ ```
970
+
971
+ ---
972
+
973
+ ## 5. Gorsel Boyutlari
974
+
975
+ ### 5.1. Gonderi Gorselleri
976
+
977
+ | Tur | Onerilen Boyut | Aciklama |
978
+ |-----|----------------|----------|
979
+ | Gonderi gorseli (genel) | 1200 x 630 px | Open Graph uyumlu, en iyi on izleme |
980
+ | Gonderi gorseli (kare) | 1080 x 1080 px | Instagram tarzinda |
981
+ | Gonderi gorseli (dikey) | 1080 x 1350 px | Portre format |
982
+
983
+ ### 5.2. Profil Gorselleri
984
+
985
+ | Tur | Onerilen Boyut | Aciklama |
986
+ |-----|----------------|----------|
987
+ | Profil resmi (avatar) | 400 x 400 px | Kare, daire olarak kirpilir |
988
+ | Kapak resmi (header) | 1500 x 500 px | 3:1 oran |
989
+
990
+ ### 5.3. Dosya Boyut Limitleri (Varsayilan Instance Degerleri)
991
+
992
+ | Tur | Max Boyut |
993
+ |-----|-----------|
994
+ | Resim | 16 MB |
995
+ | Video | ~99 MB |
996
+ | Animasyonlu GIF | 16 MB (resim olarak islenir) |
997
+
998
+ > NOT: Bu degerler instance'a gore degisebilir. `GET /api/v2/instance` endpoint'inden guncel limitleri kontrol edin.
999
+
1000
+ ---
1001
+
1002
+ ## 6. Rate Limiting (Hiz Sinirlamasi)
1003
+
1004
+ ### 6.1. Varsayilan Limitler
1005
+
1006
+ | Kategori | Limit | Periyot |
1007
+ |----------|-------|---------|
1008
+ | Genel API (hesap basina) | 300 istek | 5 dakika |
1009
+ | Genel API (IP basina) | 300 istek | 5 dakika |
1010
+ | Medya yukleme (`POST /api/v1/media`) | 30 istek | 30 dakika |
1011
+ | Gonderi silme (`DELETE /api/v1/statuses/:id`) | 30 istek | 30 dakika |
1012
+ | Boost kaldirma (`POST /api/v1/statuses/:id/unreblog`) | 30 istek | 30 dakika |
1013
+ | Hesap olusturma (`POST /api/v1/accounts`) | 5 istek | 30 dakika (IP basina) |
1014
+
1015
+ ### 6.2. Yanit Basliklari (Response Headers)
1016
+
1017
+ Her API yanitinda su basliklar bulunur:
1018
+
1019
+ | Header | Aciklama |
1020
+ |--------|----------|
1021
+ | `X-RateLimit-Limit` | Periyot basina izin verilen toplam istek sayisi |
1022
+ | `X-RateLimit-Remaining` | Kalan istek sayisi |
1023
+ | `X-RateLimit-Reset` | Rate limit sifirlama zamani (ISO 8601 timestamp) |
1024
+
1025
+ > NOT: Birden fazla limit uygulandiginda, basliklar en yakin oldugunuz limiti yansitir.
1026
+
1027
+ ### 6.3. Rate Limit Asildiginda
1028
+
1029
+ - HTTP durum kodu: `429 Too Many Requests`
1030
+ - `X-RateLimit-Reset` basligindaki zamani bekleyin
1031
+ - Uygulama tarafinda exponential backoff stratejisi kullanin
1032
+
1033
+ ### 6.4. Gonderi Limitleri
1034
+
1035
+ Instance'a gore degisir ancak tipik sinirlar:
1036
+ - Varsayilan karakter limiti: 500
1037
+ - URL basina ayrilmis karakter: 23 (URL'ler otomatik kisaltilir)
1038
+ - Gonderi basina medya: 4 adet
1039
+ - Sabitlenebilir gonderi: 5 adet
1040
+ - One cikarilan etiket: 10 adet
1041
+
1042
+ ---
1043
+
1044
+ ## 7. Icerik Turleri ve Ozellikler
1045
+
1046
+ ### 7.1. Metin Icerigi
1047
+
1048
+ - **Gonderirken:** Duz metin (plain text) gonderilir
1049
+ - **API yanitlarinda:** HTML formatinda doner (`<p>`, `<a>`, `<br>` vb.)
1050
+ - **Kaynakta:** `GET /api/v1/statuses/:id/source` ile ham metin alinabilir
1051
+ - Bahsetmeler (`@kullanici@instance`) otomatik olarak baglantiya donusturulur
1052
+ - Etiketler (`#etiket`) otomatik olarak baglantiya donusturulur
1053
+ - URL'ler otomatik olarak baglantiya donusturulur
1054
+
1055
+ ### 7.2. Icerik Uyarisi (Content Warning / Spoiler Text)
1056
+
1057
+ - `spoiler_text` parametresi ile ayarlanir
1058
+ - Ayarlandiginda gonderi icerigi varsayilan olarak gizlenir
1059
+ - Kullanici "Devamini Goster" / "Show More" butonuyla acabilir
1060
+ - `sensitive` parametresi medya icin ayri bir uyari ekler
1061
+
1062
+ ### 7.3. Anketler (Polls)
1063
+
1064
+ Gonderi olusturma sirasinda anket parametreleri:
1065
+
1066
+ | Parametre | Tip | Aciklama |
1067
+ |-----------|-----|----------|
1068
+ | `poll[options][]` | Array | Secenek metinleri (min 2) |
1069
+ | `poll[expires_in]` | Integer | Sure (saniye, min 300) |
1070
+ | `poll[multiple]` | Boolean | Coklu secim |
1071
+ | `poll[hide_totals]` | Boolean | Bitmeden toplami gizle |
1072
+
1073
+ ### 7.4. Medya Ekleri
1074
+
1075
+ - Gonderi basina en fazla 4 medya eki
1076
+ - Medya ve anket ayni gonderide kullanilamaz
1077
+ - Oncelikle medya yuklenir (`POST /api/v2/media`), sonra `media_ids[]` ile gonderiye eklenir
1078
+ - Her medya icin `description` (alt text) eklenebilir (erisebilirlik icin onemli)
1079
+ - `focus` parametresi kirpma odak noktasini belirler
1080
+
1081
+ ### 7.5. Emoji
1082
+
1083
+ - Unicode emoji standart olarak desteklenir
1084
+ - Instance'a ozel ozel emoji (custom emoji) `:emoji_adi:` sozdizimi ile kullanilir
1085
+ - Ozel emojiler instance'a gore degisir
1086
+ - `GET /api/v1/custom_emojis` endpoint'i ile mevcut emojiler listelenebilir
1087
+
1088
+ ---
1089
+
1090
+ ## 8. Instance Farkliliklari
1091
+
1092
+ ### 8.1. Karakter Limitleri
1093
+
1094
+ | Instance Tipi | Karakter Limiti |
1095
+ |---------------|-----------------|
1096
+ | Varsayilan Mastodon | 500 |
1097
+ | Glitch-soc (fork) | Genellikle 5000+ |
1098
+ | Hometown (fork) | Yapilandirmaya bagli |
1099
+ | Bazi buyuk instance'lar | 1000-65535 arasi |
1100
+
1101
+ > ONEMLI: Karakter limitini `GET /api/v2/instance` endpoint'inden `configuration.statuses.max_characters` alaniyla kontrol edin. Hardcoded 500 varsaymak hatadir.
1102
+
1103
+ ### 8.2. Instance Tespiti ve Konfigurasyonu
1104
+
1105
+ Otomasyon araci icin instance'a baglanirken ilk adim:
1106
+
1107
+ ```
1108
+ GET /api/v2/instance
1109
+ ```
1110
+
1111
+ Bu endpoint'ten alinacak kritik bilgiler:
1112
+ - `configuration.statuses.max_characters` - Karakter limiti
1113
+ - `configuration.statuses.characters_reserved_per_url` - URL basina ayrilan karakter
1114
+ - `configuration.media_attachments.supported_mime_types` - Desteklenen medya turleri
1115
+ - `configuration.media_attachments.image_size_limit` - Resim boyut limiti
1116
+ - `configuration.media_attachments.video_size_limit` - Video boyut limiti
1117
+ - `configuration.media_attachments.image_matrix_limit` - Resim piksel limiti
1118
+ - `configuration.media_attachments.video_matrix_limit` - Video piksel limiti
1119
+ - `configuration.polls.max_options` - Anket secenegi limiti
1120
+ - `configuration.polls.max_characters_per_option` - Secenek karakter limiti
1121
+ - `configuration.polls.min_expiration` - Min anket suresi
1122
+ - `configuration.polls.max_expiration` - Max anket suresi
1123
+ - `configuration.accounts.max_pinned_statuses` - Sabitlenebilir gonderi limiti
1124
+
1125
+ ### 8.3. Mastodon Uyumlu Diger Yazilimlar
1126
+
1127
+ Mastodon API'si su platformlar tarafindan da (kismi olarak) desteklenir:
1128
+ - **Pleroma / Akkoma** - Daha hafif, ek ozellikler
1129
+ - **Misskey / Calckey / Firefish** - Kismi Mastodon API uyumlulugu
1130
+ - **GoToSocial** - Go ile yazilmis, kismi uyumluluk
1131
+ - **Pixelfed** - Gorsel odakli, kismi uyumluluk
1132
+
1133
+ Bu platformlarda Mastodon API'si calissa bile bazi farkliliklar olabilir. Instance yazilimini `GET /api/v2/instance` yanitindaki bilgilerden tespit edebilirsiniz.
1134
+
1135
+ ### 8.4. Ozel Ozellikler
1136
+
1137
+ - **Ozel emoji:** Her instance kendi emoji setini tanimlar
1138
+ - **Sunucu kurallari:** Her instance'in kendi icerik politikalari vardir
1139
+ - **Moderasyon:** Instance yoneticileri alan adlarini engelleyebilir
1140
+ - **Kayit:** Acik, onay gerektiren veya kapali olabilir
1141
+ - **Minimum yas:** Varsayilan 16 (instance'a gore degisebilir)
1142
+
1143
+ ---
1144
+
1145
+ ## 9. API Kullanim Kaliplari (Otomasyon Icin)
1146
+
1147
+ ### 9.1. Gonderi Olusturma Akisi
1148
+
1149
+ ```
1150
+ 1. (Opsiyonel) Medya yukle: POST /api/v2/media -> media_id al
1151
+ 2. (Opsiyonel) Medya islenmesini bekle: GET /api/v1/media/:id (200 donene kadar)
1152
+ 3. Gonderi olustur: POST /api/v1/statuses (status + media_ids)
1153
+ ```
1154
+
1155
+ ### 9.2. Begeni/Boost Akisi
1156
+
1157
+ ```
1158
+ 1. Gonderiyi bul: GET /api/v2/search veya GET /api/v1/timelines/*
1159
+ 2. Begen: POST /api/v1/statuses/:id/favourite
1160
+ 3. Boost: POST /api/v1/statuses/:id/reblog
1161
+ ```
1162
+
1163
+ ### 9.3. Takip Akisi
1164
+
1165
+ ```
1166
+ 1. Hesabi bul: GET /api/v1/accounts/lookup?acct=kullanici@instance
1167
+ veya: GET /api/v1/accounts/search?q=kullanici
1168
+ 2. Takip et: POST /api/v1/accounts/:id/follow
1169
+ 3. (Kilitli hesapsa) Takip istegi otomatik gonderilir, onay beklenir
1170
+ ```
1171
+
1172
+ ### 9.4. Zaman Cizelgesi Izleme
1173
+
1174
+ ```
1175
+ 1. Ilk yukle: GET /api/v1/timelines/home?limit=40
1176
+ 2. Yeni gonderiler: GET /api/v1/timelines/home?min_id={son_gonderi_id}
1177
+ veya: Streaming API ile canli izle (GET /api/v1/streaming/user)
1178
+ ```
1179
+
1180
+ ### 9.5. Sayfalama (Pagination)
1181
+
1182
+ Mastodon API'si cursor tabanli sayfalama kullanir:
1183
+ - `max_id`: Belirtilen ID'den onceki sonuclari dondurur (geriye dogru)
1184
+ - `since_id`: Belirtilen ID'den sonraki sonuclari dondurur (onemli: en yeniden eskilere)
1185
+ - `min_id`: Belirtilen ID'den sonraki sonuclari dondurur (eskiden yeniye, ileri sayfalama)
1186
+ - `limit`: Sayfa basina sonuc sayisi
1187
+
1188
+ Sayfalama linkleri HTTP `Link` header'inda doner:
1189
+ ```
1190
+ Link: <https://instance/api/v1/timelines/home?max_id=123>; rel="next",
1191
+ <https://instance/api/v1/timelines/home?min_id=456>; rel="prev"
1192
+ ```
1193
+
1194
+ ### 9.6. Hata Yonetimi
1195
+
1196
+ | HTTP Kodu | Anlami | Aksiyon |
1197
+ |-----------|--------|---------|
1198
+ | 200 | Basarili | - |
1199
+ | 202 | Kabul edildi (asenkron isleme) | Islemenin tamamlanmasini bekleyin |
1200
+ | 206 | Kismi icerik (medya isleniyor) | Tekrar deneyin |
1201
+ | 401 | Yetkisiz | Token'i yenileyin |
1202
+ | 403 | Yasakli | Izin kontrol edin |
1203
+ | 404 | Bulunamadi | ID'yi kontrol edin |
1204
+ | 422 | Dogrulama hatasi | Parametreleri kontrol edin |
1205
+ | 429 | Rate limit asildi | `X-RateLimit-Reset`'e kadar bekleyin |
1206
+ | 503 | Servis kullanilamiyor | Daha sonra tekrar deneyin |
1207
+
1208
+ ---
1209
+
1210
+ ## 10. Ornek API Istekleri
1211
+
1212
+ ### Gonderi Olusturma
1213
+
1214
+ ```bash
1215
+ curl -X POST https://mastodon.social/api/v1/statuses \
1216
+ -H "Authorization: Bearer ACCESS_TOKEN" \
1217
+ -d "status=Merhaba Mastodon!" \
1218
+ -d "visibility=public"
1219
+ ```
1220
+
1221
+ ### Resimli Gonderi
1222
+
1223
+ ```bash
1224
+ # 1. Resim yukle
1225
+ MEDIA_ID=$(curl -X POST https://mastodon.social/api/v2/media \
1226
+ -H "Authorization: Bearer ACCESS_TOKEN" \
1227
+ -F "file=@resim.jpg" \
1228
+ -F "description=Resim aciklamasi" \
1229
+ | jq -r '.id')
1230
+
1231
+ # 2. Gonderi olustur
1232
+ curl -X POST https://mastodon.social/api/v1/statuses \
1233
+ -H "Authorization: Bearer ACCESS_TOKEN" \
1234
+ -d "status=Resimli gonderi" \
1235
+ -d "media_ids[]=$MEDIA_ID"
1236
+ ```
1237
+
1238
+ ### Anketli Gonderi
1239
+
1240
+ ```bash
1241
+ curl -X POST https://mastodon.social/api/v1/statuses \
1242
+ -H "Authorization: Bearer ACCESS_TOKEN" \
1243
+ -d "status=En sevdiginiz programlama dili?" \
1244
+ -d "poll[options][]=Python" \
1245
+ -d "poll[options][]=JavaScript" \
1246
+ -d "poll[options][]=Rust" \
1247
+ -d "poll[expires_in]=86400"
1248
+ ```
1249
+
1250
+ ### Zamanlanmis Gonderi
1251
+
1252
+ ```bash
1253
+ curl -X POST https://mastodon.social/api/v1/statuses \
1254
+ -H "Authorization: Bearer ACCESS_TOKEN" \
1255
+ -d "status=Bu gonderi gelecekte yayinlanacak" \
1256
+ -d "scheduled_at=2026-03-15T10:00:00.000Z"
1257
+ ```
1258
+
1259
+ ### Icerik Uyarili Gonderi
1260
+
1261
+ ```bash
1262
+ curl -X POST https://mastodon.social/api/v1/statuses \
1263
+ -H "Authorization: Bearer ACCESS_TOKEN" \
1264
+ -d "status=Spoiler icerigi burada" \
1265
+ -d "spoiler_text=Dikkat: Spoiler iceriyor" \
1266
+ -d "sensitive=true"
1267
+ ```
1268
+
1269
+ ---
1270
+
1271
+ ## 11. Onemli Notlar
1272
+
1273
+ 1. **Instance URL'si degiskendir:** Her Mastodon sunucusu farkli bir domain kullanir. API isteklerinde base URL olarak kullanicinin instance URL'si kullanilmalidir.
1274
+
1275
+ 2. **Karakter limiti sabit degildir:** Varsayilan 500 olsa da instance'a gore degisir. Her zaman `GET /api/v2/instance` ile kontrol edin.
1276
+
1277
+ 3. **Federation gecikmeleri:** Bir instance'taki gonderi diger instance'lara aninda ulasmayabilir. Federation islemleri asenkrondur.
1278
+
1279
+ 4. **Medya isleme asenkrondur:** `POST /api/v2/media` 202 donerse, medya henuz hazir degildir. `GET /api/v1/media/:id` ile 200 donene kadar kontrol edin, ancak gonderiye 202 durumunda bile ekleyebilirsiniz.
1280
+
1281
+ 5. **API ucretsizdir:** Twitter/X aksine Mastodon API tamamen ucretsizdir. Yalnizca rate limit kisitlamasi vardir.
1282
+
1283
+ 6. **Gonderi duzenleme destegi:** Mastodon 4.0+ surumlerinde gonderiler duzenlenebilir. Duzenleme gecmisi saklanir.
1284
+
1285
+ 7. **Boost gorunurlugu:** Private gonderiler boost edilemez. Boost sirasinda `visibility` parametresi ile gorunurluk daraltilabilir (ornegin public gonderiyi unlisted olarak boost etmek).
1286
+
1287
+ 8. **Direct mesaj guvenligi:** `direct` gorunurluklu gonderiler uctan uca sifrelenmis degildir. Instance yoneticileri icerigine erisebilir.
1288
+
1289
+ 9. **Sayfalama icin Link header kullanin:** Bazi endpoint'lerde (favourites, bookmarks) icerik ID'leri yanit govdesinde gosterilmez. Sayfalama icin her zaman HTTP `Link` header'ini parse edin.
1290
+
1291
+ 10. **PKCE destegi:** Guvenli OAuth akislari icin PKCE (S256) kullanilmasi onerilir.