@pushler/js 1.0.0 → 1.0.3

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.
package/README.md CHANGED
@@ -24,8 +24,7 @@ import Pushler from '@pushler/js';
24
24
  // Создание клиента
25
25
  const pushler = Pushler.Create({
26
26
  appKey: 'your-app-key',
27
- wsUrl: 'wss://pushler.ru/ws',
28
- apiUrl: 'https://api.pushler.ru'
27
+ apiUrl: 'https://api.pushler.ru' // URL вашего бэкенда для авторизации каналов
29
28
  });
30
29
 
31
30
  // Обработка событий подключения
@@ -84,13 +83,12 @@ await server.trigger(
84
83
 
85
84
  ```javascript
86
85
  const pushler = Pushler.Create({
87
- appKey: 'your-app-key', // Обязательно
88
- wsUrl: 'wss://pushler.ru/ws', // URL WebSocket сервера
89
- apiUrl: 'https://api.pushler.ru', // URL API сервера
90
- authEndpoint: '/pushler/auth', // Путь для авторизации приватных каналов
91
- autoConnect: true, // Автоподключение (по умолчанию: true)
92
- reconnectDelay: 1000, // Задержка переподключения (мс)
93
- maxReconnectAttempts: 5 // Максимум попыток переподключения
86
+ appKey: 'your-app-key', // Обязательно
87
+ apiUrl: 'https://api.pushler.ru', // URL вашего бэкенда для авторизации каналов
88
+ authEndpoint: '/pushler/auth', // Путь для авторизации приватных каналов
89
+ autoConnect: true, // Автоподключение (по умолчанию: true)
90
+ reconnectDelay: 1000, // Задержка переподключения (мс)
91
+ maxReconnectAttempts: 5 // Максимум попыток переподключения
94
92
  });
95
93
  ```
96
94
 
@@ -137,7 +135,7 @@ const server = Pushler.Server({
137
135
  appKey: 'your-app-key', // Обязательно
138
136
  appSecret: 'your-app-secret', // Обязательно
139
137
  apiUrl: 'https://api.pushler.ru', // URL API
140
- timeout: 30000 // Таймаут запросов (мс)
138
+ timeout: 10000 // Таймаут запросов (мс)
141
139
  });
142
140
  ```
143
141