Module: nintendo.nex.friends

Provides a client and server for the FriendsProtocolV1 and FriendsProtocolV2. This page was generated automatically from friends.proto.

class FriendsClientV1
The client for the FriendsProtocolV1.

class FriendsClientV2
The client for the FriendsProtocolV2.

class FriendsServerV1
The server for the FriendsProtocolV1.

class FriendsServerV2
The server for the FriendsProtocolV2.

class AccountExtraInfo(Structure)
class BlacklistedPrincipal(Data)
class Comment(Data)
class FriendComment(Data)
class FriendInfo(Data)
class FriendKey(Structure)
class FriendMii(Data)
class FriendMiiList(Data)
class FriendPersistentInfo(Data)
class FriendPicture(Data)
class FriendPresence(Data)
class FriendRelationship(Data)
class FriendRequest(Data)
class FriendRequestMessage(Data)
class GameKey(Data)
class Mii(Data)
class MiiList(Data)
class MiiV2(Data)
class MyProfile(Data)
class NNAInfo(Data)
class NintendoCreateAccountData(Data)
class NintendoPresence(Data)
class NintendoPresenceV2(Data)
class PersistentNotification(Data)
class PlayedGame(Data)
class PrincipalBasicInfo(Data)
class PrincipalPreference(Data)
class PrincipalRequestBlockSetting(Data)

FriendsClientV1

def __init__(client: RMCClient / HppClient)
Creates a new FriendsClientV1.

async def update_profile(profile_data: MyProfile) -> None
Calls method 1 on the server.

async def update_mii(mii: Mii) -> None
Calls method 2 on the server.

async def update_mii_list(mii_list: MiiList) -> None
Calls method 3 on the server.

async def update_played_games(played_games: list[PlayedGame]) -> None
Calls method 4 on the server.

async def update_preference(show_online_status: bool, show_current_title: bool, block_friend_requests: bool) -> None
Calls method 5 on the server.

async def get_friend_mii(friends: list[FriendKey]) -> list[FriendMii]
Calls method 6 on the server.

async def get_friend_mii_list(friends: list[FriendKey]) -> list[FriendMiiList]
Calls method 7 on the server.

async def is_active_game(unk1: list[int], game_key: GameKey) -> list[int]
Calls method 8 on the server.

async def get_principal_id_by_local_friend_code(unk1: int, unk2: list[int]) -> list[FriendRelationship]
Calls method 9 on the server.

async def get_friend_relationships(principal_ids: list[int]) -> list[FriendRelationship]
Calls method 10 on the server.

async def add_friend_by_principal_id(friend_seed: int, pid: int) -> FriendRelationship
Calls method 11 on the server.

async def add_friend_by_principal_ids(unk: int, pids: list[int]) -> list[FriendRelationship]
Calls method 12 on the server.

async def remove_friend_by_local_friend_code(friend_code: int) -> None
Calls method 13 on the server.

async def remove_friend_by_principal_id(pid: int) -> None
Calls method 14 on the server.

async def get_all_friends() -> list[FriendRelationship]
Calls method 15 on the server.

async def update_black_list(unk: list[int]) -> None
Calls method 16 on the server.

async def sync_friend(friend_seed: int, principal_ids: list[int], unk: list[int]) -> list[FriendRelationship]
Calls method 17 on the server.

async def update_presence(presence_info: NintendoPresence, unk: bool) -> None
Calls method 18 on the server.

async def update_favorite_game_key(game_key: GameKey) -> None
Calls method 19 on the server.

async def update_comment(comment: str) -> None
Calls method 20 on the server.

async def update_picture(unk: int, picture: bytes) -> None
Calls method 21 on the server.

async def get_friend_presence(principal_ids: list[int]) -> list[FriendPresence]
Calls method 22 on the server.

async def get_friend_comment(friends: list[FriendKey]) -> list[FriendComment]
Calls method 23 on the server.

async def get_friend_picture(principal_ids: list[int]) -> list[FriendPicture]
Calls method 24 on the server.

async def get_friend_persistent_info(principal_ids: list[int]) -> list[FriendPersistentInfo]
Calls method 25 on the server.

async def send_invitation(unk: list[int]) -> None
Calls method 26 on the server.

