rdh-socket-client 1.0.0 → 1.0.2

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 +31 -0
  2. package/package.json +1 -1
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # RDH Socket Client
2
+
3
+ ## Installation
4
+
5
+ To install the RDH Socket Client package, run the following command in your command line:
6
+
7
+ ```bash
8
+ npm i rdh-socket-client
9
+ ```
10
+ ## USAGE
11
+
12
+ ```js
13
+ import rdhClientSocket from 'rdh-client-socke';
14
+
15
+ // Initialize the client with your app ID and app key
16
+ const client = new rdhClientSocket({
17
+ app_id: 'APP_ID',
18
+ app_key: 'APP_key'
19
+ });
20
+
21
+ // Subscribe to a channel and listen for an event
22
+ client.channel('channelName').on('eventName', (data) => {
23
+ console.log(data.message);
24
+ });
25
+
26
+ // Emit a custom event with data
27
+ client.emit('myEvent', mydata);
28
+ ```
29
+ eplace `APP_ID` and `APP_key` with your actual application ID and key. Make sure to customize the channel name, event name, and data according to your application's requirements.
30
+
31
+ Feel free to explore more features and options provided by the RDH Socket Client package documentation for a comprehensive understanding of its capabilities.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdh-socket-client",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Client Socket for rdh-socket",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",