2019-05-31 11:50:53 +02:00
2019-05-28 17:59:11 +02:00
2019-02-20 16:44:53 +01:00
2019-02-11 12:02:02 +01:00
2019-05-31 11:29:05 +02:00
2019-05-31 11:50:53 +02:00

GOG Galaxy - Community Integration - Python API

This document is still work in progress.

Basic Usage

Basic implementation:

import sys
from galaxy.api.plugin import Plugin, create_and_run_plugin
from galaxy.api.consts import Platform

class PluginExample(Plugin):
    def __init__(self, reader, writer, token):
        super().__init__(
            Platform.Generic, # Choose platform from available list
            "0.1", # Version
            reader,
            writer,
            token
        )

    # implement methods
    async def authenticate(self, stored_credentials=None):
        pass

def main():
    create_and_run_plugin(PluginExample, sys.argv)

# run plugin event loop
if __name__ == "__main__":
    main()

Plugin should be deployed with manifest:

{
    "name": "Example plugin",
    "platform": "generic",
    "guid": "UNIQUE-GUID",
    "version": "0.1",
    "description": "Example plugin",
    "author": "Name",
    "email": "author@email.com",
    "url": "https://github.com/user/galaxy-plugin-example",
    "script": "plugin.py"
}

Development

Install required packages:

pip install -r requirements.txt

Run tests:

pytest

Methods Documentation

TODO

By integrating or attempting to integrate any applications or content with or into GOG Galaxy® 2.0. you represent that such application or content is your original creation (other than any software made available by GOG) and/or that you have all necessary rights to grant such applicable rights to the relevant community integration to GOG and to GOG Galaxy 2.0 end users for the purpose of use of such community integration and that such community integration comply with any third party license and other requirements including compliance with applicable laws.

Description
No description provided
Readme MIT 466 KiB
Languages
Python 100%