FriendsClientV2

def __init__(client: RMCClient / HppClient)
Creates a new FriendsClientV2.

async def update_and_get_all_information(nna_info: NNAInfo, presence: NintendoPresenceV2, birthday: DateTime) -> RMCResponse
Calls method 1 on the server. The RMC response has the following attributes:
principal_preference: PrincipalPreference
comment: Comment
friends: list[FriendInfo]
sent_requests: list[FriendRequest]
received_requests: list[FriendRequest]
blacklist: list[BlacklistedPrincipal]
unk1: bool
notifications: list[PersistentNotification]
unk2: bool

async def add_friend(pid: int) -> RMCResponse
Calls method 2 on the server. The RMC response has the following attributes:
request: FriendRequest
info: FriendInfo

async def add_friend_by_name(name: str) -> RMCResponse
Calls method 3 on the server. The RMC response has the following attributes:
request: FriendRequest
info: FriendInfo

async def remove_friend(pid: int) -> None
Calls method 4 on the server.

async def add_friend_request(unk1: int, unk2: int, unk3: str, unk4: int, unk5: str, game_key: GameKey, unk6: DateTime) -> RMCResponse
Calls method 5 on the server. The RMC response has the following attributes:
request: FriendRequest
info: FriendInfo

async def cancel_friend_request(id: int) -> None
Calls method 6 on the server.

async def accept_friend_request(id: int) -> FriendInfo
Calls method 7 on the server.

async def delete_friend_request(id: int) -> None
Calls method 8 on the server.

async def deny_friend_request(id: int) -> BlacklistedPrincipal
Calls method 9 on the server.

async def mark_friend_requests_as_received(ids: list[int]) -> None
Calls method 10 on the server.

async def add_black_list(principal: BlacklistedPrincipal) -> BlacklistedPrincipal
Calls method 11 on the server.

async def remove_black_list(pid: int) -> None
Calls method 12 on the server.

async def update_presence(presence: NintendoPresenceV2) -> None
Calls method 13 on the server.

async def update_mii(mii: MiiV2) -> DateTime
Calls method 14 on the server.

async def update_comment(comment: Comment) -> DateTime
Calls method 15 on the server.

async def update_preference(preference: PrincipalPreference) -> None
Calls method 16 on the server.

async def get_basic_info(pids: list[int]) -> list[PrincipalBasicInfo]
Calls method 17 on the server.

async def delete_persistent_notification(notifications: list[PersistentNotification]) -> None
Calls method 18 on the server.

async def check_setting_status() -> int
Calls method 19 on the server.

async def get_request_block_settings(unk: list[int]) -> list[PrincipalRequestBlockSetting]
Calls method 20 on the server.

FriendsServerV1

def __init__()
Creates a new FriendsServerV1.

async def logout(client: RMCClient) -> None
Called whenever a client is disconnected. May be overridden by a subclass.

async def update_profile(client: RMCClient, profile_data: MyProfile) -> None
Handler for method 1. This method should be overridden by a subclass.

async def update_mii(client: RMCClient, mii: Mii) -> None
Handler for method 2. This method should be overridden by a subclass.

async def update_mii_list(client: RMCClient, mii_list: MiiList) -> None
Handler for method 3. This method should be overridden by a subclass.

async def update_played_games(client: RMCClient, played_games: list[PlayedGame]) -> None
Handler for method 4. This method should be overridden by a subclass.

async def update_preference(client: RMCClient, show_online_status: bool, show_current_title: bool, block_friend_requests: bool) -> None
Handler for method 5. This method should be overridden by a subclass.

async def get_friend_mii(client: RMCClient, friends: list[FriendKey]) -> list[FriendMii]
Handler for method 6. This method should be overridden by a subclass.

async def get_friend_mii_list(client: RMCClient, friends: list[FriendKey]) -> list[FriendMiiList]
Handler for method 7. This method should be overridden by a subclass.

async def is_active_game(client: RMCClient, unk1: list[int], game_key: GameKey) -> list[int]
Handler for method 8. This method should be overridden by a subclass.

async def get_principal_id_by_local_friend_code(client: RMCClient, unk1: int, unk2: list[int]) -> list[FriendRelationship]
Handler for method 9. This method should be overridden by a subclass.

