Cleanup and fix setup.py

This commit is contained in:
Tulir Asokan
2018-02-10 14:58:17 +02:00
parent 8fc8cf0dd8
commit c7f28fe33f
4 changed files with 3 additions and 24 deletions
-20
View File
@@ -7,20 +7,6 @@ from matrix_client.errors import MatrixError, MatrixRequestError
class AsyncHTTPAPI(MatrixHttpApi):
"""
Contains all raw matrix HTTP client-server API calls using asyncio and coroutines.
Examples
--------
.. code-block: python
async def main():
async with aiohttp.ClientSession() as session:
mapi = AsyncHTTPAPI("http://matrix.org", session)
resp = await mapi.get_room_id("#matrix:matrix.org")
print(resp)
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
"""
def __init__(self, base_url, client_session, token=None, identity=None):
self.base_url = base_url
self.token = token
@@ -79,12 +65,6 @@ class AsyncHTTPAPI(MatrixHttpApi):
return content.get('avatar_url', None)
async def get_room_id(self, room_alias):
"""Get room id from its alias
Args:
room_alias(str): The room alias name.
Returns:
Wanted room's id.
"""
content = await self._send(
"GET",
"/directory/room/{}".format(quote(room_alias)),