prototurk-sdk 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -154,6 +154,23 @@ DM ve Post (Gönderi/Yorum) komutlarınızı (ör. `/ping`) kolayca oluşturman
154
154
  - `client.commands.register(command)`: Belirtilen komutu sisteme kaydeder.
155
155
  - `client.commands.isCommand(text)`: Herhangi bir metnin kayıtlı bir komut olup olmadığını doğrular. Ayrıca gönderilerde (`@bot /komut`) kullanımını destekler.
156
156
 
157
+ ### 🌐 REST Manager (`client.rest`)
158
+
159
+ Eğer SDK'nın henüz desteklemediği bir API uç noktası varsa, doğrudan `client.rest` üzerinden yetkilendirilmiş istekler atabilirsiniz. Bu metotlar `query` (URL parametreleri) ve `body` (JSON gövdesi) şeklinde açıkça ayrılmış seçenekler alır.
160
+
161
+ ```typescript
162
+ // GET isteği (query parametreleri ile)
163
+ const response = await client.rest.get("/custom-endpoint", {
164
+ query: { limit: 10, cursor: "abc" }
165
+ });
166
+
167
+ // POST isteği (hem body hem de query ile)
168
+ const result = await client.rest.post("/custom-endpoint", {
169
+ body: { text: "Merhaba" },
170
+ query: { dryRun: true }
171
+ });
172
+ ```
173
+
157
174
  **Örnek Komut Dosyası (`./commands/ban.ts` argümanlı kullanım)**
158
175
 
159
176
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prototurk-sdk",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Prototürk platformunda Bot geliştirmek için geliştirilmiş SDK.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",