async def get_friend_relationships(client: RMCClient, principal_ids: list[int]) -> list[FriendRelationship]
Handler for method 10. This method should be overridden by a subclass.

async def add_friend_by_principal_id(client: RMCClient, friend_seed: int, pid: int) -> FriendRelationship
Handler for method 11. This method should be overridden by a subclass.

async def add_friend_by_principal_ids(client: RMCClient, unk: int, pids: list[int]) -> list[FriendRelationship]
Handler for method 12. This method should be overridden by a subclass.

async def remove_friend_by_local_friend_code(client: RMCClient, friend_code: int) -> None
Handler for method 13. This method should be overridden by a subclass.

async def remove_friend_by_principal_id(client: RMCClient, pid: int) -> None
Handler for method 14. This method should be overridden by a subclass.

async def get_all_friends(client: RMCClient) -> list[FriendRelationship]
Handler for method 15. This method should be overridden by a subclass.

async def update_black_list(client: RMCClient, unk: list[int]) -> None
Handler for method 16. This method should be overridden by a subclass.

async def sync_friend(client: RMCClient, friend_seed: int, principal_ids: list[int], unk: list[int]) -> list[FriendRelationship]
Handler for method 17. This method should be overridden by a subclass.

async def update_presence(client: RMCClient, presence_info: NintendoPresence, unk: bool) -> None
Handler for method 18. This method should be overridden by a subclass.

async def update_favorite_game_key(client: RMCClient, game_key: GameKey) -> None
Handler for method 19. This method should be overridden by a subclass.

async def update_comment(client: RMCClient, comment: str) -> None
Handler for method 20. This method should be overridden by a subclass.

async def update_picture(client: RMCClient, unk: int, picture: bytes) -> None
Handler for method 21. This method should be overridden by a subclass.

async def get_friend_presence(client: RMCClient, principal_ids: list[int]) -> list[FriendPresence]
Handler for method 22. This method should be overridden by a subclass.

async def get_friend_comment(client: RMCClient, friends: list[FriendKey]) -> list[FriendComment]
Handler for method 23. This method should be overridden by a subclass.

async def get_friend_picture(client: RMCClient, principal_ids: list[int]) -> list[FriendPicture]
Handler for method 24. This method should be overridden by a subclass.

async def get_friend_persistent_info(client: RMCClient, principal_ids: list[int]) -> list[FriendPersistentInfo]
Handler for method 25. This method should be overridden by a subclass.

async def send_invitation(client: RMCClient, unk: list[int]) -> None
Handler for method 26. This method should be overridden by a subclass.

FriendsServerV2

def __init__()
Creates a new FriendsServerV2.

async def logout(client: RMCClient) -> None
Called whenever a client is disconnected. May be overridden by a subclass.

async def update_and_get_all_information(client: RMCClient, nna_info: NNAInfo, presence: NintendoPresenceV2, birthday: DateTime) -> RMCResponse
Handler for method 1. This method should be overridden by a subclass. The RMC response must have the following attributes:
principal_preference: PrincipalPreference
comment: Comment
friends: list[FriendInfo]
sent_requests: list[FriendRequest]
received_requests: list[FriendRequest]
blacklist: list[BlacklistedPrincipal]
unk1: bool
notifications: list[PersistentNotification]
unk2: bool

async def add_friend(client: RMCClient, pid: int) -> RMCResponse
Handler for method 2. This method should be overridden by a subclass. The RMC response must have the following attributes:
request: FriendRequest
info: FriendInfo

async def add_friend_by_name(client: RMCClient, name: str) -> RMCResponse
Handler for method 3. This method should be overridden by a subclass. The RMC response must have the following attributes:
request: FriendRequest
info: FriendInfo

async def remove_friend(client: RMCClient, pid: int) -> None
Handler for method 4. This method should be overridden by a subclass.

async def add_friend_request(client: RMCClient, unk1: int, unk2: int, unk3: str, unk4: int, unk5: str, game_key: GameKey, unk6: DateTime) -> RMCResponse
Handler for method 5. This method should be overridden by a subclass. The RMC response must have the following attributes:
request: FriendRequest
info: FriendInfo

