gamemoney 4.0.0 → 4.0.1
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 +38 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
[GameMoney](https://gmpays.com/) API wrapper for Node.js
|
|
4
|
+
|
|
5
|
+
Full API documentation [here](https://cp.gmpays.com/apidoc)
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
```sh
|
|
9
|
+
$ npm install gamemoney
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
### Initialization
|
|
15
|
+
```typescript
|
|
16
|
+
import fs from 'fs'
|
|
17
|
+
import GameMoney from 'gamemoney'
|
|
18
|
+
|
|
19
|
+
const gm = new GameMoney({
|
|
20
|
+
project: 42,
|
|
21
|
+
hmacPrivateKey: 'test',
|
|
22
|
+
|
|
23
|
+
// Optional. But to make checkouts must be specified
|
|
24
|
+
rsaPrivateKey: {
|
|
25
|
+
key: fs.readFileSync('./private.pem').toString(),
|
|
26
|
+
passphrase: '123' // Optional
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
// OR:
|
|
30
|
+
// rsaPrivateKey: Buffer.from(
|
|
31
|
+
// process.env.GM_RSA_PRIVATE_KEY ?? '',
|
|
32
|
+
// 'base64',
|
|
33
|
+
// )
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Examples
|
|
38
|
+
See examples in [src/examples](https://github.com/gamemoney-ps/gamemoney-node-sdk/tree/master/src/examples) directory
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gamemoney",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "GameMoney API wrapper for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"gamemoney",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"scripts": {
|
|
34
34
|
"prebuild": "rm -rf .build",
|
|
35
35
|
"build": "tsc",
|
|
36
|
-
"postbuild": "cp -r package*.json .npmignore ./src/certs .build",
|
|
36
|
+
"postbuild": "cp -r package*.json .npmignore ./src/certs README.md .build",
|
|
37
37
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
38
38
|
"lint": "xo",
|
|
39
39
|
"lint:fix": "xo --fix"
|