LCU-Connector


NameLCU-Connector JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummaryEasy-to-use wrapper for the League Client API.
upload_time2023-04-15 01:01:54
maintainer
docs_urlNone
authorGabriel Viana
requires_python
licenseMIT
keywords league client league client api league client api wrapper api wrapperleague of legends league of legends api lcu-driver lcu driver lcu-connector lcu connector
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LCU Connector

This library serves to make the connection with the League Client API in a simple way, although there are others, such as [lcu-driver](https://github.com/sousa-andre/lcu-driver) (which by the way is very good), but with lcu-driver, for example, I couldn't work and structure my code the way I wanted it to, so I decided to make my own wrapper.


## Quick start
I will be brief in the explanation but I guarantee that it will be enough, as this library is simple to use. Among other things, I'm working on more elaborate documentation.

So, hand in the dough! Or rather, on the keyboard...


### Installation
Just use pip and it's fine.
```powershell
pip install lcu-connector
```

### How to use
Import the `Connector` from the `lcu_connector` module, instantiate it and start the session via the `.start()` method or passing the `start=True` parameter directly in the instance.
```python
from lcu_connector import Connector

# Method 01
conn = Connector(start=True)

# Method 02
conn = Connector()
conn.start()
```

Now have fun, the `Connector` object has the same attributes as the `requests` library and derivatives.
```python
from lcu_connector import Connector

conn = Connector(start=True)

# Getting the data of the currently connected summoner
res = conn.get('/lol-summoner/v1/current-summoner')
print(res.json())

# Getting a summoner's data by name
summoner_name = 'JohnDoe'
res = conn.get('/lol-summoner/v1/summoners?name={summoner_name}')
print(res.json())

# Performing POST request
data = {
    'foo': 'bar'
}
res = conn.post('API_URL', data=data)
if res.status_code == 200:
    do_something()
```

Você pode ver todos os links disponíveis para o League Client através do [LCU Explorer](https://github.com/HextechDocs/lcu-explorer).


## To-do
- [ ] Observador de eventos da API
- [ ] Funções integradas para tarefas mais utilizadas (como um get_summoner_by_name())
- [ ] Documentação mais detalhada

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "LCU-Connector",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "league client,league client api,league client api wrapper,api wrapperleague of legends,league of legends api,lcu-driver,lcu driver,lcu-connector,lcu connector",
    "author": "Gabriel Viana",
    "author_email": "ssiriusbeck@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7e/b3/40de76e5955416a41d683dac5911129b633a52d1884241a40920c8266fb3/LCU%20Connector-1.0.1.tar.gz",
    "platform": null,
    "description": "# LCU Connector\r\n\r\nThis library serves to make the connection with the League Client API in a simple way, although there are others, such as [lcu-driver](https://github.com/sousa-andre/lcu-driver) (which by the way is very good), but with lcu-driver, for example, I couldn't work and structure my code the way I wanted it to, so I decided to make my own wrapper.\r\n\r\n\r\n## Quick start\r\nI will be brief in the explanation but I guarantee that it will be enough, as this library is simple to use. Among other things, I'm working on more elaborate documentation.\r\n\r\nSo, hand in the dough! Or rather, on the keyboard...\r\n\r\n\r\n### Installation\r\nJust use pip and it's fine.\r\n```powershell\r\npip install lcu-connector\r\n```\r\n\r\n### How to use\r\nImport the `Connector` from the `lcu_connector` module, instantiate it and start the session via the `.start()` method or passing the `start=True` parameter directly in the instance.\r\n```python\r\nfrom lcu_connector import Connector\r\n\r\n# Method 01\r\nconn = Connector(start=True)\r\n\r\n# Method 02\r\nconn = Connector()\r\nconn.start()\r\n```\r\n\r\nNow have fun, the `Connector` object has the same attributes as the `requests` library and derivatives.\r\n```python\r\nfrom lcu_connector import Connector\r\n\r\nconn = Connector(start=True)\r\n\r\n# Getting the data of the currently connected summoner\r\nres = conn.get('/lol-summoner/v1/current-summoner')\r\nprint(res.json())\r\n\r\n# Getting a summoner's data by name\r\nsummoner_name = 'JohnDoe'\r\nres = conn.get('/lol-summoner/v1/summoners?name={summoner_name}')\r\nprint(res.json())\r\n\r\n# Performing POST request\r\ndata = {\r\n    'foo': 'bar'\r\n}\r\nres = conn.post('API_URL', data=data)\r\nif res.status_code == 200:\r\n    do_something()\r\n```\r\n\r\nVoc\u00c3\u00aa pode ver todos os links dispon\u00c3\u00adveis para o League Client atrav\u00c3\u00a9s do [LCU Explorer](https://github.com/HextechDocs/lcu-explorer).\r\n\r\n\r\n## To-do\r\n- [ ] Observador de eventos da API\r\n- [ ] Fun\u00c3\u00a7\u00c3\u00b5es integradas para tarefas mais utilizadas (como um get_summoner_by_name())\r\n- [ ] Documenta\u00c3\u00a7\u00c3\u00a3o mais detalhada\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy-to-use wrapper for the League Client API.",
    "version": "1.0.1",
    "split_keywords": [
        "league client",
        "league client api",
        "league client api wrapper",
        "api wrapperleague of legends",
        "league of legends api",
        "lcu-driver",
        "lcu driver",
        "lcu-connector",
        "lcu connector"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7eb340de76e5955416a41d683dac5911129b633a52d1884241a40920c8266fb3",
                "md5": "5873c9f2157f71d5b7e31c2a6122420b",
                "sha256": "8637d757f9d64172e762c248ef5d30b4f48adbddaec97912827e507e3e7dec34"
            },
            "downloads": -1,
            "filename": "LCU Connector-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5873c9f2157f71d5b7e31c2a6122420b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7085,
            "upload_time": "2023-04-15T01:01:54",
            "upload_time_iso_8601": "2023-04-15T01:01:54.845126Z",
            "url": "https://files.pythonhosted.org/packages/7e/b3/40de76e5955416a41d683dac5911129b633a52d1884241a40920c8266fb3/LCU%20Connector-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-15 01:01:54",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "lcu-connector"
}
        
Elapsed time: 0.05686s