async def cancel_friend_request(client: RMCClient, id: int) -> None
Handler for method 6. This method should be overridden by a subclass.

async def accept_friend_request(client: RMCClient, id: int) -> FriendInfo
Handler for method 7. This method should be overridden by a subclass.

async def delete_friend_request(client: RMCClient, id: int) -> None
Handler for method 8. This method should be overridden by a subclass.

async def deny_friend_request(client: RMCClient, id: int) -> BlacklistedPrincipal
Handler for method 9. This method should be overridden by a subclass.

async def mark_friend_requests_as_received(client: RMCClient, ids: list[int]) -> None
Handler for method 10. This method should be overridden by a subclass.

async def add_black_list(client: RMCClient, principal: BlacklistedPrincipal) -> BlacklistedPrincipal
Handler for method 11. This method should be overridden by a subclass.

async def remove_black_list(client: RMCClient, pid: int) -> None
Handler for method 12. This method should be overridden by a subclass.

async def update_presence(client: RMCClient, presence: NintendoPresenceV2) -> None
Handler for method 13. This method should be overridden by a subclass.

async def update_mii(client: RMCClient, mii: MiiV2) -> DateTime
Handler for method 14. This method should be overridden by a subclass.

async def update_comment(client: RMCClient, comment: Comment) -> DateTime
Handler for method 15. This method should be overridden by a subclass.

async def update_preference(client: RMCClient, preference: PrincipalPreference) -> None
Handler for method 16. This method should be overridden by a subclass.

async def get_basic_info(client: RMCClient, pids: list[int]) -> list[PrincipalBasicInfo]
Handler for method 17. This method should be overridden by a subclass.

async def delete_persistent_notification(client: RMCClient, notifications: list[PersistentNotification]) -> None
Handler for method 18. This method should be overridden by a subclass.

async def check_setting_status(client: RMCClient) -> int
Handler for method 19. This method should be overridden by a subclass.

async def get_request_block_settings(client: RMCClient, unk: list[int]) -> list[PrincipalRequestBlockSetting]
Handler for method 20. This method should be overridden by a subclass.

AccountExtraInfo

def __init__()
Creates a new AccountExtraInfo instance. Required fields must be filled in manually.

The following fields are defined in this class:
local_friend_code: int
move_count: int
token: str

BlacklistedPrincipal

def __init__()
Creates a new BlacklistedPrincipal instance. Required fields must be filled in manually.

The following fields are defined in this class:
principal_info: PrincipalBasicInfo = PrincipalBasicInfo()
game_key: GameKey = GameKey()
since: DateTime

Comment

def __init__()
Creates a new Comment instance. Required fields must be filled in manually.

The following fields are defined in this class:
unk: int
text: str
changed: DateTime

FriendComment

def __init__()
Creates a new FriendComment instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
comment: str
modified_at: DateTime

FriendInfo

def __init__()
Creates a new FriendInfo instance. Required fields must be filled in manually.

The following fields are defined in this class:
nna_info: NNAInfo = NNAInfo()
presence: NintendoPresenceV2 = NintendoPresenceV2()
comment: Comment = Comment()
befriended: DateTime
last_online: DateTime
unk: int

FriendKey

def __init__()
Creates a new FriendKey instance. Required fields must be filled in manually.

The following fields are defined in this class:
unk1: int
unk2: DateTime

FriendMii

def __init__()
Creates a new FriendMii instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
mii: Mii = Mii()
modified_at: DateTime

FriendMiiList

def __init__()
Creates a new FriendMiiList instance. Required fields must be filled in manually.

The following fields are defined in this class:
unk1: int
mii: MiiList = MiiList()
unk2: DateTime

FriendPersistentInfo

def __init__()
Creates a new FriendPersistentInfo instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
region: int
country: int
area: int
language: int
platform: int
game_key: GameKey = GameKey()
message: str
message_updated: DateTime
friended: DateTime
last_online: DateTime

FriendPicture

def __init__()
Creates a new FriendPicture instance. Required fields must be filled in manually.

The following fields are defined in this class:
unk: int
data: bytes
datetime: DateTime

FriendPresence

