You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a Node.js wrapper library over OneSignal REST API. You can create notifications, view apps, edit a device and all other actions you can take on OneSignal REST API. Includes Typescript support.
22
+
#Node Client SDK
23
+
The OneSignal Node client is a server OneSignal SDK for NodeJS. Integrate OneSignal with your backend events, data, and more.
24
+
25
25
26
26
# Install
27
27
28
28
```sh
29
-
// yarn
29
+
# yarn
30
30
yarn add @onesignal/node-onesignal
31
31
32
-
// npm
32
+
# npm
33
33
npm install @onesignal/node-onesignal --save
34
34
```
35
35
@@ -48,7 +48,6 @@ We can configure the client using the `createConfiguration` function. You can fi
The returned `configuration` object is what is passed to the `DefaultApi` constructor to initialize the client.
52
51
53
52
### Initializing the Client
54
53
```js
@@ -121,14 +120,37 @@ client = new OneSignal.DefaultApi(configuration);
121
120
122
121
---
123
122
## API Reference
124
-
To understand this API, know that requests that change state will follow the following format:
125
-
1. create or get an object
126
-
2. make changes to that object
127
-
3. pass the object to the request function to make the changes.
128
-
129
-
Examples of important OneSignal objects include `App`, `Notification`, `Player`, and `Segment`.
130
123
131
-
For example, see the section below on creating an app. First an app object is created via the instantiation of the `App` class. Then, the app instance is modified directly. Finally, we use the `client` to create the app via a remote request.
124
+
> To make stateful changes requests should take on the following pattern:
125
+
> 1. create or get an object
126
+
> 2. make changes to that object
127
+
> 3. pass the object to the request function to make the changes
128
+
>
129
+
> Examples of important OneSignal objects include `App`, `Notification`, `Player`, and `Segment`.
130
+
>
131
+
> For example, see the section below on creating an app. First an app object is created via the instantiation of the `App` class. Then, the app instance is modified directly. Finally, we use the `client` to create the app via a remote request.
View the details of an existing device in one of your OneSignal apps. The email a th hash is **only required if you have enabled Identity Verification and `device_type` is email**.
0 commit comments