Skip to content

Commit d8a00d5

Browse files
author
Pawel Czoppa
committed
Merge branch 'master' of https://gitlab.gog.com/galaxy-client/galaxy-plugin-api into platform_id_update
# Conflicts: # PLATFORM_IDs.md
2 parents 8d210e7 + d4cd1ce commit d8a00d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1474
-1555
lines changed

.gitlab-ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,19 @@ test_package:
1414

1515
deploy_package:
1616
stage: deploy
17+
variables:
18+
TWINE_USERNAME: $PYPI_USERNAME
19+
TWINE_PASSWORD: $PYPI_PASSWORD
1720
script:
21+
- pip install twine wheel
22+
- rm -rf dist
1823
- export VERSION=$(python setup.py --version)
19-
- python setup.py sdist --formats=gztar upload -r gog-pypi
24+
- python setup.py sdist --formats=gztar bdist_wheel
25+
- twine upload dist/*
2026
- curl -X POST --silent --show-error --fail
2127
"https://gitlab.gog.com/api/v4/projects/${CI_PROJECT_ID}/repository/tags?tag_name=${VERSION}&ref=${CI_COMMIT_REF_NAME}&private_token=${PACKAGE_DEPLOYER_API_TOKEN}"
2228
when: manual
2329
only:
2430
- master
2531
except:
26-
- tags
32+
- tags

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
dist: xenial # required for Python >= 3.7
2+
language: python
3+
python:
4+
- "3.7"
5+
install:
6+
- pip install -r requirements.txt
7+
script:
8+
- pytest

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 GOG sp. z o.o.
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

PLATFORM_IDs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@ Platform ID list for GOG Galaxy 2.0 Integrations
7979
| psvita | PlayStation Vita |
8080
| nds | Nintendo DS |
8181
| 3ds | Nintendo 3DS |
82+
| pathofexile | Path of Exile |

README.md

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
# GOG Galaxy Integrations Python API
22

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.
44

55
- refer to our <a href='https://galaxy-integrations-python-api.readthedocs.io'>documentation</a>
66

77
## Features
88

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.
1010

1111
The provided features are:
1212

13-
- multistep authorisation using a browser built into GOG Galaxy 2.0
13+
- multistep authorization using a browser built into GOG Galaxy 2.0
1414
- 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
2121
- cache storage
2222

2323
## Platform Id's
2424

2525
Each integration can implement only one platform. Each integration must declare which platform it's integrating.
2626

27-
[List of possible Platofrm IDs](PLATFORM_IDs.md)
27+
[List of possible Platform IDs](PLATFORM_IDs.md)
2828

2929
## Basic usage
3030

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`.
3333
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`.
3434

3535
```python
@@ -61,11 +61,13 @@ if __name__ == "__main__":
6161

6262
## Deployment
6363

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).
6666

6767
### Lookup directory
68+
6869
<a name="deploy-location"></a>
70+
6971
- Windows:
7072

7173
`%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
7577
`~/Library/Application Support/GOG.com/Galaxy/plugins/installed`
7678

7779
### Manifest
78-
<a name="deploy-manifest"></a>
79-
Obligatory JSON file to be placed in a integration folder.
80+
81+
<a name="deploy-manifest"></a>
82+
Obligatory JSON file to be placed in an integration folder.
8083

8184
```json
8285
{
@@ -91,6 +94,7 @@ Obligatory JSON file to be placed in a integration folder.
9194
"script": "plugin.py"
9295
}
9396
```
97+
9498
| property | description |
9599
|---------------|---|
96100
| `guid` | |
@@ -99,13 +103,15 @@ Obligatory JSON file to be placed in a integration folder.
99103
| `script` | path of the entry point module, relative to the integration folder |
100104

101105
### 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:
103108

104109
```pip install DEP --target DIR --implementation cp --python-version 37```
105110

106-
For example plugin that uses *requests* has structure as follows:
111+
For example, a plugin that uses *requests* could have the following structure:
107112

108113
<a name="deploy-structure-example"></a>
114+
109115
```bash
110116
installed
111117
└── my_integration

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
# List of patterns, relative to source directory, that match files and
4848
# directories to ignore when looking for source files.
4949
# This pattern also affects html_static_path and html_extra_path.
50-
exclude_patterns = []
50+
exclude_patterns = [] # type: ignore
5151

5252

5353
# -- Options for HTML output -------------------------------------------------

jenkins/release.groovy

Lines changed: 0 additions & 14 deletions
This file was deleted.

jenkins/release.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

jenkins/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

mypy.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[mypy]
2+
ignore_missing_imports = True

0 commit comments

Comments
 (0)