def __init__()
Creates a new FriendPresence instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
presence: NintendoPresence = NintendoPresence()

FriendRelationship

def __init__()
Creates a new FriendRelationship instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
friend_code: int
is_complete: int

FriendRequest

def __init__()
Creates a new FriendRequest instance. Required fields must be filled in manually.

The following fields are defined in this class:
principal_info: PrincipalBasicInfo = PrincipalBasicInfo()
message: FriendRequestMessage = FriendRequestMessage()
sent: DateTime

FriendRequestMessage

def __init__()
Creates a new FriendRequestMessage instance. Required fields must be filled in manually.

The following fields are defined in this class:
friend_request_id: int
unk1: int
unk2: int
message: str
unk3: int
string: str
game_key: GameKey = GameKey()
datetime: DateTime
expires: DateTime

GameKey

def __init__()
Creates a new GameKey instance. Required fields must be filled in manually.

The following fields are defined in this class:
title_id: int = 0
title_version: int = 0

Mii

def __init__()
Creates a new Mii instance. Required fields must be filled in manually.

The following fields are defined in this class:
name: str
unk1: bool
unk2: int
mii_data: bytes

MiiList

def __init__()
Creates a new MiiList instance. Required fields must be filled in manually.

The following fields are defined in this class:
unk1: str
unk2: bool
unk3: int
mii_datas: list[bytes]

MiiV2

def __init__()
Creates a new MiiV2 instance. Required fields must be filled in manually.

The following fields are defined in this class:
name: str
unk1: int = 0
unk2: int = 0
data: bytes
datetime: DateTime = DateTime.never()

MyProfile

def __init__()
Creates a new MyProfile instance. Required fields must be filled in manually.

The following fields are defined in this class:
region: int
country: int
area: int
language: int
platform: int
local_friend_code_seed: int
mac_address: str
serial_number: str

NNAInfo

def __init__()
Creates a new NNAInfo instance. Required fields must be filled in manually.

The following fields are defined in this class:
principal_info: PrincipalBasicInfo = PrincipalBasicInfo()
unk1: int = 94
unk2: int = 11

NintendoCreateAccountData

def __init__()
Creates a new NintendoCreateAccountData instance. Required fields must be filled in manually.

The following fields are defined in this class:
info: NNAInfo = NNAInfo()
token: str
birthday: DateTime
unk: int

NintendoPresence

def __init__()
Creates a new NintendoPresence instance. Required fields must be filled in manually.

The following fields are defined in this class:
changed_bit_flag: int
game_key: GameKey = GameKey()
game_mode_description: str
join_availability_flag: int
matchmake_system_type: int
join_game_id: int
join_game_mode: int
owner_pid: int
join_group_id: int
application_data: bytes

NintendoPresenceV2

def __init__()
Creates a new NintendoPresenceV2 instance. Required fields must be filled in manually.

The following fields are defined in this class:
flags: int = 0
is_online: bool = False
game_key: GameKey = GameKey()
unk1: int = 0
message: str = ""
unk2: int = 0
unk3: int = 0
game_server_id: int = 0
unk4: int = 0
pid: int = 0
gathering_id: int = 0
application_data: bytes = b""
unk5: int = 3
unk6: int = 3
unk7: int = 3

PersistentNotification

def __init__()
Creates a new PersistentNotification instance. Required fields must be filled in manually.

The following fields are defined in this class:
unk1: int
unk2: int
unk3: int
unk4: int
string: str

PlayedGame

def __init__()
Creates a new PlayedGame instance. Required fields must be filled in manually.

The following fields are defined in this class:
game_key: GameKey = GameKey()
datetime: DateTime

PrincipalBasicInfo

def __init__()
Creates a new PrincipalBasicInfo instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
nnid: str
mii: MiiV2 = MiiV2()
unk: int = 2

PrincipalPreference

def __init__()
Creates a new PrincipalPreference instance. Required fields must be filled in manually.

The following fields are defined in this class:
show_online_status: bool
show_current_title: bool
block_friend_requests: bool

PrincipalRequestBlockSetting

def __init__()
Creates a new PrincipalRequestBlockSetting instance. Required fields must be filled in manually.

The following fields are defined in this class:
pid: int
blocked: bool