Skip to content

Commit

Permalink
Fix HTTP request example and small mistakes in docs. Release 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sousa-andre committed Jul 5, 2020
1 parent f07a59c commit ff9572b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions docs/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ HTTP Requests
^^^^^^^^^^^^^
To easily make requests each connection provides a method wrapper around `aiohttp.Request <https://docs.aiohttp.org/en/stable/client_reference.html#aiohttp.request>`_ that allow us to make request without dealing with authentication or the port where it is running.

You can find more about the method `here <http://localhost:63342/lcu-driver/docs/_build/html/api/connection.html#lcu_driver.connection.Connection.request>`_.

If you don't know where to find the Client APIs documentation checkout out `Rift Explorer <https://github.com/Pupix/rift-explorer>`_.

.. literalinclude:: ../examples/tutorial/http_request.py
:language: python

You can find more about the method here.
You can find more about the method :meth:`here <lcu_driver.connection.Connection.request>`.

Websocket
^^^^^^^^^
Expand All @@ -49,7 +48,7 @@ URL Patterns
What if you wanted to subscribe to all summoner events? You can simple register `/lol-summoner/` and since it ends with a trailing slash it will match every event url starting with it.

Examples
-------
--------

**Not ending with trailing slash**
...................................
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorial/http_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
@connector.ready
async def connect(connection):
summoner = await connection.request('get', '/lol-summoner/v1/current-summoner')
print(summoner)
print(await summoner.json())

connector.start()

0 comments on commit ff9572b

Please sign in to comment.