Skip to content

Commit

Permalink
Fix flake8 for api filter methods
Browse files Browse the repository at this point in the history
Signed-off-by: pik <alexander.maznev@gmail.com>
  • Loading branch information
pik committed Mar 10, 2017
1 parent 68bb101 commit b741c46
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions matrix_client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

MATRIX_V2_API_PATH = "/_matrix/client/r0"


class MatrixHttpApi(object):
"""Contains all raw Matrix HTTP Client-Server API calls.
Expand Down Expand Up @@ -449,17 +450,15 @@ def get_emote_body(self, text):
}

def get_filter(self, user_id, filter_id):
return self._send("GET",
"/user/{userId}/filter/{filterId}".format(userId=user_id, filterId=filter_id),
api_path=MATRIX_V2_API_PATH
)
return self._send("GET", "/user/{userId}/filter/{filterId}"
.format(userId=user_id, filterId=filter_id),
api_path=MATRIX_V2_API_PATH)

def create_filter(self, user_id, filter_params):
return self._send("POST",
"/user/{userId}/filter".format(userId=user_id),
filter_params,
api_path=MATRIX_V2_API_PATH
)
"/user/{userId}/filter".format(userId=user_id),
filter_params,
api_path=MATRIX_V2_API_PATH)

def _send(self, method, path, content=None, query_params={}, headers={},
api_path="/_matrix/client/api/v1"):
Expand Down

0 comments on commit b741c46

Please sign in to comment.