mirror of
https://github.com/gogcom/galaxy-integrations-python-api.git
synced 2026-01-01 11:28:12 -05:00
Compare commits
8 Commits
deployed_0
...
0.35
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d90ba0c09 | ||
|
|
d74ed3a4b5 | ||
|
|
d6f2d00fb9 | ||
|
|
ce9f33f5d0 | ||
|
|
b28fc60088 | ||
|
|
be3d3bb7e5 | ||
|
|
6dec4a99d3 | ||
|
|
69ffef2fde |
82
PLATFORM_IDs.md
Normal file
82
PLATFORM_IDs.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
### PLATFORM ID LIST
|
||||||
|
|
||||||
|
Platform ID list for GOG Galaxy 2.0 Integrations
|
||||||
|
|
||||||
|
| ID | Name |
|
||||||
|
| --- | --- |
|
||||||
|
| steam | Steam |
|
||||||
|
| psn | PlayStation Network |
|
||||||
|
| xboxone | Xbox Live |
|
||||||
|
| generic | Manually added games |
|
||||||
|
| origin | Origin |
|
||||||
|
| uplay | Uplay |
|
||||||
|
| battlenet | Battle.net |
|
||||||
|
| epic | Epic Games Store |
|
||||||
|
| bethesda | Bethesda.net |
|
||||||
|
| paradox | Paradox Plaza |
|
||||||
|
| humble | Humble Bundle |
|
||||||
|
| kartridge | Kartridge |
|
||||||
|
| itch | Itch.io |
|
||||||
|
| nswitch | Nintendo Switch |
|
||||||
|
| nwiiu | Nintendo Wii U |
|
||||||
|
| nwii | Nintendo Wii |
|
||||||
|
| ncube | Nintendo Game Cube |
|
||||||
|
| riot | Riot |
|
||||||
|
| wargaming | Wargaming |
|
||||||
|
| ngameboy | Nintendo Game Boy |
|
||||||
|
| atari | Atari |
|
||||||
|
| amiga | Amiga |
|
||||||
|
| snes | SNES |
|
||||||
|
| beamdog | Beamdog |
|
||||||
|
| d2d | Direct2Drive |
|
||||||
|
| discord | Discord |
|
||||||
|
| dotemu | DotEmu |
|
||||||
|
| gamehouse | GameHouse |
|
||||||
|
| gmg | Green Man Gaming |
|
||||||
|
| weplay | WePlay |
|
||||||
|
| zx | Zx Spectrum PC |
|
||||||
|
| vision | ColecoVision |
|
||||||
|
| nes | NES |
|
||||||
|
| sms | Sega Master System |
|
||||||
|
| c64 | Commodore 64 |
|
||||||
|
| pce | PC Engine |
|
||||||
|
| segag | Sega Genesis |
|
||||||
|
| neo | NeoGeo |
|
||||||
|
| sega32 | Sega 32X |
|
||||||
|
| segacd | Sega CD |
|
||||||
|
| 3do | 3DO Interactive |
|
||||||
|
| saturn | SegaSaturn |
|
||||||
|
| psx | Sony PlayStation |
|
||||||
|
| ps2 | Sony PlayStation 2 |
|
||||||
|
| n64 | Nintendo64 |
|
||||||
|
| jaguar | Atari Jaguar |
|
||||||
|
| dc | Sega Dreamcast |
|
||||||
|
| xboxog | Original Xbox games |
|
||||||
|
| amazon | Amazon |
|
||||||
|
| gg | GamersGate |
|
||||||
|
| egg | Newegg |
|
||||||
|
| bb | BestBuy |
|
||||||
|
| gameuk | Game UK |
|
||||||
|
| fanatical | Fanatical store |
|
||||||
|
| playasia | PlayAsia |
|
||||||
|
| stadia | Google Stadia |
|
||||||
|
| arc | ARC |
|
||||||
|
| eso | ESO |
|
||||||
|
| glyph | Trion World |
|
||||||
|
| aionl | Aion: Legions of War |
|
||||||
|
| aion | Aion |
|
||||||
|
| blade | Blade and Soul |
|
||||||
|
| gw | Guild Wars |
|
||||||
|
| gw2 | Guild Wars 2 |
|
||||||
|
| lin2 | Lineage 2 |
|
||||||
|
| ffxi | Final Fantasy XI |
|
||||||
|
| ffxiv | Final Fantasy XIV |
|
||||||
|
| totalwar | TotalWar |
|
||||||
|
| winstore | Windows Store |
|
||||||
|
| elites | Elite Dangerous |
|
||||||
|
| star | Star Citizen |
|
||||||
|
| psp | Playstation Portable |
|
||||||
|
| psvita | Playstation Vita |
|
||||||
|
| nds | Nintendo DS |
|
||||||
|
| 3ds | Nintendo 3DS |
|
||||||
|
|
||||||
12
README.md
12
README.md
@@ -20,6 +20,12 @@ The provided features are:
|
|||||||
- receiving and sending chat messages
|
- receiving and sending chat messages
|
||||||
- cache storage
|
- cache storage
|
||||||
|
|
||||||
|
## Platform Id's
|
||||||
|
|
||||||
|
Each integration can implement only one platform. Each integration must declare which platform it's integrating.
|
||||||
|
|
||||||
|
[List of possible Platofrm IDs](PLATFORM_IDs.md)
|
||||||
|
|
||||||
## Basic usage
|
## Basic usage
|
||||||
|
|
||||||
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.
|
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.
|
||||||
@@ -58,7 +64,8 @@ if __name__ == "__main__":
|
|||||||
The client has a built-in Python 3.7 interpreter, so the integrations are delivered as python modules.
|
The client has a built-in Python 3.7 interpreter, so the integrations are delivered as python modules.
|
||||||
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).
|
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).
|
||||||
|
|
||||||
### <a name="deploy-location"></a> Lookup directory:
|
### Lookup directory
|
||||||
|
<a name="deploy-location"></a>
|
||||||
- Windows:
|
- Windows:
|
||||||
|
|
||||||
`%localappdata%\GOG.com\Galaxy\plugins\installed`
|
`%localappdata%\GOG.com\Galaxy\plugins\installed`
|
||||||
@@ -67,7 +74,8 @@ In order to be found by GOG Galaxy 2.0 an integration folder should be placed in
|
|||||||
|
|
||||||
`~/Library/Application Support/GOG.com/Galaxy/plugins/installed`
|
`~/Library/Application Support/GOG.com/Galaxy/plugins/installed`
|
||||||
|
|
||||||
### <a name="deploy-manifest"></a> Manifest
|
### Manifest
|
||||||
|
<a name="deploy-manifest"></a>
|
||||||
Obligatory JSON file to be placed in a integration folder.
|
Obligatory JSON file to be placed in a integration folder.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ GOG Galaxy Integrations Python API
|
|||||||
|
|
||||||
Overview <overview>
|
Overview <overview>
|
||||||
API <galaxy.api>
|
API <galaxy.api>
|
||||||
|
Platform ID's <platforms>
|
||||||
|
|
||||||
Index
|
Index
|
||||||
-------------------
|
-------------------
|
||||||
|
|||||||
@@ -5,3 +5,11 @@
|
|||||||
|
|
||||||
.. mdinclude:: ../../README.md
|
.. mdinclude:: ../../README.md
|
||||||
:start-line: 6
|
:start-line: 6
|
||||||
|
:end-line: 26
|
||||||
|
|
||||||
|
.. excluding Platforms Id's link
|
||||||
|
|
||||||
|
:ref:`platforms-link`.
|
||||||
|
|
||||||
|
.. mdinclude:: ../../README.md
|
||||||
|
:start-line: 28
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="galaxy.plugin.api",
|
name="galaxy.plugin.api",
|
||||||
version="0.34",
|
version="0.35",
|
||||||
description="GOG Galaxy Integrations Python API",
|
description="GOG Galaxy Integrations Python API",
|
||||||
author='Galaxy team',
|
author='Galaxy team',
|
||||||
author_email='galaxy@gog.com',
|
author_email='galaxy@gog.com',
|
||||||
|
|||||||
@@ -57,7 +57,12 @@ class Plugin:
|
|||||||
# internal
|
# internal
|
||||||
self._register_method("shutdown", self._shutdown, internal=True)
|
self._register_method("shutdown", self._shutdown, internal=True)
|
||||||
self._register_method("get_capabilities", self._get_capabilities, internal=True)
|
self._register_method("get_capabilities", self._get_capabilities, internal=True)
|
||||||
self._register_method("initialize_cache", self._initialize_cache, internal=True)
|
self._register_method(
|
||||||
|
"initialize_cache",
|
||||||
|
self._initialize_cache,
|
||||||
|
internal=True,
|
||||||
|
sensitive_params="data"
|
||||||
|
)
|
||||||
self._register_method("ping", self._ping, internal=True)
|
self._register_method("ping", self._ping, internal=True)
|
||||||
|
|
||||||
# implemented by developer
|
# implemented by developer
|
||||||
@@ -466,7 +471,8 @@ class Plugin:
|
|||||||
"""
|
"""
|
||||||
self._notification_client.notify(
|
self._notification_client.notify(
|
||||||
"push_cache",
|
"push_cache",
|
||||||
params={"data": self._persistent_cache}
|
params={"data": self._persistent_cache},
|
||||||
|
sensitive_params="data"
|
||||||
)
|
)
|
||||||
|
|
||||||
# handlers
|
# handlers
|
||||||
|
|||||||
Reference in New Issue
Block a user