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
Copy file name to clipboardExpand all lines: docs/pixelbuy/store/web-supervisor.md
+73-5Lines changed: 73 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,17 @@ title: Web supervisor
4
4
description: How to setup PixelBuy web supervisors.
5
5
---
6
6
7
+
```mdx-code-block
8
+
import DocCard from '@theme/DocCard';
9
+
```
10
+
7
11
The web supervisor interface is a type of system that retrieves data from a web store to apply any necessary delivery inside Minecraft server.
8
12
9
13
## Types
10
14
11
15
PixelBuy currently aims to support some delivery concepts:
12
16
17
+
*`PIXELBUY` - Website compatible with PixelBuy web API format.
13
18
*`WOOMINECRAFT` - Self-hosted WordPress using **WooMinecraft** plugin.
14
19
*`TEBEX` - BuyCraft-like delivery from **Tebex** store.
15
20
@@ -18,10 +23,68 @@ PixelBuy currently aims to support some delivery concepts:
18
23
Any web supervisor has common configuration paths.
19
24
20
25
```yaml
26
+
Type: PIXELBUY
21
27
Group: 'servername'
28
+
URL: 'https://shop.mysite.com'
22
29
```
23
30
31
+
* `type` - The type of web supervisor.
24
32
* `group` - Is the server associated with the name that the supervisor is looking for orders.
33
+
* `url` - Is the store url.
34
+
35
+
### Secret declaration
36
+
37
+
In any part of the configuration where a "secret", "key" or any value that is supposed to be private, can be declared in the following ways:
38
+
39
+
* `<value>` - The simple one, where `<value>` is just the value.
40
+
* `file:<path>` - To get the value from a file content, where `<path>` is the file path.
41
+
* `property:<key>` - To get the value from a system property, where `<key>` is the system property key.
42
+
43
+
## PixelBuy
44
+
45
+
The PixelBuy web supervisor retrieves information from a site compatible with PixelBuy web API schema:
46
+
47
+
```mdx-code-block
48
+
<DocCard item={{
49
+
type: "link",
50
+
href: "/pixelbuy/developers/schema/",
51
+
label: "Schema",
52
+
description: "PixelBuy web API schema"
53
+
}}
54
+
/>
55
+
```
56
+
57
+
This supervisor also came with its own configuration.
58
+
59
+
```yaml
60
+
Version: 1
61
+
Format:
62
+
Server: '{url}/api/server/{key}'
63
+
Order: '{url}/api/order/{key}'
64
+
Rest:
65
+
Check-Interval: 30
66
+
Auth: PARAMS
67
+
Property: 'secret'
68
+
Secret: ''
69
+
```
70
+
71
+
* `version` - The version of PixelBuy schema.
72
+
* `format.server` - The URL format to get server information (`{key}` will be replaced with server group).
73
+
* `format.order` - The URL format to get order information (`{key}` will be replaced with order ID).
74
+
* `rest.check-interval` - The interval in seconds to check new orders, set to `DETECT` to use a provided one by REST API.
75
+
* `rest.auth` - The authentication type to connect with REST API.
76
+
* `rest.property` - The property name, this both apply to `PARAMS` and `HEADER` authentication.
77
+
* `rest.secret` - The secret key that is used to get information.
78
+
79
+
### Format version
80
+
81
+
* **Version 1:** Initial PixelBuy web API version, no changes.
82
+
83
+
### Auth types
84
+
85
+
* `PARAMS` - Use query parameters to provide the secret.
86
+
* `HEADER` - Use header property to provide the secret.
87
+
* `BASIC` - Use HTTP Basic authorization.
25
88
26
89
## WooMinecraft
27
90
@@ -30,14 +93,12 @@ The WooMinecraft supervisor type makes delayed checks to get what order commands
30
93
The store plugin setup is the same as [WooMinecraft wiki](https://github.com/WooMinecraft/WooMinecraft/wiki/Step-2:-Setting-up-the-wordpress-side) and also [the commands](https://github.com/WooMinecraft/WooMinecraft/wiki/Step-3:-Creating-A-Package).
31
94
32
95
```yaml
33
-
Check-Interval: 7
34
-
URL: 'http://shop.mysite.com'
96
+
Check-Interval: 600
35
97
Key: 'asdUniqueKeyForServer'
36
98
```
37
99
38
-
* `Check-Interval` - Is the interval in seconds to check WooMinecraft rest api from store url.
39
-
* `URL` - Is the store url.
40
-
* `Key` - Is the server key from [WooMinecraft configuration](https://github.com/WooMinecraft/WooMinecraft/wiki/Step-2:-Setting-up-the-wordpress-side).
100
+
* `check-interval` - Is the interval in seconds to check WooMinecraft rest api from store url.
101
+
* `key` - Is the server key from [WooMinecraft configuration](https://github.com/WooMinecraft/WooMinecraft/wiki/Step-2:-Setting-up-the-wordpress-side).
41
102
42
103
### WooCommerce integration
43
104
@@ -62,8 +123,15 @@ Next you only need to set the generated key and secret into web supervisor confi
62
123
63
124
```yaml
64
125
WooCommerce:
126
+
Version: 3
127
+
Auth: PARAMS
65
128
ConsumerKey: 'ck_theGeneratedConsumerKey'
66
129
ConsumerSecret: 'cs_theGeneratedConsumerSecret'
67
130
```
68
131
132
+
* `version` - WooCommerce API version, currently only version 3 is supported.
133
+
* `auth` - The [authentication type](https://woocommerce.github.io/woocommerce-rest-api-docs/#authentication-over-https) to connect with WooCommerce API (`PARAMS` or `BASIC`).
134
+
* `consumerkey` - The generated key.
135
+
* `consumersecret` - The generated secret.
136
+
69
137
Take in count that every consumer key starts with `ck_` and every consumer secret starts with `cs_`.
0 commit comments