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: README.md
+24-18
Original file line number
Diff line number
Diff line change
@@ -1,35 +1,35 @@
1
1
# GOG Galaxy Integrations Python API
2
2
3
-
This Python library allows to easily build community integrations for various gaming platforms with GOG Galaxy 2.0.
3
+
This Python library allows developers to easily build community integrations for various gaming platforms with GOG Galaxy 2.0.
4
4
5
5
- refer to our <ahref='https://galaxy-integrations-python-api.readthedocs.io'>documentation</a>
6
6
7
7
## Features
8
8
9
-
Each integration in GOG Galaxy 2.0 comes as a separate Python script, and is launched as a separate process, that which needs to communicate with main instance of GOG Galaxy 2.0.
9
+
Each integration in GOG Galaxy 2.0 comes as a separate Python script and is launched as a separate process that needs to communicate with the main instance of GOG Galaxy 2.0.
10
10
11
11
The provided features are:
12
12
13
-
- multistep authorisation using a browser built into GOG Galaxy 2.0
13
+
- multistep authorization using a browser built into GOG Galaxy 2.0
14
14
- support for GOG Galaxy 2.0 features:
15
-
- importing owned and detecting installed games
16
-
- installing and launching games
17
-
- importing achievements and game time
18
-
- importing friends lists and statuses
19
-
- importing friends recomendations list
20
-
- receiving and sending chat messages
15
+
- importing owned and detecting installed games
16
+
- installing and launching games
17
+
- importing achievements and game time
18
+
- importing friends lists and statuses
19
+
- importing friends recommendations list
20
+
- receiving and sending chat messages
21
21
- cache storage
22
22
23
23
## Platform Id's
24
24
25
25
Each integration can implement only one platform. Each integration must declare which platform it's integrating.
26
26
27
-
[List of possible Platofrm IDs](PLATFORM_IDs.md)
27
+
[List of possible Platform IDs](PLATFORM_IDs.md)
28
28
29
29
## Basic usage
30
30
31
-
Eeach integration should inherit from the :class:`~galaxy.api.plugin.Plugin` class. Supported methods like :meth:`~galaxy.api.plugin.Plugin.get_owned_games` should be overwritten - they are called from the GOG Galaxy client in the appropriate times.
32
-
Each of those method can raise exceptions inherited from the :exc:`~galaxy.api.jsonrpc.ApplicationError`.
31
+
Each integration should inherit from the :class:`~galaxy.api.plugin.Plugin` class. Supported methods like :meth:`~galaxy.api.plugin.Plugin.get_owned_games` should be overwritten - they are called from the GOG Galaxy client at the appropriate times.
32
+
Each of those methods can raise exceptions inherited from the :exc:`~galaxy.api.jsonrpc.ApplicationError`.
33
33
Communication between an integration and the client is also possible with the use of notifications, for example: :meth:`~galaxy.api.plugin.Plugin.update_local_game_status`.
34
34
35
35
```python
@@ -61,11 +61,13 @@ if __name__ == "__main__":
61
61
62
62
## Deployment
63
63
64
-
The client has a built-in Python 3.7 interpreter, so the integrations are delivered as python modules.
65
-
In order to be found by GOG Galaxy 2.0 an integration folder should be placed in [lookup directory](#deploy-location). Beside all the python files, the integration folder has to contain [manifest.json](#deploy-manifest) and all third-party dependencies. See an [examplary structure](#deploy-structure-example).
64
+
The client has a built-in Python 3.7 interpreter, so integrations are delivered as Python modules.
65
+
In order to be found by GOG Galaxy 2.0 an integration folder should be placed in [lookup directory](#deploy-location). Beside all the Python files, the integration folder must contain [manifest.json](#deploy-manifest) and all third-party dependencies. See an [exemplary structure](#deploy-structure-example).
66
66
67
67
### Lookup directory
68
+
68
69
<aname="deploy-location"></a>
70
+
69
71
- Windows:
70
72
71
73
`%localappdata%\GOG.com\Galaxy\plugins\installed`
@@ -75,8 +77,9 @@ In order to be found by GOG Galaxy 2.0 an integration folder should be placed in
Obligatory JSON file to be placed in a integration folder.
80
+
81
+
<aname="deploy-manifest"></a>
82
+
Obligatory JSON file to be placed in an integration folder.
80
83
81
84
```json
82
85
{
@@ -91,6 +94,7 @@ Obligatory JSON file to be placed in a integration folder.
91
94
"script": "plugin.py"
92
95
}
93
96
```
97
+
94
98
| property | description |
95
99
|---------------|---|
96
100
|`guid`||
@@ -99,13 +103,15 @@ Obligatory JSON file to be placed in a integration folder.
99
103
|`script`| path of the entry point module, relative to the integration folder |
100
104
101
105
### Dependencies
102
-
All third-party packages (packages not included in Python 3.7 standard library) should be deployed along with plugin files. Use the folowing command structure:
106
+
107
+
All third-party packages (packages not included in the Python 3.7 standard library) should be deployed along with plugin files. Use the following command structure:
103
108
104
109
```pip install DEP --target DIR --implementation cp --python-version 37```
105
110
106
-
For exampleplugin that uses *requests*has structure as follows:
111
+
For example, a plugin that uses *requests*could have the following structure:
0 commit comments