From 87f1447f78ce7b7d295d03658ca3118e50771399 Mon Sep 17 00:00:00 2001 From: spla Date: Tue, 4 Oct 2022 19:03:07 +0200 Subject: [PATCH] Fixed some typos --- misskey/misskeyapi.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/misskey/misskeyapi.py b/misskey/misskeyapi.py index ba21d70..5f2c700 100644 --- a/misskey/misskeyapi.py +++ b/misskey/misskeyapi.py @@ -1,5 +1,4 @@ import requests -import json import pdb class MisskeyAPI: @@ -93,7 +92,7 @@ class MisskeyAPI: try: if session: - ret = session.post(self.api_base_url + '/api/app/create', json=request_data, timeout=self.request_timeout) + ret = session.post(self.api_base_url + '/api/app/create', json=params, timeout=self.request_timeout) response = ret.json() else: response = requests.post(self.api_base_url + '/api/app/create', json=params, timeout=self.request_timeout) @@ -113,7 +112,7 @@ class MisskeyAPI: try: if session: - ret = session.post(self.api_base_url + '/api/app/show', json=request_data, timeout=self.request_timeout) + ret = session.post(self.api_base_url + '/api/app/show', json=params, timeout=self.request_timeout) response = ret.json() else: response = requests.post(self.api_base_url + '/api/app/show', json=params, timeout=self.request_timeout) @@ -286,7 +285,7 @@ class MisskeyReadTimeout(MisskeyNetworkError): """Raised when a stream times out""" pass class MisskeyAPIError(MisskeyError): - """Raised when the mastodon API generates a response that cannot be handled""" + """Raised when the Misskey API generates a response that cannot be handled""" pass class MisskeyServerError(MisskeyAPIError): """Raised if the Server is malconfigured and returns a 5xx error code""" @@ -307,11 +306,11 @@ class MisskeyGatewayTimeoutError(MisskeyServerError): """Raised if the Server returns a 504 error""" pass class MisskeyNotFoundError(MisskeyAPIError): - """Raised when the ejabberd API returns a 404 Not Found error""" + """Raised when the Misskey API returns a 404 Not Found error""" pass class MisskeyUnauthorizedError(MisskeyAPIError): - """Raised when the ejabberd API returns a 401 Unauthorized error + """Raised when the Misskey API returns a 401 Unauthorized error This happens when an OAuth token is invalid or has been revoked, or when trying to access an endpoint that can't be used without