Fixed some typos

This commit is contained in:
spla 2022-10-04 19:03:07 +02:00
pare bfad337e52
commit 87f1447f78

Veure arxiu

@ -1,5 +1,4 @@
import requests import requests
import json
import pdb import pdb
class MisskeyAPI: class MisskeyAPI:
@ -93,7 +92,7 @@ class MisskeyAPI:
try: try:
if session: 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() response = ret.json()
else: else:
response = requests.post(self.api_base_url + '/api/app/create', json=params, timeout=self.request_timeout) response = requests.post(self.api_base_url + '/api/app/create', json=params, timeout=self.request_timeout)
@ -113,7 +112,7 @@ class MisskeyAPI:
try: try:
if session: 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() response = ret.json()
else: else:
response = requests.post(self.api_base_url + '/api/app/show', json=params, timeout=self.request_timeout) 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""" """Raised when a stream times out"""
pass pass
class MisskeyAPIError(MisskeyError): 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 pass
class MisskeyServerError(MisskeyAPIError): class MisskeyServerError(MisskeyAPIError):
"""Raised if the Server is malconfigured and returns a 5xx error code""" """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""" """Raised if the Server returns a 504 error"""
pass pass
class MisskeyNotFoundError(MisskeyAPIError): 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 pass
class MisskeyUnauthorizedError(MisskeyAPIError): 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, 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 or when trying to access an endpoint that can't be used without