|
10 | 10 |
|
11 | 11 | from typing import Any, List, Dict, Optional, Union
|
12 | 12 |
|
13 |
| -from galaxy.api.types import Achievement, Game, LocalGame, FriendInfo, GameTime, UserInfo, Room |
| 13 | +from galaxy.api.types import Achievement, Game, LocalGame, FriendInfo, GameTime |
14 | 14 |
|
15 | 15 | from galaxy.api.jsonrpc import Server, NotificationClient, ApplicationError
|
16 | 16 | from galaxy.api.consts import Feature
|
17 | 17 | from galaxy.api.errors import UnknownError, ImportInProgress
|
18 |
| -from galaxy.api.types import Authentication, NextStep, Message |
| 18 | +from galaxy.api.types import Authentication, NextStep |
19 | 19 |
|
20 | 20 |
|
21 | 21 | class JSONEncoder(json.JSONEncoder):
|
@@ -122,40 +122,6 @@ def eof_handler():
|
122 | 122 | result_name="friend_info_list",
|
123 | 123 | feature=Feature.ImportFriends
|
124 | 124 | )
|
125 |
| - self._register_method( |
126 |
| - "import_user_infos", |
127 |
| - self.get_users, |
128 |
| - result_name="user_info_list", |
129 |
| - feature=Feature.ImportUsers |
130 |
| - ) |
131 |
| - self._register_method( |
132 |
| - "send_message", |
133 |
| - self.send_message, |
134 |
| - feature=Feature.Chat |
135 |
| - ) |
136 |
| - self._register_method( |
137 |
| - "mark_as_read", |
138 |
| - self.mark_as_read, |
139 |
| - feature=Feature.Chat |
140 |
| - ) |
141 |
| - self._register_method( |
142 |
| - "import_rooms", |
143 |
| - self.get_rooms, |
144 |
| - result_name="rooms", |
145 |
| - feature=Feature.Chat |
146 |
| - ) |
147 |
| - self._register_method( |
148 |
| - "import_room_history_from_message", |
149 |
| - self.get_room_history_from_message, |
150 |
| - result_name="messages", |
151 |
| - feature=Feature.Chat |
152 |
| - ) |
153 |
| - self._register_method( |
154 |
| - "import_room_history_from_timestamp", |
155 |
| - self.get_room_history_from_timestamp, |
156 |
| - result_name="messages", |
157 |
| - feature=Feature.Chat |
158 |
| - ) |
159 | 125 | self._register_method(
|
160 | 126 | "import_game_times",
|
161 | 127 | self.get_game_times,
|
@@ -441,26 +407,6 @@ def remove_friend(self, user_id: str) -> None:
|
441 | 407 | params = {"user_id": user_id}
|
442 | 408 | self._notification_client.notify("friend_removed", params)
|
443 | 409 |
|
444 |
| - def update_room( |
445 |
| - self, |
446 |
| - room_id: str, |
447 |
| - unread_message_count: Optional[int]=None, |
448 |
| - new_messages: Optional[List[Message]]=None |
449 |
| - ) -> None: |
450 |
| - """WIP, Notify the client to update the information regarding |
451 |
| - a chat room that the currently authenticated user is in. |
452 |
| -
|
453 |
| - :param room_id: id of the room to update |
454 |
| - :param unread_message_count: information about the new unread message count in the room |
455 |
| - :param new_messages: list of new messages that the user received |
456 |
| - """ |
457 |
| - params = {"room_id": room_id} |
458 |
| - if unread_message_count is not None: |
459 |
| - params["unread_message_count"] = unread_message_count |
460 |
| - if new_messages is not None: |
461 |
| - params["messages"] = new_messages |
462 |
| - self._notification_client.notify("chat_room_updated", params) |
463 |
| - |
464 | 410 | def update_game_time(self, game_time: GameTime) -> None:
|
465 | 411 | """Notify the client to update game time for a game.
|
466 | 412 |
|
@@ -772,57 +718,6 @@ async def get_friends(self):
|
772 | 718 | """
|
773 | 719 | raise NotImplementedError()
|
774 | 720 |
|
775 |
| - async def get_users(self, user_id_list: List[str]) -> List[UserInfo]: |
776 |
| - """WIP, Override this method to return the list of users matching the provided ids. |
777 |
| - This method is called by the GOG Galaxy Client. |
778 |
| -
|
779 |
| - :param user_id_list: list of user ids |
780 |
| - """ |
781 |
| - raise NotImplementedError() |
782 |
| - |
783 |
| - async def send_message(self, room_id: str, message_text: str) -> None: |
784 |
| - """WIP, Override this method to send message to a chat room. |
785 |
| - This method is called by the GOG Galaxy Client. |
786 |
| -
|
787 |
| - :param room_id: id of the room to which the message should be sent |
788 |
| - :param message_text: text which should be sent in the message |
789 |
| - """ |
790 |
| - raise NotImplementedError() |
791 |
| - |
792 |
| - async def mark_as_read(self, room_id: str, last_message_id: str) -> None: |
793 |
| - """WIP, Override this method to mark messages in a chat room as read up to the id provided in the parameter. |
794 |
| - This method is called by the GOG Galaxy Client. |
795 |
| -
|
796 |
| - :param room_id: id of the room |
797 |
| - :param last_message_id: id of the last message; room is marked as read only if this id matches |
798 |
| - the last message id known to the client |
799 |
| - """ |
800 |
| - raise NotImplementedError() |
801 |
| - |
802 |
| - async def get_rooms(self) -> List[Room]: |
803 |
| - """WIP, Override this method to return the chat rooms in which the user is currently in. |
804 |
| - This method is called by the GOG Galaxy Client |
805 |
| - """ |
806 |
| - raise NotImplementedError() |
807 |
| - |
808 |
| - async def get_room_history_from_message(self, room_id: str, message_id: str) -> List[Message]: |
809 |
| - """WIP, Override this method to return the chat room history since the message provided in parameter. |
810 |
| - This method is called by the GOG Galaxy Client. |
811 |
| -
|
812 |
| - :param room_id: id of the room |
813 |
| - :param message_id: id of the message since which the history should be retrieved |
814 |
| - """ |
815 |
| - raise NotImplementedError() |
816 |
| - |
817 |
| - async def get_room_history_from_timestamp(self, room_id: str, from_timestamp: int) -> List[Message]: |
818 |
| - """WIP, Override this method to return the chat room history since the timestamp provided in parameter. |
819 |
| - This method is called by the GOG Galaxy Client. |
820 |
| -
|
821 |
| - :param room_id: id of the room |
822 |
| - :param from_timestamp: timestamp since which the history should be retrieved |
823 |
| - """ |
824 |
| - raise NotImplementedError() |
825 |
| - |
826 | 721 | async def get_game_times(self) -> List[GameTime]:
|
827 | 722 | """
|
828 | 723 | .. deprecated:: 0.33
|
|
0 commit comments