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 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