File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 47
47
from motor .motor_asyncio import AsyncIOMotorClient
48
48
49
49
from core .changelog import Changelog
50
- from core .clients import DatabaseClient , PluginDatabaseClient
50
+ from core .clients import ApiClient , PluginDatabaseClient
51
51
from core .config import ConfigManager
52
52
from core .utils import info , error , human_join
53
53
from core .models import PermissionLevel
@@ -108,7 +108,7 @@ def __init__(self):
108
108
self ._configure_logging ()
109
109
# TODO: Raise fatal error if mongo_uri or other essentials are not found
110
110
self ._db = AsyncIOMotorClient (self .config .mongo_uri ).modmail_bot
111
- self ._api = DatabaseClient (self )
111
+ self ._api = ApiClient (self )
112
112
self .plugin_db = PluginDatabaseClient (self )
113
113
114
114
self .metadata_task = self .loop .create_task (self .metadata_loop ())
@@ -158,7 +158,7 @@ def db(self) -> typing.Optional[AsyncIOMotorClient]:
158
158
return self ._db
159
159
160
160
@property
161
- def api (self ) -> DatabaseClient :
161
+ def api (self ) -> ApiClient :
162
162
return self ._api
163
163
164
164
@property
Original file line number Diff line number Diff line change 19
19
prefix = ''
20
20
21
21
22
- class ApiClient :
22
+ class RequestClient :
23
23
"""
24
24
This class represents the general request class for all type of clients.
25
25
@@ -107,7 +107,7 @@ def filter_valid(self, data):
107
107
return {k : v for k , v in data .items () if k in valid_keys }
108
108
109
109
110
- class GitHub (ApiClient ):
110
+ class GitHub (RequestClient ):
111
111
"""
112
112
The client for interacting with GitHub API.
113
113
@@ -255,7 +255,7 @@ async def login(cls, bot) -> 'GitHub':
255
255
return self
256
256
257
257
258
- class DatabaseClient ( ApiClient ):
258
+ class ApiClient ( RequestClient ):
259
259
260
260
def __init__ (self , bot ):
261
261
super ().__init__ (bot )
You can’t perform that action at this time.
0 commit comments