Repository: Kinnay/NintendoClients
Branch: master
Commit: 55e85dd25b5e
Files: 186
Total size: 3.1 MB
Directory structure:
gitextract_9qevxi15/
├── .github/
│ ├── FUNDING.yml
│ └── workflows/
│ └── testing.yml
├── .gitignore
├── .readthedocs.yml
├── LICENSE
├── README.md
├── docs/
│ ├── changelog.md
│ ├── index.md
│ ├── reference/
│ │ ├── miis.md
│ │ ├── nasc.md
│ │ ├── nex/
│ │ │ ├── aauser.md
│ │ │ ├── account.md
│ │ │ ├── authentication.md
│ │ │ ├── backend.md
│ │ │ ├── common.md
│ │ │ ├── datastore.md
│ │ │ ├── datastore_miitopia_3ds.md
│ │ │ ├── datastore_smm.md
│ │ │ ├── datastore_smm2.md
│ │ │ ├── debug.md
│ │ │ ├── errors.md
│ │ │ ├── friends.md
│ │ │ ├── friends_3ds.md
│ │ │ ├── health.md
│ │ │ ├── hpp.md
│ │ │ ├── kerberos.md
│ │ │ ├── matchmaking.md
│ │ │ ├── matchmaking_eagle.md
│ │ │ ├── matchmaking_mhxx.md
│ │ │ ├── matchmaking_mk8.md
│ │ │ ├── matchmaking_mk8d.md
│ │ │ ├── messaging.md
│ │ │ ├── monitoring.md
│ │ │ ├── natcheck.md
│ │ │ ├── nattraversal.md
│ │ │ ├── nintendonotification.md
│ │ │ ├── notification.md
│ │ │ ├── prudp.md
│ │ │ ├── ranking.md
│ │ │ ├── ranking2.md
│ │ │ ├── ranking2_eagle.md
│ │ │ ├── ranking_mk8.md
│ │ │ ├── ranking_mk8d.md
│ │ │ ├── remotelog.md
│ │ │ ├── rmc.md
│ │ │ ├── screening.md
│ │ │ ├── secure.md
│ │ │ ├── settings.md
│ │ │ ├── streams.md
│ │ │ ├── subscriber.md
│ │ │ └── utility.md
│ │ ├── nnas.md
│ │ ├── switch/
│ │ │ ├── aauth.md
│ │ │ ├── atumn.md
│ │ │ ├── baas.md
│ │ │ ├── dauth.md
│ │ │ ├── dragons.md
│ │ │ ├── five.md
│ │ │ └── sun.md
│ │ └── switch.md
│ └── style.css
├── examples/
│ ├── 3ds/
│ │ └── friends.py
│ ├── custom/
│ │ ├── server.py
│ │ └── server_login.py
│ ├── switch/
│ │ ├── animalcrossing.py
│ │ ├── smm2_level.py
│ │ ├── smm2_ninji.py
│ │ └── system_update.py
│ └── wiiu/
│ ├── donkeykong.py
│ ├── friends.py
│ ├── mariokart.py
│ └── miis.py
├── generate_protocols.py
├── mkdocs.yml
├── nintendo/
│ ├── __init__.py
│ ├── files/
│ │ ├── cert/
│ │ │ ├── CTR_Common_Prod_1.der
│ │ │ ├── CTR_Common_Prod_1.key
│ │ │ ├── Nintendo_CA_G3.der
│ │ │ ├── Nintendo_Class_2_CA_G3.der
│ │ │ ├── Nintendo_Root_CA_G4.der
│ │ │ ├── Wii_U_Common_Prod_1.der
│ │ │ └── Wii_U_Common_Prod_1.key
│ │ ├── config/
│ │ │ ├── 3ds.cfg
│ │ │ ├── default.cfg
│ │ │ ├── friends.cfg
│ │ │ └── switch.cfg
│ │ └── proto/
│ │ ├── aauser.proto
│ │ ├── account.proto
│ │ ├── authentication.proto
│ │ ├── datastore.proto
│ │ ├── datastore_miitopia_3ds.proto
│ │ ├── datastore_smm.proto
│ │ ├── datastore_smm2.proto
│ │ ├── debug.proto
│ │ ├── friends.proto
│ │ ├── health.proto
│ │ ├── matchmaking.proto
│ │ ├── matchmaking_eagle.proto
│ │ ├── matchmaking_mhxx.proto
│ │ ├── matchmaking_mk8.proto
│ │ ├── matchmaking_mk8d.proto
│ │ ├── messaging.proto
│ │ ├── monitoring.proto
│ │ ├── nattraversal.proto
│ │ ├── nintendonotification.proto
│ │ ├── notification.proto
│ │ ├── ranking.proto
│ │ ├── ranking2.proto
│ │ ├── ranking2_eagle.proto
│ │ ├── ranking_mk8.proto
│ │ ├── ranking_mk8d.proto
│ │ ├── remotelog.proto
│ │ ├── screening.proto
│ │ ├── secure.proto
│ │ ├── subscriber.proto
│ │ └── utility.proto
│ ├── miis.py
│ ├── nasc.py
│ ├── nex/
│ │ ├── __init__.py
│ │ ├── aauser.py
│ │ ├── account.py
│ │ ├── authentication.py
│ │ ├── backend.py
│ │ ├── common.py
│ │ ├── datastore.py
│ │ ├── datastore_miitopia_3ds.py
│ │ ├── datastore_smm.py
│ │ ├── datastore_smm2.py
│ │ ├── debug.py
│ │ ├── errors.py
│ │ ├── friends.py
│ │ ├── health.py
│ │ ├── hpp.py
│ │ ├── kerberos.py
│ │ ├── matchmaking.py
│ │ ├── matchmaking_eagle.py
│ │ ├── matchmaking_mhxx.py
│ │ ├── matchmaking_mk8.py
│ │ ├── matchmaking_mk8d.py
│ │ ├── messaging.py
│ │ ├── monitoring.py
│ │ ├── natcheck.py
│ │ ├── nattraversal.py
│ │ ├── nintendonotification.py
│ │ ├── notification.py
│ │ ├── prudp.py
│ │ ├── ranking.py
│ │ ├── ranking2.py
│ │ ├── ranking2_eagle.py
│ │ ├── ranking_mk8.py
│ │ ├── ranking_mk8d.py
│ │ ├── remotelog.py
│ │ ├── rmc.py
│ │ ├── screening.py
│ │ ├── secure.py
│ │ ├── settings.py
│ │ ├── streams.py
│ │ ├── subscriber.py
│ │ └── utility.py
│ ├── nnas.py
│ ├── resources.py
│ └── switch/
│ ├── __init__.py
│ ├── aauth.py
│ ├── atumn.py
│ ├── baas.py
│ ├── common.py
│ ├── dauth.py
│ ├── dragons.py
│ ├── five.py
│ └── sun.py
├── setup.py
└── tests/
├── nex/
│ ├── test_backend.py
│ ├── test_common.py
│ ├── test_errors.py
│ ├── test_kerberos.py
│ ├── test_nex_streams.py
│ ├── test_prudp.py
│ ├── test_rmc.py
│ └── test_settings.py
└── switch/
├── test_aauth.py
├── test_atumn.py
├── test_baas.py
├── test_dauth.py
├── test_dragons.py
├── test_five.py
└── test_sun.py
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: [kinnay]
================================================
FILE: .github/workflows/testing.yml
================================================
name: Pytest
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
pytest:
runs-on: ubuntu-latest
name: Check code with Pytest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest trio
pip install .
- name: Run Pytest
run: pytest
================================================
FILE: .gitignore
================================================
/*.egg-info/
__pycache__/
/build/
/dist/
/site/
/private/
/*.bin
/*.jpg
================================================
FILE: .readthedocs.yml
================================================
# Read the Docs configuration file for MkDocs projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
mkdocs:
configuration: mkdocs.yml
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2017 Yannik Marchand
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
# Nintendo Clients
> :warning: Keep in mind that Nintendo bans Switch devices that show suspicious behavior. This package tries to mimic the behavior of a real Switch as closely as possible, but using it is at your own risk. Make sure that you know what you are doing.
This package implements a client for various 3DS, Wii U and Switch servers. Check out the [documentation](https://nintendoclients.readthedocs.io) for the list of servers that are currently supported.
For Switch servers, the latest system version that is currently supported is **22.1.0**.
For talk about research, feel free to join the [Discord server](https://discord.gg/x8np6Hhxwk) or open a [discussion](https://github.com/kinnay/NintendoClients/discussions) on GitHub.
### Installation
This package requires Python 3.8 or later and can be installed with pip: `pip install nintendoclients`. This package uses [semantic versioning](https://semver.org/).
### Documentation
* [Nintendo's servers and protocols](https://github.com/Kinnay/NintendoClients/wiki)
* [The classes and functions in this package](https://nintendoclients.readthedocs.io)
### Example scripts
* **switch/**
* **smm2_level.py:** Downloads a Super Mario Maker 2 level and its thumbnails, and prints information about both the level and its creator.
* **smm2_ninji.py:** Requests the list of ninji courses and downloads a replay file.
* **animalcrossing.py:** Searches for an island by dodo code and prints information about it.
* **system_update.py:** Downloads the latest system update and unpacks it into exefs and romfs.
* **wiiu/**
* **donkeykong.py:** Downloads DKC Tropical Freeze rankings and the replay file of the world record.
* **mariokart.py:** Downloads Mario Kart 8 rankings and the replay file of whoever is in 500th place.
* **miis.py:** Requests all kinds of information about the primary mii associated with a NNID.
* **friends.py:** Requests your friend list, incoming and outgoing friend requests, and blacklist.
* **3ds/**
* **friends.py:** Changes your comment to 'Hello World'.
* **custom/**
* **server.py:** Shows how to create a simple game server with both an authentication server and a secure server.
* **server_login.py:** Logs in on a game server and disconnects immediately. This can be used to test custom servers.
### Sponsorship
Consider becoming a [sponsor](https://github.com/sponsors/kinnay) if you would like to support this project.
If you become a sponsor, I will be able to spend more time on this project, which will lead to faster updates. In addition, you will be given priority for personal support and feature suggestions.
================================================
FILE: docs/changelog.md
================================================
## Changelog
### 4.4.0
* Added support for Switch system version 22.0.0 and 22.1.0.
*Released on 2026-04-14*
### 4.3.0
* Added support for Switch system version 21.2.0.
*Released on 2026-01-15*
### 4.2.0
* **Bug fix:** fix `MatchmakeSession` structure being parsed incorrectly on Nintendo Switch.
* **Bug fix:** make a distinction between `AnyDataHolder` and `GatheringHolder` structures in NEX.
* Added support for Switch system version 20.5.0 up to 21.1.0.
* Added names for previously unknown fields in the `SimpleSearchObject` structure of MK8D.
*Released on 2026-01-02*
### 4.1.0
* Added support for Switch system version 20.2.0 up to 20.4.0.
* Added support for the matchmaking protocol of Monster Hunter XX (3DS).
* Implemented RankingClient::GetScorePack for MK8D.
* Minor bug fixes.
*Released on 2025-09-19*
### 4.0.2
* Disable `device_token` and `edge_token` on system version 20.0.0 and later to avoid accidental usage.
*Released on 2025-06-21*
### 4.0.1
* **Bug fix:** using `device_token` or `edge_token` on system version 20.0.0 and later would send an invalid request to the server. This is now fixed.
**NOTE:** It is recommended to use one of the `preload_*` functions or the `DAuthCache` class on system version 20.0.0 and later, to mimic the behavior of a real Switch.
*Released on 2025-06-21*
### 4.0.0
* **Breaking change:** some unknown fields in the `nintendo.nex.friends` module were given a name. If you were using the placeholder names in your code, update your code to use the new names.
* Added support for Switch system version 20.0.0 up to 20.1.5.
* Added various client ids for dauth, such as `er`, `sprofile` and `penne`.
* Implemented a dauth cache that mimics the preloading behavior that was introduced in 20.0.0.
* Added support for the ranking and matchmaking protocols of Mario Kart 8 (Wii U).
*Released on 2025-06-21*
### 3.0.3
* **Bug fix:** fixed typo, changed `BANNED_DEIVCE` to `BANNED_DEVICE` in `DAuthError` class.
*Released on 2024-12-28*
### 3.0.2
* **Bug fix:** fixed base64 decoding of dauth challenge. This fixes a bug that caused dauth to fail after a recent server update.
*Released on 2024-12-26*
### 3.0.1
* **Bug fix:** 19.0.1 support was missing in the previous release.
*Released on 2024-12-02*
### 3.0.0
* **Breaking change:** replaced `pkg_resources` by `importlib.resources`. This increases the minimum Python version to 3.11.
* **Bug fix**: removed ampersand before `device_auth_token` parameter in aauth challenge requests for 18.0.0+.
* **Bug fix**: added missing `naCountry` parameter to baas login requests for 18.0.0+.
* Added support for system version 19.0.0 and 19.0.1.
*Released on 2024-12-02*
### 2.2.1
* Fixed the header order in the dauth flow for system version 18.0.0 and later.
*Released on 2024-08-06*
### 2.2.0
* Added support for system version 18.1.0.
*Released on 2024-06-29*
### 2.1.0
* Added support for system version 17.0.1, 18.0.0 and 18.0.1.
* Added support for Switch gamecard authentication.
* Added support for the data store protocol of Miitopia 3DS.
*Released on 2024-05-04*
### 2.0.1
* **Bug fix**: added `nintendo.switch` to setup.py. The whole `nintendo.switch` folder was missing in the previous release.
*Released on 2023-11-12*
### 2.0.0
* **Breaking change:** moved all Switch-related clients into their own namespace. For example, `nintendo.dauth` is now `nintendo.switch.dauth`.
* **Breaking change:** dauth client ids are now global constants instead of members of `DAuthClient`.
* Implemented a client for the sun server (system update metadata).
* Implemented a client for the atumn server (system update content).
*Released on 2023-10-29*
### 1.1.0
* Added support for system version 17.0.0.
* Added default values to `RankingOrderParam.offset` and `RankingOrderParam.count`.
*Released on 2023-10-19*
### 1.0.0
First release with a changelog. Currently, the package implements everything that is required to communicate with NEX servers.
*Released on 2023-10-13*
================================================
FILE: docs/index.md
================================================
## Welcome to NintendoClients
This package lets you communicate with various 3DS, Wii U and Switch servers. For documentation about the servers and protocols click [here](https://github.com/kinnay/nintendo/wiki).
* [Features](#features)
* [Contributing](#contributing)
* [API Reference](#api-reference)
* [Changelog](changelog.md)
## Features
This package is able to do everything that's required to access a game server. It also provides a framework to host your own game servers. For example scripts, check out the [github repository](https://github.com/kinnay/nintendo). The following servers are currently supported:
* Switch:
* Game servers (`nex`)
* https://dauth-lp1.ndas.srv.nintendo.net
* https://aauth-lp1.ndas.srv.nintendo.net
* https://aauth.hac.lp1.ndas.srv.nintendo.net
* https://dragons.hac.lp1.dragons.nintendo.net
* https://e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com
* https://app.lp1.five.nintendo.net
* https://sun.hac.lp1.d4c.nintendo.net
* https://atumn.hac.lp1.d4c.nintendo.net
* Wii U:
* Game servers (`nex`)
* https://account.nintendo.net
* 3DS:
* Game servers (`nex`)
* https://nasc.nintendowifi.net
## Contributing
Feel free to open a pull request or issue on [github](https://github.com/kinnay/nintendo). If you open a pull request, please try to follow the current code style as much as possible, and consider writing a test for new features and bug fixes.
## API Reference
* nex
* [aauser](reference/nex/aauser.md)
* [account](reference/nex/account.md)
* [authentication](reference/nex/authentication.md)
* [backend](reference/nex/backend.md)
* [common](reference/nex/common.md)
* [datastore](reference/nex/datastore.md)
* [datastore_smm](reference/nex/datastore_smm.md)
* [datastore_smm2](reference/nex/datastore_smm2.md)
* [debug](reference/nex/debug.md)
* [errors](reference/nex/errors.md)
* [friends](reference/nex/friends.md)
* [health](reference/nex/health.md)
* [hpp](reference/nex/hpp.md)
* [kerberos](reference/nex/kerberos.md)
* [matchmaking](reference/nex/matchmaking.md)
* [matchmaking_eagle](reference/nex/matchmaking_eagle.md)
* [messaging](reference/nex/messaging.md)
* [monitoring](reference/nex/monitoring.md)
* [nattraversal](reference/nex/nattraversal.md)
* [nintendonotification](reference/nex/nintendonotification.md)
* [notification](reference/nex/notification.md)
* [prudp](reference/nex/prudp.md)
* [ranking](reference/nex/ranking.md)
* [ranking2](reference/nex/ranking2.md)
* [remotelog](reference/nex/remotelog.md)
* [rmc](reference/nex/rmc.md)
* [screening](reference/nex/screening.md)
* [secure](reference/nex/secure.md)
* [streams](reference/nex/streams.md)
* [subscriber](reference/nex/subscriber.md)
* [utility](reference/nex/utility.md)
* [switch](reference/switch.md)
* [aauth](reference/switch/aauth.md)
* [atumn](reference/switch/atumn.md)
* [baas](reference/switch/baas.md)
* [dauth](reference/switch/dauth.md)
* [dragons](reference/switch/dragons.md)
* [five](reference/switch/five.md)
* [sun](reference/switch/sun.md)
* [miis](reference/miis.md)
* [nasc](reference/nasc.md)
* [nnas](reference/nnas.md)
================================================
FILE: docs/reference/miis.md
================================================
# Module: nintendo.miis
Provides a parser for FFL mii data.
**class** [MiiData](#miidata)
The mii data class.
## MiiData
`birth_platform: int`
`mii_version: int`
`font_region: int`
`region_move: int`
`copyable: bool`
`local_only: bool`
`author_id: list[int]`
`mii_id: list[int]`
`color: int`
`birth_day: int`
`birth_month: int`
`gender: bool`
`mii_name: str`
`creator_name: str`
`size: int`
`fatness: int`
`blush_type: int`
`face_style: int`
`face_color: int`
`face_type: int`
`hair_mirrored: bool`
`hair_color: int`
`hair_type: int`
`eye_thickness: int`
`eye_scale: int`
`eye_color: int`
`eye_type: int`
`eye_height: int`
`eye_distance: int`
`eye_rotation: int`
`eyebrow_thickness: int`
`eyebrow_scale: int`
`eyebrow_color: int`
`eyebrow_type: int`
`eyebrow_height: int`
`eyebrow_distance: int`
`eyebrow_rotation: int`
`nose_height: int`
`nose_scale: int`
`nose_type: int`
`mouth_thickness: int`
`mouth_scale: int`
`mouth_color: int`
`mouth_type: int`
`mouth_height: int`
`mustache_type: int`
`mustache_height: int`
`mustache_scale: int`
`beard_color: int`
`beard_type: int`
`glass_height: int`
`glass_scale: int`
`glass_color: int`
`glass_type: int`
`mole_ypos: int`
`mole_xpos: int`
`mole_scale: int`
`mole_enabled: bool`
**def _\_init__**()
Creates a new mii instance.
**def build**() -> bytes
Encodes the mii data.
@classmethod
**def parse**(data: bytes) -> [MiiData](#miidata)
Parses the given mii data.
================================================
FILE: docs/reference/nasc.md
================================================
# Module: nintendo.nasc
Provides a client for [nasc.nintendowifi.net](https://github.com/kinnay/nintendo/wiki/NASC-Server).
**class** [NASCError](#nascerror)(Exception)
Raised when the server returns an error code.
**class** [NASCClient](#nascclient)
The NASC client.
## Global Constants
`MEDIA_TYPE_SYSTEM = 0`
`MEDIA_TYPE_DIGITAL = 1`
`MEDIA_TYPE_CARTRIDGE = 2`
## NASCError
This exception is raised when the server returns an error code.
`status_code: int`
`return_code: int | None`
`retry: bool`
`datetime: datetime.datetime`
## NASCClient
**def _\_init__**()
Creates a new NASC client.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo CA - G3`, and `CTR Common Prod 1` is used as the client certificate.
**def set_url**(url: str) -> None
Changes the server to which requests are sent. The default is `nasc.nintendowifi.net`.
**def set_environment**(environment: str) -> None
Changes the `servertype` parameter. The default is `"L1"` (production).
**def set_title**(title_id: int, title_version: int, product_code: str = "----", maker_code: str = "00", media_type: int = MEDIA_TYPE_SYSTEM, rom_id: bytes = None) -> None
Configures the current title. The `rom_id` is required only for cartridges. This is required for calls to `login`.
**def set_device**(serial_number: str, mac_address: str, fcd_cert: bytes, name: str = "", unit_code: str = "2") -> None
Configures the device. This is required for calls to `login`.
**def set_network**(bss_id: str, ap_info: str) -> None
Changes the `bssid` and `ap_info` parameters. By default, the `bssid` is random and `ap_info` is `01:0000000000`.
**def set_locale**(region: int, language: int) -> None
Changes the `region` and `language` parameters.
**def set_user**(pid: int, pid_hmac: str) -> None
Configures the user for logging in. Either `set_user` or `set_password` must be called before `login`.
**def set_password**(password: str) -> None
Configures the `passwd` parameter. Either `set_user` or `set_password` must be called before `login`.
**def set_sdk_version**(major_version: int, minor_version: int) -> None
Changes the content of the `sdkver` parameter. The default is `000000`.
**def set_fpd_version**(version: int) -> None
Changes the content of the `fpdver` parameter and user agent. The default is `15`.
**async def login**(game_server_id: int, nickname: str = "") -> [LoginResponse](#loginresponse)
Calls the `LOGIN` action on the server and returns the response or raises an exception.
## LoginResponse
`host: str`
`port: int`
`token: str`
`datetime: datetime.datetime`
================================================
FILE: docs/reference/nex/aauser.md
================================================
# Module: nintendo.nex.aauser
Provides a client and server for the `AAUserProtocol`. This page was generated automatically from `aauser.proto`.
**class** [AAUserClient](#aauserclient)
The client for the `AAUserProtocol`.
**class** [AAUserServer](#aauserserver)
The server for the `AAUserProtocol`.
**class** [ApplicationInfo](#applicationinfo)([Structure](common.md))
## AAUserClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`AAUserClient`](#aauserclient).
**async def register_application**(title_id: int) -> None
Calls method `1` on the server.
**async def unregister_application**(title_id: int) -> None
Calls method `2` on the server.
**async def set_application_info**(application_info: list[[ApplicationInfo](#applicationinfo)]) -> None
Calls method `3` on the server.
**async def get_application_info**() -> list[[ApplicationInfo](#applicationinfo)]
Calls method `4` on the server.
## AAUserServer
**def _\_init__**()
Creates a new [`AAUserServer`](#aauserserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register_application**(client: [RMCClient](rmc.md#rmcclient), title_id: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def unregister_application**(client: [RMCClient](rmc.md#rmcclient), title_id: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def set_application_info**(client: [RMCClient](rmc.md#rmcclient), application_info: list[[ApplicationInfo](#applicationinfo)]) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def get_application_info**(client: [RMCClient](rmc.md#rmcclient)) -> list[[ApplicationInfo](#applicationinfo)]
Handler for method `4`. This method should be overridden by a subclass.
## ApplicationInfo
**def _\_init__**()
Creates a new `ApplicationInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
title_id: int
title_version: int
================================================
FILE: docs/reference/nex/account.md
================================================
# Module: nintendo.nex.account
Provides a client and server for the `AccountProtocol`. This page was generated automatically from `account.proto`.
**class** [AccountClient](#accountclient)
The client for the `AccountProtocol`.
**class** [AccountServer](#accountserver)
The server for the `AccountProtocol`.
**class** [AccountData](#accountdata)([Structure](common.md))
**class** [BasicAccountInfo](#basicaccountinfo)([Structure](common.md))
## AccountClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`AccountClient`](#accountclient).
**async def create_account**(name: str, key: str, groups: int, email: str) -> [Result](common.md#result)
Calls method `1` on the server.
**async def delete_account**(pid: int) -> None
Calls method `2` on the server.
**async def disable_account**(pid: int, until: [DateTime](common.md#datetime), message: str) -> [Result](common.md#result)
Calls method `3` on the server.
**async def change_password**(new_key: str) -> bool
Calls method `4` on the server.
**async def test_capability**(capability: int) -> bool
Calls method `5` on the server.
**async def get_name**(pid: int) -> str
Calls method `6` on the server.
**async def get_account_data**() -> [RMCResponse](common.md)
Calls method `7` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
data: [AccountData](#accountdata)
**async def get_private_data**() -> [RMCResponse](common.md)
Calls method `8` on the server. The RMC response has the following attributes:
result: bool
data: [Data](common.md)
**async def get_public_data**(pid: int) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
result: bool
data: [Data](common.md)
**async def get_multiple_public_data**(pids: list[int]) -> [RMCResponse](common.md)
Calls method `10` on the server. The RMC response has the following attributes:
result: bool
data: list[[Data](common.md)]
**async def update_account_name**(name: str) -> [Result](common.md#result)
Calls method `11` on the server.
**async def update_account_email**(email: str) -> [Result](common.md#result)
Calls method `12` on the server.
**async def update_custom_data**(public_data: [Data](common.md), private_data: [Data](common.md)) -> [Result](common.md#result)
Calls method `13` on the server.
**async def find_by_name_regex**(groups: int, regex: str, range: [ResultRange](common.md#resultrange)) -> list[[BasicAccountInfo](#basicaccountinfo)]
Calls method `14` on the server.
**async def update_account_expiry_date**(pid: int, expiry: [DateTime](common.md#datetime), message: str) -> None
Calls method `15` on the server.
**async def update_account_effective_date**(pid: int, effective_from: [DateTime](common.md#datetime), message: str) -> None
Calls method `16` on the server.
**async def update_status**(status: str) -> None
Calls method `17` on the server.
**async def get_status**(pid: int) -> str
Calls method `18` on the server.
**async def get_last_connection_stats**(pid: int) -> [RMCResponse](common.md)
Calls method `19` on the server. The RMC response has the following attributes:
last_session_login: [DateTime](common.md#datetime)
last_session_logout: [DateTime](common.md#datetime)
current_session_login: [DateTime](common.md#datetime)
**async def reset_password**() -> bool
Calls method `20` on the server.
**async def create_account_with_custom_data**(name: str, key: str, groups: int, email: str, public_data: [Data](common.md), private_data: [Data](common.md)) -> None
Calls method `21` on the server.
**async def retrieve_account**() -> [RMCResponse](common.md)
Calls method `22` on the server. The RMC response has the following attributes:
account_data: [AccountData](#accountdata)
public_data: [Data](common.md)
private_data: [Data](common.md)
**async def update_account**(key: str, email: str, public_data: [Data](common.md), private_data: [Data](common.md)) -> None
Calls method `23` on the server.
**async def change_password_by_guest**(name: str, email: str, key: str) -> None
Calls method `24` on the server.
**async def find_by_name_like**(groups: int, like: str, range: [ResultRange](common.md#resultrange)) -> list[[BasicAccountInfo](#basicaccountinfo)]
Calls method `25` on the server.
**async def custom_create_account**(name: str, key: str, groups: int, email: str, auth_data: [Data](common.md)) -> int
Calls method `26` on the server.
**async def nintendo_create_account**(name: str, key: str, groups: int, email: str, auth_data: [Data](common.md)) -> [RMCResponse](common.md)
Calls method `27` on the server. The RMC response has the following attributes:
pid: int
pid_hmac: str
**async def lookup_or_create_account**(name: str, key: str, groups: int, email: str, auth_data: [Data](common.md)) -> int
Calls method `28` on the server.
**async def disconnect_principal**(pid: int) -> bool
Calls method `29` on the server.
**async def disconnect_all_principals**() -> bool
Calls method `30` on the server.
## AccountServer
**def _\_init__**()
Creates a new [`AccountServer`](#accountserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def create_account**(client: [RMCClient](rmc.md#rmcclient), name: str, key: str, groups: int, email: str) -> [Result](common.md#result)
Handler for method `1`. This method should be overridden by a subclass.
**async def delete_account**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def disable_account**(client: [RMCClient](rmc.md#rmcclient), pid: int, until: [DateTime](common.md#datetime), message: str) -> [Result](common.md#result)
Handler for method `3`. This method should be overridden by a subclass.
**async def change_password**(client: [RMCClient](rmc.md#rmcclient), new_key: str) -> bool
Handler for method `4`. This method should be overridden by a subclass.
**async def test_capability**(client: [RMCClient](rmc.md#rmcclient), capability: int) -> bool
Handler for method `5`. This method should be overridden by a subclass.
**async def get_name**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> str
Handler for method `6`. This method should be overridden by a subclass.
**async def get_account_data**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `7`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
data: [AccountData](#accountdata)
**async def get_private_data**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `8`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
data: [Data](common.md)
**async def get_public_data**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
data: [Data](common.md)
**async def get_multiple_public_data**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> [RMCResponse](common.md)
Handler for method `10`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
data: list[[Data](common.md)]
**async def update_account_name**(client: [RMCClient](rmc.md#rmcclient), name: str) -> [Result](common.md#result)
Handler for method `11`. This method should be overridden by a subclass.
**async def update_account_email**(client: [RMCClient](rmc.md#rmcclient), email: str) -> [Result](common.md#result)
Handler for method `12`. This method should be overridden by a subclass.
**async def update_custom_data**(client: [RMCClient](rmc.md#rmcclient), public_data: [Data](common.md), private_data: [Data](common.md)) -> [Result](common.md#result)
Handler for method `13`. This method should be overridden by a subclass.
**async def find_by_name_regex**(client: [RMCClient](rmc.md#rmcclient), groups: int, regex: str, range: [ResultRange](common.md#resultrange)) -> list[[BasicAccountInfo](#basicaccountinfo)]
Handler for method `14`. This method should be overridden by a subclass.
**async def update_account_expiry_date**(client: [RMCClient](rmc.md#rmcclient), pid: int, expiry: [DateTime](common.md#datetime), message: str) -> None
Handler for method `15`. This method should be overridden by a subclass.
**async def update_account_effective_date**(client: [RMCClient](rmc.md#rmcclient), pid: int, effective_from: [DateTime](common.md#datetime), message: str) -> None
Handler for method `16`. This method should be overridden by a subclass.
**async def update_status**(client: [RMCClient](rmc.md#rmcclient), status: str) -> None
Handler for method `17`. This method should be overridden by a subclass.
**async def get_status**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> str
Handler for method `18`. This method should be overridden by a subclass.
**async def get_last_connection_stats**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> [RMCResponse](common.md)
Handler for method `19`. This method should be overridden by a subclass. The RMC response must have the following attributes:
last_session_login: [DateTime](common.md#datetime)
last_session_logout: [DateTime](common.md#datetime)
current_session_login: [DateTime](common.md#datetime)
**async def reset_password**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `20`. This method should be overridden by a subclass.
**async def create_account_with_custom_data**(client: [RMCClient](rmc.md#rmcclient), name: str, key: str, groups: int, email: str, public_data: [Data](common.md), private_data: [Data](common.md)) -> None
Handler for method `21`. This method should be overridden by a subclass.
**async def retrieve_account**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `22`. This method should be overridden by a subclass. The RMC response must have the following attributes:
account_data: [AccountData](#accountdata)
public_data: [Data](common.md)
private_data: [Data](common.md)
**async def update_account**(client: [RMCClient](rmc.md#rmcclient), key: str, email: str, public_data: [Data](common.md), private_data: [Data](common.md)) -> None
Handler for method `23`. This method should be overridden by a subclass.
**async def change_password_by_guest**(client: [RMCClient](rmc.md#rmcclient), name: str, email: str, key: str) -> None
Handler for method `24`. This method should be overridden by a subclass.
**async def find_by_name_like**(client: [RMCClient](rmc.md#rmcclient), groups: int, like: str, range: [ResultRange](common.md#resultrange)) -> list[[BasicAccountInfo](#basicaccountinfo)]
Handler for method `25`. This method should be overridden by a subclass.
**async def custom_create_account**(client: [RMCClient](rmc.md#rmcclient), name: str, key: str, groups: int, email: str, auth_data: [Data](common.md)) -> int
Handler for method `26`. This method should be overridden by a subclass.
**async def nintendo_create_account**(client: [RMCClient](rmc.md#rmcclient), name: str, key: str, groups: int, email: str, auth_data: [Data](common.md)) -> [RMCResponse](common.md)
Handler for method `27`. This method should be overridden by a subclass. The RMC response must have the following attributes:
pid: int
pid_hmac: str
**async def lookup_or_create_account**(client: [RMCClient](rmc.md#rmcclient), name: str, key: str, groups: int, email: str, auth_data: [Data](common.md)) -> int
Handler for method `28`. This method should be overridden by a subclass.
**async def disconnect_principal**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> bool
Handler for method `29`. This method should be overridden by a subclass.
**async def disconnect_all_principals**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `30`. This method should be overridden by a subclass.
## AccountData
**def _\_init__**()
Creates a new `AccountData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
groups: int
email: str
creation_date: [DateTime](common.md#datetime)
effective_date: [DateTime](common.md#datetime)
not_effective_message: str
expiry_date: [DateTime](common.md#datetime)
expired_message: str
## BasicAccountInfo
**def _\_init__**()
Creates a new `BasicAccountInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
================================================
FILE: docs/reference/nex/authentication.md
================================================
# Module: nintendo.nex.authentication
Provides a client and server for the `AuthenticationProtocol` and `AuthenticationProtocolNX`. This page was generated automatically from `authentication.proto`.
**class** [AuthenticationClient](#authenticationclient)
The client for the `AuthenticationProtocol`.
**class** [AuthenticationClientNX](#authenticationclientnx)
The client for the `AuthenticationProtocolNX`.
**class** [AuthenticationServer](#authenticationserver)
The server for the `AuthenticationProtocol`.
**class** [AuthenticationServerNX](#authenticationservernx)
The server for the `AuthenticationProtocolNX`.
**class** [AuthenticationInfo](#authenticationinfo)([Data](common.md))
**class** [RVConnectionData](#rvconnectiondata)([Structure](common.md))
**class** [ValidateAndRequestTicketParam](#validateandrequestticketparam)([Structure](common.md))
**class** [ValidateAndRequestTicketResult](#validateandrequestticketresult)([Structure](common.md))
## AuthenticationClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`AuthenticationClient`](#authenticationclient).
**async def login**(username: str) -> [RMCResponse](common.md)
Calls method `1` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
**async def login_ex**(username: str, extra_data: [Data](common.md)) -> [RMCResponse](common.md)
Calls method `2` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
**async def request_ticket**(source: int, target: int) -> [RMCResponse](common.md)
Calls method `3` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
ticket: bytes
**async def get_pid**(username: str) -> int
Calls method `4` on the server.
**async def get_name**(pid: int) -> str
Calls method `5` on the server.
**async def login_with_context**(login_data: [Data](common.md)) -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
## AuthenticationClientNX
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`AuthenticationClientNX`](#authenticationclientnx).
**async def validate_and_request_ticket**(username: str) -> [RMCResponse](common.md)
Calls method `1` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
**async def validate_and_request_ticket_with_custom_data**(username: str, extra_data: [Data](common.md)) -> [RMCResponse](common.md)
Calls method `2` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
source_key: str
**async def request_ticket**(source: int, target: int) -> [RMCResponse](common.md)
Calls method `3` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
ticket: bytes
key: str
**async def get_pid**(username: str) -> int
Calls method `4` on the server.
**async def get_name**(pid: int) -> str
Calls method `5` on the server.
**async def validate_and_request_ticket_with_param**(param: [ValidateAndRequestTicketParam](#validateandrequestticketparam)) -> [ValidateAndRequestTicketResult](#validateandrequestticketresult)
Calls method `6` on the server.
## AuthenticationServer
**def _\_init__**()
Creates a new [`AuthenticationServer`](#authenticationserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def login**(client: [RMCClient](rmc.md#rmcclient), username: str) -> [RMCResponse](common.md)
Handler for method `1`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
**async def login_ex**(client: [RMCClient](rmc.md#rmcclient), username: str, extra_data: [Data](common.md)) -> [RMCResponse](common.md)
Handler for method `2`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
**async def request_ticket**(client: [RMCClient](rmc.md#rmcclient), source: int, target: int) -> [RMCResponse](common.md)
Handler for method `3`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
ticket: bytes
**async def get_pid**(client: [RMCClient](rmc.md#rmcclient), username: str) -> int
Handler for method `4`. This method should be overridden by a subclass.
**async def get_name**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def login_with_context**(client: [RMCClient](rmc.md#rmcclient), login_data: [Data](common.md)) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
## AuthenticationServerNX
**def _\_init__**()
Creates a new [`AuthenticationServerNX`](#authenticationservernx).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def validate_and_request_ticket**(client: [RMCClient](rmc.md#rmcclient), username: str) -> [RMCResponse](common.md)
Handler for method `1`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
**async def validate_and_request_ticket_with_custom_data**(client: [RMCClient](rmc.md#rmcclient), username: str, extra_data: [Data](common.md)) -> [RMCResponse](common.md)
Handler for method `2`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
pid: int
ticket: bytes
connection_data: [RVConnectionData](#rvconnectiondata)
server_name: str
source_key: str
**async def request_ticket**(client: [RMCClient](rmc.md#rmcclient), source: int, target: int) -> [RMCResponse](common.md)
Handler for method `3`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
ticket: bytes
key: str
**async def get_pid**(client: [RMCClient](rmc.md#rmcclient), username: str) -> int
Handler for method `4`. This method should be overridden by a subclass.
**async def get_name**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def validate_and_request_ticket_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [ValidateAndRequestTicketParam](#validateandrequestticketparam)) -> [ValidateAndRequestTicketResult](#validateandrequestticketresult)
Handler for method `6`. This method should be overridden by a subclass.
## AuthenticationInfo
**def _\_init__**()
Creates a new `AuthenticationInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
token: str
ngs_version: int = 3
token_type: int = 1
server_version: int = 0
## RVConnectionData
**def _\_init__**()
Creates a new `RVConnectionData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
main_station: [StationURL](common.md#stationurl) = "prudp:/"
special_protocols: list[int] = []
special_station: [StationURL](common.md#stationurl) = "prudp:/"
If `nex.version` >= 30500:
If `revision` >= 1:
server_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
## ValidateAndRequestTicketParam
**def _\_init__**()
Creates a new `ValidateAndRequestTicketParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
platform: int = 3
username: str
data: [Data](common.md)
skip_version_check: bool = False
nex_version: int
client_version: int
## ValidateAndRequestTicketResult
**def _\_init__**()
Creates a new `ValidateAndRequestTicketResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
ticket: bytes
server_url: [StationURL](common.md#stationurl)
server_time: [DateTime](common.md#datetime)
server_name: str
source_key: str
================================================
FILE: docs/reference/nex/backend.md
================================================
# Module: nintendo.nex.backend
Provides a client for game servers.
**class** [BackEndClient](#backendclient)
The game server client.
**async with connect**(settings: [Settings](settings.md#settings), host: str, port: int) -> [BackEndClient](#backendclient)
Establishes a connection with the authentication server at the given address. Blocks until the connection is ready.
## BackEndClient
auth_client: [RMCClient](rmc.md#rmcclient)
The RMC client that is connected to the authentication server.
**async with login**(username: str, password: str = None, auth_info: [Data](common.md) = None, servers: list[object] = []) -> [RMCClient](rmc.md#rmcclient)
Requests a ticket from the authentication server and establishes a connection with the secure server. The returned RMC client can be used to call methods on the secure server. `servers` must be a list of protocol server objects that should be defined in an external protocol file. These servers are registered on the secure client.
**async with login_guest**() -> [RMCClient](rmc.md#rmcclient)
Logs in as guest. On most servers the guest account is disabled.
================================================
FILE: docs/reference/nex/common.md
================================================
# Module: nintendo.nex.common
Provides classes that are used by various `nex` modules.
**class** [RMCError](#rmcerror)(Exception)
Raised when the server returns an error code.
**class** [Result](#result)
Holds the result of a remote method call.
**class** Structure
Base class for `nex` structures. This class should not be subclassed manually. Instead, structures should be defined in a protocol file.
**class** Data(Structure)
Base class for structures that can be held by a data holder. This class should not be subclassed manually. Instead, data structures should be defined in a protocol file.
**class** NullData(Data)
The `NullData` structure. This class does not define any fields.
**class** [StationURL](#stationurl)
A station url (`nn::nex::StationURL`).
**class** [DateTime](#datetime)
A date time object (`nn::nex::DateTime`).
**class** [ResultRange](#resultrange)(Structure)
A result range (`nn::nex::ResultRange`). This structure limits database queries to a specific range.
## RMCError
**def _\_init__**(code: str = "Core::Unknown)
Creates a new RMCError from the given error description.
**def _\_init__**(code: int = 0x10001)
Creates a new RMCError from the given error code.
**def code**() -> int
Returns the error code.
**def name**() -> str
Returns a description of the error. If the error code is unknown, this method returns `"unknown error"`.
**def result**() -> [Result](#result)
Returns a result object that represents the error.
## Result
@classmethod
**def success**(code: str = "Core::Unknown") -> [Result](#result)
Creates a new [`Result`](#result) object that indicates success.
@classmethod
**def success**(code: int = 0x10001) -> [Result](#result)
Creates a new [`Result`](#result) object that indicates success.
@classmethod
**def error**(code: str = "Core::Unknown") -> [Result](#result)
Creates a new [`Result`](#result) object that indicates an error.
@classmethod
**def error**(code: int = 0x10001) -> [Result](#result)
Creates a new [`Result`](#result) object that indicates an error.
**def is_success**() -> bool
Returns `True` if the result indicates success.
**def is_error**() -> bool
Returns `True` if the result indicates an error.
**def code**() -> int
Returns the error code of the result. Errors are indicated by bit `1 << 31`.
**def name**() -> str
Returns a description of the result. If the result indicates success, this method always returns `"success"`, regardless of the error code. If the error bit is set but the error code is unknown, this method returns `"unknown error"`.
**def raise_if_error**() -> None
Raises an `RMCError` if the error bit is set.
## StationURL
A station url consists of an url scheme and a bunch of parameters. The following parameters are currently valid:
`address`, `Rsa`, `port`, `stream`, `sid`, `PID`, `CID`, `type`, `RVCID`, `natm`, `natf`, `upnp`, `pmp`, `probeinit`, `PRID` and `Rsp`.
**def _\_init__**(scheme: str = "prudp", \**kwargs)
Creates a new station url with the given url scheme. Additional parameters may be provided in `kwargs`.
**def _\_repr__**() -> str
Returns the string representation of the station url.
**def _\_getitem__**(name: str) -> object
Returns a specific parameter, either as `str` or `int`. Returns a default value if the parameter name is valid but not defined in the station url. Raises `KeyError` if the parameter name is invalid.
**def _\_setitem__**(name: str, value: object) -> None
Changes a specific parameter. The given `value` is automatically converted to string.
**def scheme**() -> str
Returns the url scheme.
**def address**() -> tuple[str, int]
Returns the address of the station url as a tuple: `(address, port)`.
**def is_public**() -> bool
Returns `True` if the `type` field indicates that the station address is public.
**def is_behind_nat**() -> bool
Returns `True` if the `type` field indicates that the station is behind a nat device.
**def is_global**() -> bool
Returns `True` if the `type` field indicates that the station address is global (i.e. public and not behind a nat device).
**def copy**() -> [StationURL](#stationurl)
Returns a copy of the station url.
@classmethod
**def parse**(string: str) -> [StationURL](#stationurl)
Parses the given station url string. If `string` is empty, the station url is created with the `"prudp"` scheme and without parameters.
## DateTime
A `DateTime` object always represents UTC time.
** def _\_init__**(value: int)
Creates a new [`DateTime`](#datetime) object from the given value.
**def value**() -> int
Returns value of the [`DateTime`](#datetime) object, as encoded by `nex`.
**def second**() -> int
Returns the seconds (0 - 59)
**def minute**() -> int
Returns the minutes (0 - 59)
**def hour**() -> int
Returns the hours (0 - 23)
**def day**() -> int
Returns the day of the month (1 - 31).
**def month**() -> int
Returns the month (1 - 12)
**def year**() -> int
Returns the year.
**def standard_datetime**() -> datetime.datetime
Converts the [`DateTime`](#datetime) object to a standard `datetime.datetime` object.
**def timestamp**() -> int
Returns a posix timestamp.
@classmethod
**def make**(year: int, month: int = 1, day: int = 1, hour: int = 0, minute: int = 0, second: int = 0) -> [DateTime](#datetime)
Creates a new [`DateTime`](#datetime) object for the given date.
@classmethod
**def fromtimestamp**(timestamp: int) -> [DateTime](#datetime)
Creates a new [`DateTime`](#datetime) object from the given posix timestamp.
@classmethod
**def now**() -> [DateTime](#datetime)
Creates a new [`DateTime`](#datetime) object for the current time.
@classmethod
**def never**() -> [DateTime](#datetime)
Creates a special [`DateTime`](#datetime) object that represents 'never'.
@classmethod
**def future**() -> [DateTime](#datetime)
Creates a special [`DateTime`](#datetime) object that represents 'future'.
## ResultRange
`offset: int`
`size: int`
**def _\_init__**(offset: int = 0, size: int = 10)
Creates a new result range.
================================================
FILE: docs/reference/nex/datastore.md
================================================
# Module: nintendo.nex.datastore
Provides a client and server for the `DataStoreProtocol`. This page was generated automatically from `datastore.proto`.
**class** [DataStoreClient](#datastoreclient)
The client for the `DataStoreProtocol`.
**class** [DataStoreServer](#datastoreserver)
The server for the `DataStoreProtocol`.
**class** [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)([Structure](common.md))
**class** [DataStoreChangeMetaParam](#datastorechangemetaparam)([Structure](common.md))
**class** [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)([Structure](common.md))
**class** [DataStoreCompletePostParam](#datastorecompletepostparam)([Structure](common.md))
**class** [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)([Structure](common.md))
**class** [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)([Structure](common.md))
**class** [DataStoreDeleteParam](#datastoredeleteparam)([Structure](common.md))
**class** [DataStoreGetMetaParam](#datastoregetmetaparam)([Structure](common.md))
**class** [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)([Structure](common.md))
**class** [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)([Structure](common.md))
**class** [DataStoreKeyValue](#datastorekeyvalue)([Structure](common.md))
**class** [DataStoreMetaInfo](#datastoremetainfo)([Structure](common.md))
**class** [DataStoreNotification](#datastorenotification)([Structure](common.md))
**class** [DataStoreNotificationV1](#datastorenotificationv1)([Structure](common.md))
**class** [DataStorePasswordInfo](#datastorepasswordinfo)([Structure](common.md))
**class** [DataStorePermission](#datastorepermission)([Structure](common.md))
**class** [DataStorePersistenceInfo](#datastorepersistenceinfo)([Structure](common.md))
**class** [DataStorePersistenceInitParam](#datastorepersistenceinitparam)([Structure](common.md))
**class** [DataStorePersistenceTarget](#datastorepersistencetarget)([Structure](common.md))
**class** [DataStorePrepareGetParam](#datastorepreparegetparam)([Structure](common.md))
**class** [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)([Structure](common.md))
**class** [DataStorePreparePostParam](#datastorepreparepostparam)([Structure](common.md))
**class** [DataStorePreparePostParamV1](#datastorepreparepostparamv1)([Structure](common.md))
**class** [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)([Structure](common.md))
**class** [DataStoreRateObjectParam](#datastorerateobjectparam)([Structure](common.md))
**class** [DataStoreRatingInfo](#datastoreratinginfo)([Structure](common.md))
**class** [DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)([Structure](common.md))
**class** [DataStoreRatingInitParam](#datastoreratinginitparam)([Structure](common.md))
**class** [DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)([Structure](common.md))
**class** [DataStoreRatingLog](#datastoreratinglog)([Structure](common.md))
**class** [DataStoreRatingTarget](#datastoreratingtarget)([Structure](common.md))
**class** [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)([Structure](common.md))
**class** [DataStoreReqGetInfo](#datastorereqgetinfo)([Structure](common.md))
**class** [DataStoreReqGetInfoV1](#datastorereqgetinfov1)([Structure](common.md))
**class** [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)([Structure](common.md))
**class** [DataStoreReqPostInfo](#datastorereqpostinfo)([Structure](common.md))
**class** [DataStoreReqPostInfoV1](#datastorereqpostinfov1)([Structure](common.md))
**class** [DataStoreReqUpdateInfo](#datastorerequpdateinfo)([Structure](common.md))
**class** [DataStoreSearchParam](#datastoresearchparam)([Structure](common.md))
**class** [DataStoreSearchResult](#datastoresearchresult)([Structure](common.md))
**class** [DataStoreSpecificMetaInfo](#datastorespecificmetainfo)([Structure](common.md))
**class** [DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)([Structure](common.md))
**class** [DataStoreTouchObjectParam](#datastoretouchobjectparam)([Structure](common.md))
## DataStoreClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`DataStoreClient`](#datastoreclient).
**async def prepare_get_object_v1**(param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Calls method `1` on the server.
**async def prepare_post_object_v1**(param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Calls method `2` on the server.
**async def complete_post_object_v1**(param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Calls method `3` on the server.
**async def delete_object**(param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Calls method `4` on the server.
**async def delete_objects**(param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `5` on the server.
**async def change_meta_v1**(param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Calls method `6` on the server.
**async def change_metas_v1**(data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `7` on the server.
**async def get_meta**(param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Calls method `8` on the server.
**async def get_metas**(data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Calls method `10` on the server.
**async def complete_update_object**(param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Calls method `11` on the server.
**async def search_object**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `12` on the server.
**async def get_notification_url**(param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Calls method `13` on the server.
**async def get_new_arrived_notifications_v1**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `14` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `15` on the server.
**async def get_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `16` on the server.
**async def get_ratings**(data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Calls method `17` on the server. The RMC response has the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Calls method `18` on the server.
**async def reset_ratings**(data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Calls method `19` on the server.
**async def get_specific_meta_v1**(param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Calls method `20` on the server.
**async def post_meta_binary**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Calls method `21` on the server.
**async def touch_object**(param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Calls method `22` on the server.
**async def get_rating_with_log**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Calls method `23` on the server. The RMC response has the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Calls method `24` on the server.
**async def prepare_get_object**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Calls method `25` on the server.
**async def complete_post_object**(param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Calls method `26` on the server.
**async def get_new_arrived_notifications**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `27` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Calls method `28` on the server.
**async def get_persistence_info**(owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Calls method `29` on the server.
**async def get_persistence_infos**(owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Calls method `30` on the server. The RMC response has the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Calls method `31` on the server.
**async def unperpetuate_object**(persistence_slot_id: int, delete_last_object: bool) -> None
Calls method `32` on the server.
**async def prepare_get_object_or_meta_binary**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Calls method `33` on the server. The RMC response has the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Calls method `34` on the server.
**async def get_password_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `35` on the server. The RMC response has the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Calls method `36` on the server. The RMC response has the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(data_ids: list[int]) -> None
Calls method `37` on the server.
**async def change_meta**(param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Calls method `38` on the server.
**async def change_metas**(data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `39` on the server.
**async def rate_objects**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `40` on the server. The RMC response has the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Calls method `41` on the server.
**async def post_meta_binaries_with_data_id**(data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `42` on the server.
**async def rate_object_with_posting**(target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `43` on the server.
**async def rate_objects_with_posting**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `44` on the server. The RMC response has the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `45` on the server. The RMC response has the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `46` on the server.
## DataStoreServer
**def _\_init__**()
Creates a new [`DataStoreServer`](#datastoreserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def prepare_get_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Handler for method `1`. This method should be overridden by a subclass.
**async def prepare_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Handler for method `2`. This method should be overridden by a subclass.
**async def complete_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def delete_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_objects**(client: [RMCClient](rmc.md#rmcclient), param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `5`. This method should be overridden by a subclass.
**async def change_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def change_metas_v1**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Handler for method `10`. This method should be overridden by a subclass.
**async def complete_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def search_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_notification_url**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Handler for method `13`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `14`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `16`. This method should be overridden by a subclass.
**async def get_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Handler for method `17`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def reset_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `19`. This method should be overridden by a subclass.
**async def get_specific_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Handler for method `20`. This method should be overridden by a subclass.
**async def post_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Handler for method `21`. This method should be overridden by a subclass.
**async def touch_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Handler for method `22`. This method should be overridden by a subclass.
**async def get_rating_with_log**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Handler for method `23`. This method should be overridden by a subclass. The RMC response must have the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Handler for method `24`. This method should be overridden by a subclass.
**async def prepare_get_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Handler for method `25`. This method should be overridden by a subclass.
**async def complete_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `27`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Handler for method `28`. This method should be overridden by a subclass.
**async def get_persistence_info**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Handler for method `29`. This method should be overridden by a subclass.
**async def get_persistence_infos**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `30`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Handler for method `31`. This method should be overridden by a subclass.
**async def unperpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, delete_last_object: bool) -> None
Handler for method `32`. This method should be overridden by a subclass.
**async def prepare_get_object_or_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Handler for method `33`. This method should be overridden by a subclass. The RMC response must have the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(client: [RMCClient](rmc.md#rmcclient), data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Handler for method `34`. This method should be overridden by a subclass.
**async def get_password_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `35`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(client: [RMCClient](rmc.md#rmcclient), params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Handler for method `36`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def change_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def change_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `39`. This method should be overridden by a subclass.
**async def rate_objects**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `40`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Handler for method `41`. This method should be overridden by a subclass.
**async def post_meta_binaries_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `42`. This method should be overridden by a subclass.
**async def rate_object_with_posting**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `43`. This method should be overridden by a subclass.
**async def rate_objects_with_posting**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `44`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `45`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `46`. This method should be overridden by a subclass.
## DataStoreChangeMetaCompareParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaCompareParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
comparison_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
referred_count: int
data_type: int
status: int
## DataStoreChangeMetaParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
referred_count: int
data_type: int
status: int
compare_param: [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam) = [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)()
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
## DataStoreChangeMetaParamV1
**def _\_init__**()
Creates a new `DataStoreChangeMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
## DataStoreCompletePostParam
**def _\_init__**()
Creates a new `DataStoreCompletePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompletePostParamV1
**def _\_init__**()
Creates a new `DataStoreCompletePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompleteUpdateParam
**def _\_init__**()
Creates a new `DataStoreCompleteUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
version: int
success: bool
## DataStoreDeleteParam
**def _\_init__**()
Creates a new `DataStoreDeleteParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
update_password: int
## DataStoreGetMetaParam
**def _\_init__**()
Creates a new `DataStoreGetMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
result_option: int = 0
access_password: int = 0
## DataStoreGetNewArrivedNotificationsParam
**def _\_init__**()
Creates a new `DataStoreGetNewArrivedNotificationsParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
last_notification_id: int
limit: int
## DataStoreGetNotificationUrlParam
**def _\_init__**()
Creates a new `DataStoreGetNotificationUrlParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
previous_url: str
## DataStoreGetSpecificMetaParam
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreGetSpecificMetaParamV1
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreKeyValue
**def _\_init__**()
Creates a new `DataStoreKeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: str
value: str
## DataStoreMetaInfo
**def _\_init__**()
Creates a new `DataStoreMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
create_time: [DateTime](common.md#datetime)
update_time: [DateTime](common.md#datetime)
period: int
status: int
referred_count: int
refer_data_id: int
flag: int
referred_time: [DateTime](common.md#datetime)
expire_time: [DateTime](common.md#datetime)
tags: list[str]
ratings: list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]
## DataStoreNotification
**def _\_init__**()
Creates a new `DataStoreNotification` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStoreNotificationV1
**def _\_init__**()
Creates a new `DataStoreNotificationV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStorePasswordInfo
**def _\_init__**()
Creates a new `DataStorePasswordInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
access_password: int
update_password: int
## DataStorePermission
**def _\_init__**()
Creates a new `DataStorePermission` instance. Required fields must be filled in manually.
The following fields are defined in this class:
permission: int = 3
recipients: list[int] = []
## DataStorePersistenceInfo
**def _\_init__**()
Creates a new `DataStorePersistenceInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
slot_id: int
data_id: int
## DataStorePersistenceInitParam
**def _\_init__**()
Creates a new `DataStorePersistenceInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
persistence_id: int = 65535
delete_last_object: bool = True
## DataStorePersistenceTarget
**def _\_init__**()
Creates a new `DataStorePersistenceTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int = 0
persistence_id: int = 65535
## DataStorePrepareGetParam
**def _\_init__**()
Creates a new `DataStorePrepareGetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
lock_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
access_password: int = 0
If `nex.version` >= 30500:
extra_data: list[str] = []
## DataStorePrepareGetParamV1
**def _\_init__**()
Creates a new `DataStorePrepareGetParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int = 0
## DataStorePreparePostParam
**def _\_init__**()
Creates a new `DataStorePreparePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str] = []
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)] = []
persistence_init_param: [DataStorePersistenceInitParam](#datastorepersistenceinitparam) = [DataStorePersistenceInitParam](#datastorepersistenceinitparam)()
If `nex.version` >= 30500:
extra_data: list[str]
## DataStorePreparePostParamV1
**def _\_init__**()
Creates a new `DataStorePreparePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int = 0
meta_binary: bytes = b""
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str]
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)]
## DataStorePrepareUpdateParam
**def _\_init__**()
Creates a new `DataStorePrepareUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
size: int
update_password: int
extra_data: list[str]
## DataStoreRateObjectParam
**def _\_init__**()
Creates a new `DataStoreRateObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rating_value: int
access_password: int
## DataStoreRatingInfo
**def _\_init__**()
Creates a new `DataStoreRatingInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_value: int
count: int
initial_value: int
## DataStoreRatingInfoWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInfoWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
info: [DataStoreRatingInfo](#datastoreratinginfo) = [DataStoreRatingInfo](#datastoreratinginfo)()
## DataStoreRatingInitParam
**def _\_init__**()
Creates a new `DataStoreRatingInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flag: int
internal_flag: int
lock_type: int
initial_value: int
range_min: int
range_max: int
period_hour: int
period_duration: int
## DataStoreRatingInitParamWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInitParamWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
param: [DataStoreRatingInitParam](#datastoreratinginitparam) = [DataStoreRatingInitParam](#datastoreratinginitparam)()
## DataStoreRatingLog
**def _\_init__**()
Creates a new `DataStoreRatingLog` instance. Required fields must be filled in manually.
The following fields are defined in this class:
is_rated: bool
pid: int
rating_value: int
lock_expiration_time: [DateTime](common.md#datetime)
## DataStoreRatingTarget
**def _\_init__**()
Creates a new `DataStoreRatingTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
slot: int
## DataStoreReqGetAdditionalMeta
**def _\_init__**()
Creates a new `DataStoreReqGetAdditionalMeta` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
data_type: int
version: int
meta_binary: bytes
## DataStoreReqGetInfo
**def _\_init__**()
Creates a new `DataStoreReqGetInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
If `nex.version` >= 30500:
data_id: int
## DataStoreReqGetInfoV1
**def _\_init__**()
Creates a new `DataStoreReqGetInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
## DataStoreReqGetNotificationUrlInfo
**def _\_init__**()
Creates a new `DataStoreReqGetNotificationUrlInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
key: str
query: str
root_ca_cert: bytes
## DataStoreReqPostInfo
**def _\_init__**()
Creates a new `DataStoreReqPostInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqPostInfoV1
**def _\_init__**()
Creates a new `DataStoreReqPostInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqUpdateInfo
**def _\_init__**()
Creates a new `DataStoreReqUpdateInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
version: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreSearchParam
**def _\_init__**()
Creates a new `DataStoreSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
search_target: int = 1
owner_ids: list[int] = []
owner_type: int = 0
destination_ids: list[int] = []
data_type: int = 65535
created_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
created_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
refer_data_id: int = 0
tags: list[str] = []
result_order_column: int = 0
result_order: int = 0
result_range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
result_option: int = 0
minimal_rating_frequency: int = 0
use_cache: bool = False
total_count_enabled: bool = True
data_types: list[int] = []
## DataStoreSearchResult
**def _\_init__**()
Creates a new `DataStoreSearchResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_count: int
result: list[[DataStoreMetaInfo](#datastoremetainfo)]
total_count_type: int
## DataStoreSpecificMetaInfo
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreSpecificMetaInfoV1
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreTouchObjectParam
**def _\_init__**()
Creates a new `DataStoreTouchObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int
access_password: int
================================================
FILE: docs/reference/nex/datastore_miitopia_3ds.md
================================================
# Module: nintendo.nex.datastore_miitopia_3ds
Provides a client and server for the `DataStoreProtocolMiitopia3DS`. This page was generated automatically from `datastore_miitopia_3ds.proto`.
**class** [DataStoreClientMiitopia3DS](#datastoreclientmiitopia3ds)
The client for the `DataStoreProtocolMiitopia3DS`.
**class** [DataStoreServerMiitopia3DS](#datastoreservermiitopia3ds)
The server for the `DataStoreProtocolMiitopia3DS`.
**class** [Category](#category)
**class** [Gender](#gender)
**class** [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)([Structure](common.md))
**class** [DataStoreChangeMetaParam](#datastorechangemetaparam)([Structure](common.md))
**class** [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)([Structure](common.md))
**class** [DataStoreCompletePostParam](#datastorecompletepostparam)([Structure](common.md))
**class** [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)([Structure](common.md))
**class** [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)([Structure](common.md))
**class** [DataStoreDeleteParam](#datastoredeleteparam)([Structure](common.md))
**class** [DataStoreGetMetaParam](#datastoregetmetaparam)([Structure](common.md))
**class** [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)([Structure](common.md))
**class** [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)([Structure](common.md))
**class** [DataStoreKeyValue](#datastorekeyvalue)([Structure](common.md))
**class** [DataStoreMetaInfo](#datastoremetainfo)([Structure](common.md))
**class** [DataStoreNotification](#datastorenotification)([Structure](common.md))
**class** [DataStoreNotificationV1](#datastorenotificationv1)([Structure](common.md))
**class** [DataStorePasswordInfo](#datastorepasswordinfo)([Structure](common.md))
**class** [DataStorePermission](#datastorepermission)([Structure](common.md))
**class** [DataStorePersistenceInfo](#datastorepersistenceinfo)([Structure](common.md))
**class** [DataStorePersistenceInitParam](#datastorepersistenceinitparam)([Structure](common.md))
**class** [DataStorePersistenceTarget](#datastorepersistencetarget)([Structure](common.md))
**class** [DataStorePrepareGetParam](#datastorepreparegetparam)([Structure](common.md))
**class** [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)([Structure](common.md))
**class** [DataStorePreparePostParam](#datastorepreparepostparam)([Structure](common.md))
**class** [DataStorePreparePostParamV1](#datastorepreparepostparamv1)([Structure](common.md))
**class** [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)([Structure](common.md))
**class** [DataStoreRateObjectParam](#datastorerateobjectparam)([Structure](common.md))
**class** [DataStoreRatingInfo](#datastoreratinginfo)([Structure](common.md))
**class** [DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)([Structure](common.md))
**class** [DataStoreRatingInitParam](#datastoreratinginitparam)([Structure](common.md))
**class** [DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)([Structure](common.md))
**class** [DataStoreRatingLog](#datastoreratinglog)([Structure](common.md))
**class** [DataStoreRatingTarget](#datastoreratingtarget)([Structure](common.md))
**class** [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)([Structure](common.md))
**class** [DataStoreReqGetInfo](#datastorereqgetinfo)([Structure](common.md))
**class** [DataStoreReqGetInfoV1](#datastorereqgetinfov1)([Structure](common.md))
**class** [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)([Structure](common.md))
**class** [DataStoreReqPostInfo](#datastorereqpostinfo)([Structure](common.md))
**class** [DataStoreReqPostInfoV1](#datastorereqpostinfov1)([Structure](common.md))
**class** [DataStoreReqUpdateInfo](#datastorerequpdateinfo)([Structure](common.md))
**class** [DataStoreSearchParam](#datastoresearchparam)([Structure](common.md))
**class** [DataStoreSearchResult](#datastoresearchresult)([Structure](common.md))
**class** [DataStoreSpecificMetaInfo](#datastorespecificmetainfo)([Structure](common.md))
**class** [DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)([Structure](common.md))
**class** [DataStoreTouchObjectParam](#datastoretouchobjectparam)([Structure](common.md))
**class** [MiiTubeMiiInfo](#miitubemiiinfo)([Structure](common.md))
**class** [MiiTubeSearchParam](#miitubesearchparam)([Structure](common.md))
**class** [MiiTubeSearchResult](#miitubesearchresult)([Structure](common.md))
## DataStoreClientMiitopia3DS
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`DataStoreClientMiitopia3DS`](#datastoreclientmiitopia3ds).
**async def prepare_get_object_v1**(param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Calls method `1` on the server.
**async def prepare_post_object_v1**(param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Calls method `2` on the server.
**async def complete_post_object_v1**(param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Calls method `3` on the server.
**async def delete_object**(param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Calls method `4` on the server.
**async def delete_objects**(param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `5` on the server.
**async def change_meta_v1**(param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Calls method `6` on the server.
**async def change_metas_v1**(data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `7` on the server.
**async def get_meta**(param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Calls method `8` on the server.
**async def get_metas**(data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Calls method `10` on the server.
**async def complete_update_object**(param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Calls method `11` on the server.
**async def search_object**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `12` on the server.
**async def get_notification_url**(param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Calls method `13` on the server.
**async def get_new_arrived_notifications_v1**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `14` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `15` on the server.
**async def get_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `16` on the server.
**async def get_ratings**(data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Calls method `17` on the server. The RMC response has the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Calls method `18` on the server.
**async def reset_ratings**(data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Calls method `19` on the server.
**async def get_specific_meta_v1**(param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Calls method `20` on the server.
**async def post_meta_binary**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Calls method `21` on the server.
**async def touch_object**(param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Calls method `22` on the server.
**async def get_rating_with_log**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Calls method `23` on the server. The RMC response has the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Calls method `24` on the server.
**async def prepare_get_object**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Calls method `25` on the server.
**async def complete_post_object**(param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Calls method `26` on the server.
**async def get_new_arrived_notifications**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `27` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Calls method `28` on the server.
**async def get_persistence_info**(owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Calls method `29` on the server.
**async def get_persistence_infos**(owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Calls method `30` on the server. The RMC response has the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Calls method `31` on the server.
**async def unperpetuate_object**(persistence_slot_id: int, delete_last_object: bool) -> None
Calls method `32` on the server.
**async def prepare_get_object_or_meta_binary**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Calls method `33` on the server. The RMC response has the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Calls method `34` on the server.
**async def get_password_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `35` on the server. The RMC response has the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Calls method `36` on the server. The RMC response has the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(data_ids: list[int]) -> None
Calls method `37` on the server.
**async def change_meta**(param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Calls method `38` on the server.
**async def change_metas**(data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `39` on the server.
**async def rate_objects**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `40` on the server. The RMC response has the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Calls method `41` on the server.
**async def post_meta_binaries_with_data_id**(data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `42` on the server.
**async def rate_object_with_posting**(target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `43` on the server.
**async def rate_objects_with_posting**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `44` on the server. The RMC response has the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `45` on the server. The RMC response has the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `46` on the server.
**async def search_mii**(param: [MiiTubeSearchParam](#miitubesearchparam)) -> [MiiTubeSearchResult](#miitubesearchresult)
Calls method `47` on the server.
## DataStoreServerMiitopia3DS
**def _\_init__**()
Creates a new [`DataStoreServerMiitopia3DS`](#datastoreservermiitopia3ds).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def prepare_get_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Handler for method `1`. This method should be overridden by a subclass.
**async def prepare_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Handler for method `2`. This method should be overridden by a subclass.
**async def complete_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def delete_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_objects**(client: [RMCClient](rmc.md#rmcclient), param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `5`. This method should be overridden by a subclass.
**async def change_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def change_metas_v1**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Handler for method `10`. This method should be overridden by a subclass.
**async def complete_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def search_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_notification_url**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Handler for method `13`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `14`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `16`. This method should be overridden by a subclass.
**async def get_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Handler for method `17`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def reset_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `19`. This method should be overridden by a subclass.
**async def get_specific_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Handler for method `20`. This method should be overridden by a subclass.
**async def post_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Handler for method `21`. This method should be overridden by a subclass.
**async def touch_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Handler for method `22`. This method should be overridden by a subclass.
**async def get_rating_with_log**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Handler for method `23`. This method should be overridden by a subclass. The RMC response must have the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Handler for method `24`. This method should be overridden by a subclass.
**async def prepare_get_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Handler for method `25`. This method should be overridden by a subclass.
**async def complete_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `27`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Handler for method `28`. This method should be overridden by a subclass.
**async def get_persistence_info**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Handler for method `29`. This method should be overridden by a subclass.
**async def get_persistence_infos**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `30`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Handler for method `31`. This method should be overridden by a subclass.
**async def unperpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, delete_last_object: bool) -> None
Handler for method `32`. This method should be overridden by a subclass.
**async def prepare_get_object_or_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Handler for method `33`. This method should be overridden by a subclass. The RMC response must have the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(client: [RMCClient](rmc.md#rmcclient), data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Handler for method `34`. This method should be overridden by a subclass.
**async def get_password_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `35`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(client: [RMCClient](rmc.md#rmcclient), params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Handler for method `36`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def change_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def change_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `39`. This method should be overridden by a subclass.
**async def rate_objects**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `40`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Handler for method `41`. This method should be overridden by a subclass.
**async def post_meta_binaries_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `42`. This method should be overridden by a subclass.
**async def rate_object_with_posting**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `43`. This method should be overridden by a subclass.
**async def rate_objects_with_posting**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `44`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `45`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `46`. This method should be overridden by a subclass.
**async def search_mii**(client: [RMCClient](rmc.md#rmcclient), param: [MiiTubeSearchParam](#miitubesearchparam)) -> [MiiTubeSearchResult](#miitubesearchresult)
Handler for method `47`. This method should be overridden by a subclass.
## Category
This class defines the following constants:
`SINGING = 0`
`SPORT = 1`
`ACTING = 2`
`COMEDY = 3`
`MUSIC = 4`
`MARTIAL_ARTS = 5`
`DANCING = 6`
`ADVENTURING = 7`
`FILM_DIRECTING = 8`
`COOKING = 9`
`CHATTING = 10`
`PUBLIC_SPEAKING = 11`
`CRAFTWORK = 12`
`DRAWING = 13`
`STUDYING = 14`
`WRITING = 15`
`FASHION = 16`
`DINING = 17`
`NOT_TELLING = 18`
`ANY = 255`
## Gender
This class defines the following constants:
`MALE = 0`
`FEMALE = 1`
`ANY = 2`
## DataStoreChangeMetaCompareParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaCompareParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
comparison_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
referred_count: int
data_type: int
status: int
## DataStoreChangeMetaParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
referred_count: int
data_type: int
status: int
compare_param: [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam) = [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)()
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
## DataStoreChangeMetaParamV1
**def _\_init__**()
Creates a new `DataStoreChangeMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
## DataStoreCompletePostParam
**def _\_init__**()
Creates a new `DataStoreCompletePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompletePostParamV1
**def _\_init__**()
Creates a new `DataStoreCompletePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompleteUpdateParam
**def _\_init__**()
Creates a new `DataStoreCompleteUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
version: int
success: bool
## DataStoreDeleteParam
**def _\_init__**()
Creates a new `DataStoreDeleteParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
update_password: int
## DataStoreGetMetaParam
**def _\_init__**()
Creates a new `DataStoreGetMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
result_option: int = 0
access_password: int = 0
## DataStoreGetNewArrivedNotificationsParam
**def _\_init__**()
Creates a new `DataStoreGetNewArrivedNotificationsParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
last_notification_id: int
limit: int
## DataStoreGetNotificationUrlParam
**def _\_init__**()
Creates a new `DataStoreGetNotificationUrlParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
previous_url: str
## DataStoreGetSpecificMetaParam
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreGetSpecificMetaParamV1
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreKeyValue
**def _\_init__**()
Creates a new `DataStoreKeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: str
value: str
## DataStoreMetaInfo
**def _\_init__**()
Creates a new `DataStoreMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
create_time: [DateTime](common.md#datetime)
update_time: [DateTime](common.md#datetime)
period: int
status: int
referred_count: int
refer_data_id: int
flag: int
referred_time: [DateTime](common.md#datetime)
expire_time: [DateTime](common.md#datetime)
tags: list[str]
ratings: list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]
## DataStoreNotification
**def _\_init__**()
Creates a new `DataStoreNotification` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStoreNotificationV1
**def _\_init__**()
Creates a new `DataStoreNotificationV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStorePasswordInfo
**def _\_init__**()
Creates a new `DataStorePasswordInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
access_password: int
update_password: int
## DataStorePermission
**def _\_init__**()
Creates a new `DataStorePermission` instance. Required fields must be filled in manually.
The following fields are defined in this class:
permission: int = 3
recipients: list[int] = []
## DataStorePersistenceInfo
**def _\_init__**()
Creates a new `DataStorePersistenceInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
slot_id: int
data_id: int
## DataStorePersistenceInitParam
**def _\_init__**()
Creates a new `DataStorePersistenceInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
persistence_id: int = 65535
delete_last_object: bool = True
## DataStorePersistenceTarget
**def _\_init__**()
Creates a new `DataStorePersistenceTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int = 0
persistence_id: int = 65535
## DataStorePrepareGetParam
**def _\_init__**()
Creates a new `DataStorePrepareGetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
lock_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
access_password: int = 0
If `nex.version` >= 30500:
extra_data: list[str] = []
## DataStorePrepareGetParamV1
**def _\_init__**()
Creates a new `DataStorePrepareGetParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int = 0
## DataStorePreparePostParam
**def _\_init__**()
Creates a new `DataStorePreparePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str] = []
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)] = []
persistence_init_param: [DataStorePersistenceInitParam](#datastorepersistenceinitparam) = [DataStorePersistenceInitParam](#datastorepersistenceinitparam)()
If `nex.version` >= 30500:
extra_data: list[str]
## DataStorePreparePostParamV1
**def _\_init__**()
Creates a new `DataStorePreparePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int = 0
meta_binary: bytes = b""
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str]
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)]
## DataStorePrepareUpdateParam
**def _\_init__**()
Creates a new `DataStorePrepareUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
size: int
update_password: int
extra_data: list[str]
## DataStoreRateObjectParam
**def _\_init__**()
Creates a new `DataStoreRateObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rating_value: int
access_password: int
## DataStoreRatingInfo
**def _\_init__**()
Creates a new `DataStoreRatingInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_value: int
count: int
initial_value: int
## DataStoreRatingInfoWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInfoWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
info: [DataStoreRatingInfo](#datastoreratinginfo) = [DataStoreRatingInfo](#datastoreratinginfo)()
## DataStoreRatingInitParam
**def _\_init__**()
Creates a new `DataStoreRatingInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flag: int
internal_flag: int
lock_type: int
initial_value: int
range_min: int
range_max: int
period_hour: int
period_duration: int
## DataStoreRatingInitParamWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInitParamWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
param: [DataStoreRatingInitParam](#datastoreratinginitparam) = [DataStoreRatingInitParam](#datastoreratinginitparam)()
## DataStoreRatingLog
**def _\_init__**()
Creates a new `DataStoreRatingLog` instance. Required fields must be filled in manually.
The following fields are defined in this class:
is_rated: bool
pid: int
rating_value: int
lock_expiration_time: [DateTime](common.md#datetime)
## DataStoreRatingTarget
**def _\_init__**()
Creates a new `DataStoreRatingTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
slot: int
## DataStoreReqGetAdditionalMeta
**def _\_init__**()
Creates a new `DataStoreReqGetAdditionalMeta` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
data_type: int
version: int
meta_binary: bytes
## DataStoreReqGetInfo
**def _\_init__**()
Creates a new `DataStoreReqGetInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
If `nex.version` >= 30500:
data_id: int
## DataStoreReqGetInfoV1
**def _\_init__**()
Creates a new `DataStoreReqGetInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
## DataStoreReqGetNotificationUrlInfo
**def _\_init__**()
Creates a new `DataStoreReqGetNotificationUrlInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
key: str
query: str
root_ca_cert: bytes
## DataStoreReqPostInfo
**def _\_init__**()
Creates a new `DataStoreReqPostInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqPostInfoV1
**def _\_init__**()
Creates a new `DataStoreReqPostInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqUpdateInfo
**def _\_init__**()
Creates a new `DataStoreReqUpdateInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
version: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreSearchParam
**def _\_init__**()
Creates a new `DataStoreSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
search_target: int = 1
owner_ids: list[int] = []
owner_type: int = 0
destination_ids: list[int] = []
data_type: int = 65535
created_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
created_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
refer_data_id: int = 0
tags: list[str] = []
result_order_column: int = 0
result_order: int = 0
result_range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
result_option: int = 0
minimal_rating_frequency: int = 0
use_cache: bool = False
total_count_enabled: bool = True
data_types: list[int] = []
## DataStoreSearchResult
**def _\_init__**()
Creates a new `DataStoreSearchResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_count: int
result: list[[DataStoreMetaInfo](#datastoremetainfo)]
total_count_type: int
## DataStoreSpecificMetaInfo
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreSpecificMetaInfoV1
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreTouchObjectParam
**def _\_init__**()
Creates a new `DataStoreTouchObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int
access_password: int
## MiiTubeMiiInfo
**def _\_init__**()
Creates a new `MiiTubeMiiInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
meta_info: [DataStoreMetaInfo](#datastoremetainfo) = [DataStoreMetaInfo](#datastoremetainfo)()
category: int
ranking_type: int
## MiiTubeSearchParam
**def _\_init__**()
Creates a new `MiiTubeSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
name: str
page: int = 0
category: int = 255
gender: int = 2
country: int
search_type: int = 0
result_option: int = 0
## MiiTubeSearchResult
**def _\_init__**()
Creates a new `MiiTubeSearchResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
result: list[[MiiTubeMiiInfo](#miitubemiiinfo)]
count: int
page: int
has_next: bool
================================================
FILE: docs/reference/nex/datastore_smm.md
================================================
# Module: nintendo.nex.datastore_smm
Provides a client and server for the `DataStoreProtocolSMM`. This page was generated automatically from `datastore_smm.proto`.
**class** [DataStoreClientSMM](#datastoreclientsmm)
The client for the `DataStoreProtocolSMM`.
**class** [DataStoreServerSMM](#datastoreserversmm)
The server for the `DataStoreProtocolSMM`.
**class** [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)([Structure](common.md))
**class** [DataStoreChangeMetaParam](#datastorechangemetaparam)([Structure](common.md))
**class** [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)([Structure](common.md))
**class** [DataStoreCompletePostParam](#datastorecompletepostparam)([Structure](common.md))
**class** [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)([Structure](common.md))
**class** [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)([Structure](common.md))
**class** [DataStoreDeleteParam](#datastoredeleteparam)([Structure](common.md))
**class** [DataStoreGetMetaParam](#datastoregetmetaparam)([Structure](common.md))
**class** [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)([Structure](common.md))
**class** [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)([Structure](common.md))
**class** [DataStoreKeyValue](#datastorekeyvalue)([Structure](common.md))
**class** [DataStoreMetaInfo](#datastoremetainfo)([Structure](common.md))
**class** [DataStoreNotification](#datastorenotification)([Structure](common.md))
**class** [DataStoreNotificationV1](#datastorenotificationv1)([Structure](common.md))
**class** [DataStorePasswordInfo](#datastorepasswordinfo)([Structure](common.md))
**class** [DataStorePermission](#datastorepermission)([Structure](common.md))
**class** [DataStorePersistenceInfo](#datastorepersistenceinfo)([Structure](common.md))
**class** [DataStorePersistenceInitParam](#datastorepersistenceinitparam)([Structure](common.md))
**class** [DataStorePersistenceTarget](#datastorepersistencetarget)([Structure](common.md))
**class** [DataStorePrepareGetParam](#datastorepreparegetparam)([Structure](common.md))
**class** [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)([Structure](common.md))
**class** [DataStorePreparePostParam](#datastorepreparepostparam)([Structure](common.md))
**class** [DataStorePreparePostParamV1](#datastorepreparepostparamv1)([Structure](common.md))
**class** [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)([Structure](common.md))
**class** [DataStoreRateObjectParam](#datastorerateobjectparam)([Structure](common.md))
**class** [DataStoreRatingInfo](#datastoreratinginfo)([Structure](common.md))
**class** [DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)([Structure](common.md))
**class** [DataStoreRatingInitParam](#datastoreratinginitparam)([Structure](common.md))
**class** [DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)([Structure](common.md))
**class** [DataStoreRatingLog](#datastoreratinglog)([Structure](common.md))
**class** [DataStoreRatingTarget](#datastoreratingtarget)([Structure](common.md))
**class** [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)([Structure](common.md))
**class** [DataStoreReqGetInfo](#datastorereqgetinfo)([Structure](common.md))
**class** [DataStoreReqGetInfoV1](#datastorereqgetinfov1)([Structure](common.md))
**class** [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)([Structure](common.md))
**class** [DataStoreReqPostInfo](#datastorereqpostinfo)([Structure](common.md))
**class** [DataStoreReqPostInfoV1](#datastorereqpostinfov1)([Structure](common.md))
**class** [DataStoreReqUpdateInfo](#datastorerequpdateinfo)([Structure](common.md))
**class** [DataStoreSearchParam](#datastoresearchparam)([Structure](common.md))
**class** [DataStoreSearchResult](#datastoresearchresult)([Structure](common.md))
**class** [DataStoreSpecificMetaInfo](#datastorespecificmetainfo)([Structure](common.md))
**class** [DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)([Structure](common.md))
**class** [DataStoreTouchObjectParam](#datastoretouchobjectparam)([Structure](common.md))
## DataStoreClientSMM
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`DataStoreClientSMM`](#datastoreclientsmm).
**async def prepare_get_object_v1**(param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Calls method `1` on the server.
**async def prepare_post_object_v1**(param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Calls method `2` on the server.
**async def complete_post_object_v1**(param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Calls method `3` on the server.
**async def delete_object**(param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Calls method `4` on the server.
**async def delete_objects**(param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `5` on the server.
**async def change_meta_v1**(param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Calls method `6` on the server.
**async def change_metas_v1**(data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `7` on the server.
**async def get_meta**(param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Calls method `8` on the server.
**async def get_metas**(data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Calls method `10` on the server.
**async def complete_update_object**(param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Calls method `11` on the server.
**async def search_object**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `12` on the server.
**async def get_notification_url**(param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Calls method `13` on the server.
**async def get_new_arrived_notifications_v1**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `14` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `15` on the server.
**async def get_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `16` on the server.
**async def get_ratings**(data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Calls method `17` on the server. The RMC response has the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Calls method `18` on the server.
**async def reset_ratings**(data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Calls method `19` on the server.
**async def get_specific_meta_v1**(param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Calls method `20` on the server.
**async def post_meta_binary**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Calls method `21` on the server.
**async def touch_object**(param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Calls method `22` on the server.
**async def get_rating_with_log**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Calls method `23` on the server. The RMC response has the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Calls method `24` on the server.
**async def prepare_get_object**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Calls method `25` on the server.
**async def complete_post_object**(param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Calls method `26` on the server.
**async def get_new_arrived_notifications**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `27` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Calls method `28` on the server.
**async def get_persistence_info**(owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Calls method `29` on the server.
**async def get_persistence_infos**(owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Calls method `30` on the server. The RMC response has the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Calls method `31` on the server.
**async def unperpetuate_object**(persistence_slot_id: int, delete_last_object: bool) -> None
Calls method `32` on the server.
**async def prepare_get_object_or_meta_binary**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Calls method `33` on the server. The RMC response has the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Calls method `34` on the server.
**async def get_password_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `35` on the server. The RMC response has the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Calls method `36` on the server. The RMC response has the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(data_ids: list[int]) -> None
Calls method `37` on the server.
**async def change_meta**(param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Calls method `38` on the server.
**async def change_metas**(data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `39` on the server.
**async def rate_objects**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `40` on the server. The RMC response has the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Calls method `41` on the server.
**async def post_meta_binaries_with_data_id**(data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `42` on the server.
**async def rate_object_with_posting**(target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `43` on the server.
**async def rate_objects_with_posting**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `44` on the server. The RMC response has the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `45` on the server. The RMC response has the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `46` on the server.
**async def get_application_config**(id: int) -> list[int]
Calls method `61` on the server.
**async def get_application_config_string**(id: int) -> list[str]
Calls method `74` on the server.
## DataStoreServerSMM
**def _\_init__**()
Creates a new [`DataStoreServerSMM`](#datastoreserversmm).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def prepare_get_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Handler for method `1`. This method should be overridden by a subclass.
**async def prepare_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Handler for method `2`. This method should be overridden by a subclass.
**async def complete_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def delete_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_objects**(client: [RMCClient](rmc.md#rmcclient), param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `5`. This method should be overridden by a subclass.
**async def change_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def change_metas_v1**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Handler for method `10`. This method should be overridden by a subclass.
**async def complete_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def search_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_notification_url**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Handler for method `13`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `14`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `16`. This method should be overridden by a subclass.
**async def get_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Handler for method `17`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def reset_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `19`. This method should be overridden by a subclass.
**async def get_specific_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Handler for method `20`. This method should be overridden by a subclass.
**async def post_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Handler for method `21`. This method should be overridden by a subclass.
**async def touch_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Handler for method `22`. This method should be overridden by a subclass.
**async def get_rating_with_log**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Handler for method `23`. This method should be overridden by a subclass. The RMC response must have the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Handler for method `24`. This method should be overridden by a subclass.
**async def prepare_get_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Handler for method `25`. This method should be overridden by a subclass.
**async def complete_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `27`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Handler for method `28`. This method should be overridden by a subclass.
**async def get_persistence_info**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Handler for method `29`. This method should be overridden by a subclass.
**async def get_persistence_infos**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `30`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Handler for method `31`. This method should be overridden by a subclass.
**async def unperpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, delete_last_object: bool) -> None
Handler for method `32`. This method should be overridden by a subclass.
**async def prepare_get_object_or_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Handler for method `33`. This method should be overridden by a subclass. The RMC response must have the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(client: [RMCClient](rmc.md#rmcclient), data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Handler for method `34`. This method should be overridden by a subclass.
**async def get_password_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `35`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(client: [RMCClient](rmc.md#rmcclient), params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Handler for method `36`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def change_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def change_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `39`. This method should be overridden by a subclass.
**async def rate_objects**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `40`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Handler for method `41`. This method should be overridden by a subclass.
**async def post_meta_binaries_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `42`. This method should be overridden by a subclass.
**async def rate_object_with_posting**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `43`. This method should be overridden by a subclass.
**async def rate_objects_with_posting**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `44`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `45`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `46`. This method should be overridden by a subclass.
**async def get_application_config**(client: [RMCClient](rmc.md#rmcclient), id: int) -> list[int]
Handler for method `61`. This method should be overridden by a subclass.
**async def get_application_config_string**(client: [RMCClient](rmc.md#rmcclient), id: int) -> list[str]
Handler for method `74`. This method should be overridden by a subclass.
## DataStoreChangeMetaCompareParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaCompareParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
comparison_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
referred_count: int
data_type: int
status: int
## DataStoreChangeMetaParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
referred_count: int
data_type: int
status: int
compare_param: [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam) = [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)()
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
## DataStoreChangeMetaParamV1
**def _\_init__**()
Creates a new `DataStoreChangeMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
## DataStoreCompletePostParam
**def _\_init__**()
Creates a new `DataStoreCompletePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompletePostParamV1
**def _\_init__**()
Creates a new `DataStoreCompletePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompleteUpdateParam
**def _\_init__**()
Creates a new `DataStoreCompleteUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
version: int
success: bool
## DataStoreDeleteParam
**def _\_init__**()
Creates a new `DataStoreDeleteParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
update_password: int
## DataStoreGetMetaParam
**def _\_init__**()
Creates a new `DataStoreGetMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
result_option: int = 0
access_password: int = 0
## DataStoreGetNewArrivedNotificationsParam
**def _\_init__**()
Creates a new `DataStoreGetNewArrivedNotificationsParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
last_notification_id: int
limit: int
## DataStoreGetNotificationUrlParam
**def _\_init__**()
Creates a new `DataStoreGetNotificationUrlParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
previous_url: str
## DataStoreGetSpecificMetaParam
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreGetSpecificMetaParamV1
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreKeyValue
**def _\_init__**()
Creates a new `DataStoreKeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: str
value: str
## DataStoreMetaInfo
**def _\_init__**()
Creates a new `DataStoreMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
create_time: [DateTime](common.md#datetime)
update_time: [DateTime](common.md#datetime)
period: int
status: int
referred_count: int
refer_data_id: int
flag: int
referred_time: [DateTime](common.md#datetime)
expire_time: [DateTime](common.md#datetime)
tags: list[str]
ratings: list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]
## DataStoreNotification
**def _\_init__**()
Creates a new `DataStoreNotification` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStoreNotificationV1
**def _\_init__**()
Creates a new `DataStoreNotificationV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStorePasswordInfo
**def _\_init__**()
Creates a new `DataStorePasswordInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
access_password: int
update_password: int
## DataStorePermission
**def _\_init__**()
Creates a new `DataStorePermission` instance. Required fields must be filled in manually.
The following fields are defined in this class:
permission: int = 3
recipients: list[int] = []
## DataStorePersistenceInfo
**def _\_init__**()
Creates a new `DataStorePersistenceInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
slot_id: int
data_id: int
## DataStorePersistenceInitParam
**def _\_init__**()
Creates a new `DataStorePersistenceInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
persistence_id: int = 65535
delete_last_object: bool = True
## DataStorePersistenceTarget
**def _\_init__**()
Creates a new `DataStorePersistenceTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int = 0
persistence_id: int = 65535
## DataStorePrepareGetParam
**def _\_init__**()
Creates a new `DataStorePrepareGetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
lock_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
access_password: int = 0
If `nex.version` >= 30500:
extra_data: list[str] = []
## DataStorePrepareGetParamV1
**def _\_init__**()
Creates a new `DataStorePrepareGetParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int = 0
## DataStorePreparePostParam
**def _\_init__**()
Creates a new `DataStorePreparePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str] = []
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)] = []
persistence_init_param: [DataStorePersistenceInitParam](#datastorepersistenceinitparam) = [DataStorePersistenceInitParam](#datastorepersistenceinitparam)()
If `nex.version` >= 30500:
extra_data: list[str]
## DataStorePreparePostParamV1
**def _\_init__**()
Creates a new `DataStorePreparePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int = 0
meta_binary: bytes = b""
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str]
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)]
## DataStorePrepareUpdateParam
**def _\_init__**()
Creates a new `DataStorePrepareUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
size: int
update_password: int
extra_data: list[str]
## DataStoreRateObjectParam
**def _\_init__**()
Creates a new `DataStoreRateObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rating_value: int
access_password: int
## DataStoreRatingInfo
**def _\_init__**()
Creates a new `DataStoreRatingInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_value: int
count: int
initial_value: int
## DataStoreRatingInfoWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInfoWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
info: [DataStoreRatingInfo](#datastoreratinginfo) = [DataStoreRatingInfo](#datastoreratinginfo)()
## DataStoreRatingInitParam
**def _\_init__**()
Creates a new `DataStoreRatingInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flag: int
internal_flag: int
lock_type: int
initial_value: int
range_min: int
range_max: int
period_hour: int
period_duration: int
## DataStoreRatingInitParamWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInitParamWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
param: [DataStoreRatingInitParam](#datastoreratinginitparam) = [DataStoreRatingInitParam](#datastoreratinginitparam)()
## DataStoreRatingLog
**def _\_init__**()
Creates a new `DataStoreRatingLog` instance. Required fields must be filled in manually.
The following fields are defined in this class:
is_rated: bool
pid: int
rating_value: int
lock_expiration_time: [DateTime](common.md#datetime)
## DataStoreRatingTarget
**def _\_init__**()
Creates a new `DataStoreRatingTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
slot: int
## DataStoreReqGetAdditionalMeta
**def _\_init__**()
Creates a new `DataStoreReqGetAdditionalMeta` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
data_type: int
version: int
meta_binary: bytes
## DataStoreReqGetInfo
**def _\_init__**()
Creates a new `DataStoreReqGetInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
If `nex.version` >= 30500:
data_id: int
## DataStoreReqGetInfoV1
**def _\_init__**()
Creates a new `DataStoreReqGetInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
## DataStoreReqGetNotificationUrlInfo
**def _\_init__**()
Creates a new `DataStoreReqGetNotificationUrlInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
key: str
query: str
root_ca_cert: bytes
## DataStoreReqPostInfo
**def _\_init__**()
Creates a new `DataStoreReqPostInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqPostInfoV1
**def _\_init__**()
Creates a new `DataStoreReqPostInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqUpdateInfo
**def _\_init__**()
Creates a new `DataStoreReqUpdateInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
version: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreSearchParam
**def _\_init__**()
Creates a new `DataStoreSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
search_target: int = 1
owner_ids: list[int] = []
owner_type: int = 0
destination_ids: list[int] = []
data_type: int = 65535
created_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
created_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
refer_data_id: int = 0
tags: list[str] = []
result_order_column: int = 0
result_order: int = 0
result_range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
result_option: int = 0
minimal_rating_frequency: int = 0
use_cache: bool = False
total_count_enabled: bool = True
data_types: list[int] = []
## DataStoreSearchResult
**def _\_init__**()
Creates a new `DataStoreSearchResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_count: int
result: list[[DataStoreMetaInfo](#datastoremetainfo)]
total_count_type: int
## DataStoreSpecificMetaInfo
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreSpecificMetaInfoV1
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreTouchObjectParam
**def _\_init__**()
Creates a new `DataStoreTouchObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int
access_password: int
================================================
FILE: docs/reference/nex/datastore_smm2.md
================================================
# Module: nintendo.nex.datastore_smm2
Provides a client and server for the `DataStoreProtocolSMM2`. This page was generated automatically from `datastore_smm2.proto`.
**class** [DataStoreClientSMM2](#datastoreclientsmm2)
The client for the `DataStoreProtocolSMM2`.
**class** [DataStoreServerSMM2](#datastoreserversmm2)
The server for the `DataStoreProtocolSMM2`.
**class** [ClearCondition](#clearcondition)
**class** [CourseDifficulty](#coursedifficulty)
**class** [CourseOption](#courseoption)
**class** [CourseTag](#coursetag)
**class** [CourseTheme](#coursetheme)
**class** [EventCourseOption](#eventcourseoption)
**class** [GameStyle](#gamestyle)
**class** [MultiplayerStatsKeys](#multiplayerstatskeys)
**class** [PlayStatsKeys](#playstatskeys)
**class** [UserOption](#useroption)
**class** [BadgeInfo](#badgeinfo)([Structure](common.md))
**class** [CommentInfo](#commentinfo)([Structure](common.md))
**class** [CommentPictureReqGetInfoWithoutHeaders](#commentpicturereqgetinfowithoutheaders)([Structure](common.md))
**class** [CourseInfo](#courseinfo)([Structure](common.md))
**class** [CourseTimeStats](#coursetimestats)([Structure](common.md))
**class** [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)([Structure](common.md))
**class** [DataStoreChangeMetaParam](#datastorechangemetaparam)([Structure](common.md))
**class** [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)([Structure](common.md))
**class** [DataStoreCompletePostParam](#datastorecompletepostparam)([Structure](common.md))
**class** [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)([Structure](common.md))
**class** [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)([Structure](common.md))
**class** [DataStoreDeleteParam](#datastoredeleteparam)([Structure](common.md))
**class** [DataStoreGetMetaParam](#datastoregetmetaparam)([Structure](common.md))
**class** [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)([Structure](common.md))
**class** [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)([Structure](common.md))
**class** [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)([Structure](common.md))
**class** [DataStoreKeyValue](#datastorekeyvalue)([Structure](common.md))
**class** [DataStoreMetaInfo](#datastoremetainfo)([Structure](common.md))
**class** [DataStoreNotification](#datastorenotification)([Structure](common.md))
**class** [DataStoreNotificationV1](#datastorenotificationv1)([Structure](common.md))
**class** [DataStorePasswordInfo](#datastorepasswordinfo)([Structure](common.md))
**class** [DataStorePermission](#datastorepermission)([Structure](common.md))
**class** [DataStorePersistenceInfo](#datastorepersistenceinfo)([Structure](common.md))
**class** [DataStorePersistenceInitParam](#datastorepersistenceinitparam)([Structure](common.md))
**class** [DataStorePersistenceTarget](#datastorepersistencetarget)([Structure](common.md))
**class** [DataStorePrepareGetParam](#datastorepreparegetparam)([Structure](common.md))
**class** [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)([Structure](common.md))
**class** [DataStorePreparePostParam](#datastorepreparepostparam)([Structure](common.md))
**class** [DataStorePreparePostParamV1](#datastorepreparepostparamv1)([Structure](common.md))
**class** [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)([Structure](common.md))
**class** [DataStoreRateObjectParam](#datastorerateobjectparam)([Structure](common.md))
**class** [DataStoreRatingInfo](#datastoreratinginfo)([Structure](common.md))
**class** [DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)([Structure](common.md))
**class** [DataStoreRatingInitParam](#datastoreratinginitparam)([Structure](common.md))
**class** [DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)([Structure](common.md))
**class** [DataStoreRatingLog](#datastoreratinglog)([Structure](common.md))
**class** [DataStoreRatingTarget](#datastoreratingtarget)([Structure](common.md))
**class** [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)([Structure](common.md))
**class** [DataStoreReqGetInfo](#datastorereqgetinfo)([Structure](common.md))
**class** [DataStoreReqGetInfoV1](#datastorereqgetinfov1)([Structure](common.md))
**class** [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)([Structure](common.md))
**class** [DataStoreReqPostInfo](#datastorereqpostinfo)([Structure](common.md))
**class** [DataStoreReqPostInfoV1](#datastorereqpostinfov1)([Structure](common.md))
**class** [DataStoreReqUpdateInfo](#datastorerequpdateinfo)([Structure](common.md))
**class** [DataStoreSearchParam](#datastoresearchparam)([Structure](common.md))
**class** [DataStoreSearchResult](#datastoresearchresult)([Structure](common.md))
**class** [DataStoreSpecificMetaInfo](#datastorespecificmetainfo)([Structure](common.md))
**class** [DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)([Structure](common.md))
**class** [DataStoreTouchObjectParam](#datastoretouchobjectparam)([Structure](common.md))
**class** [DeathPositionInfo](#deathpositioninfo)([Structure](common.md))
**class** [EventCourseGhostInfo](#eventcourseghostinfo)([Structure](common.md))
**class** [EventCourseHistogram](#eventcoursehistogram)([Structure](common.md))
**class** [EventCourseInfo](#eventcourseinfo)([Structure](common.md))
**class** [EventCourseStatusInfo](#eventcoursestatusinfo)([Structure](common.md))
**class** [EventCourseThumbnail](#eventcoursethumbnail)([Structure](common.md))
**class** [GetCoursesEventParam](#getcourseseventparam)([Structure](common.md))
**class** [GetCoursesParam](#getcoursesparam)([Structure](common.md))
**class** [GetEventCourseGhostParam](#geteventcourseghostparam)([Structure](common.md))
**class** [GetEventCourseHistogramParam](#geteventcoursehistogramparam)([Structure](common.md))
**class** [GetUserOrCourseParam](#getuserorcourseparam)([Structure](common.md))
**class** [GetUsersParam](#getusersparam)([Structure](common.md))
**class** [GetWorldMapParam](#getworldmapparam)([Structure](common.md))
**class** [RegisterUserParam](#registeruserparam)([Structure](common.md))
**class** [RelationObjectReqGetInfo](#relationobjectreqgetinfo)([Structure](common.md))
**class** [ReqGetInfoHeadersInfo](#reqgetinfoheadersinfo)([Structure](common.md))
**class** [SearchCommentsInOrderParam](#searchcommentsinorderparam)([Structure](common.md))
**class** [SearchCoursesBestTimeParam](#searchcoursesbesttimeparam)([Structure](common.md))
**class** [SearchCoursesEndlessModeParam](#searchcoursesendlessmodeparam)([Structure](common.md))
**class** [SearchCoursesEventParam](#searchcourseseventparam)([Structure](common.md))
**class** [SearchCoursesFirstClearParam](#searchcoursesfirstclearparam)([Structure](common.md))
**class** [SearchCoursesLatestParam](#searchcourseslatestparam)([Structure](common.md))
**class** [SearchCoursesPlayedByParam](#searchcoursesplayedbyparam)([Structure](common.md))
**class** [SearchCoursesPointRankingParam](#searchcoursespointrankingparam)([Structure](common.md))
**class** [SearchCoursesPositiveRatedByParam](#searchcoursespositiveratedbyparam)([Structure](common.md))
**class** [SearchCoursesPostedByParam](#searchcoursespostedbyparam)([Structure](common.md))
**class** [SearchUsersClearedCourseParam](#searchusersclearedcourseparam)([Structure](common.md))
**class** [SearchUsersPlayedCourseParam](#searchusersplayedcourseparam)([Structure](common.md))
**class** [SearchUsersPositiveRatedCourseParam](#searchuserspositiveratedcourseparam)([Structure](common.md))
**class** [SearchUsersUserPointParam](#searchusersuserpointparam)([Structure](common.md))
**class** [SearchWorldMapPickUpParam](#searchworldmappickupparam)([Structure](common.md))
**class** [SearchWorldMapPlayedByParam](#searchworldmapplayedbyparam)([Structure](common.md))
**class** [SyncUserProfileParam](#syncuserprofileparam)([Structure](common.md))
**class** [SyncUserProfileResult](#syncuserprofileresult)([Structure](common.md))
**class** [UnknownStruct1](#unknownstruct1)([Structure](common.md))
**class** [UnknownStruct3](#unknownstruct3)([Structure](common.md))
**class** [UnknownStruct6](#unknownstruct6)([Structure](common.md))
**class** [UserInfo](#userinfo)([Structure](common.md))
**class** [WorldMapInfo](#worldmapinfo)([Structure](common.md))
## DataStoreClientSMM2
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`DataStoreClientSMM2`](#datastoreclientsmm2).
**async def prepare_get_object_v1**(param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Calls method `1` on the server.
**async def prepare_post_object_v1**(param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Calls method `2` on the server.
**async def complete_post_object_v1**(param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Calls method `3` on the server.
**async def delete_object**(param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Calls method `4` on the server.
**async def delete_objects**(param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `5` on the server.
**async def change_meta_v1**(param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Calls method `6` on the server.
**async def change_metas_v1**(data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `7` on the server.
**async def get_meta**(param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Calls method `8` on the server.
**async def get_metas**(data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Calls method `10` on the server.
**async def complete_update_object**(param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Calls method `11` on the server.
**async def search_object**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `12` on the server.
**async def get_notification_url**(param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Calls method `13` on the server.
**async def get_new_arrived_notifications_v1**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `14` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `15` on the server.
**async def get_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `16` on the server.
**async def get_ratings**(data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Calls method `17` on the server. The RMC response has the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Calls method `18` on the server.
**async def reset_ratings**(data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Calls method `19` on the server.
**async def get_specific_meta_v1**(param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Calls method `20` on the server.
**async def post_meta_binary**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Calls method `21` on the server.
**async def touch_object**(param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Calls method `22` on the server.
**async def get_rating_with_log**(target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Calls method `23` on the server. The RMC response has the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Calls method `24` on the server.
**async def prepare_get_object**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Calls method `25` on the server.
**async def complete_post_object**(param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Calls method `26` on the server.
**async def get_new_arrived_notifications**(param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Calls method `27` on the server. The RMC response has the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Calls method `28` on the server.
**async def get_persistence_info**(owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Calls method `29` on the server.
**async def get_persistence_infos**(owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Calls method `30` on the server. The RMC response has the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Calls method `31` on the server.
**async def unperpetuate_object**(persistence_slot_id: int, delete_last_object: bool) -> None
Calls method `32` on the server.
**async def prepare_get_object_or_meta_binary**(param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Calls method `33` on the server. The RMC response has the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Calls method `34` on the server.
**async def get_password_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `35` on the server. The RMC response has the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Calls method `36` on the server. The RMC response has the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(data_ids: list[int]) -> None
Calls method `37` on the server.
**async def change_meta**(param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Calls method `38` on the server.
**async def change_metas**(data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `39` on the server.
**async def rate_objects**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `40` on the server. The RMC response has the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Calls method `41` on the server.
**async def post_meta_binaries_with_data_id**(data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Calls method `42` on the server.
**async def rate_object_with_posting**(target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Calls method `43` on the server.
**async def rate_objects_with_posting**(targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Calls method `44` on the server. The RMC response has the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(data_ids: list[int]) -> [RMCResponse](common.md)
Calls method `45` on the server. The RMC response has the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Calls method `46` on the server.
**async def register_user**(param: [RegisterUserParam](#registeruserparam)) -> None
Calls method `47` on the server.
**async def get_users**(param: [GetUsersParam](#getusersparam)) -> [RMCResponse](common.md)
Calls method `48` on the server. The RMC response has the following attributes:
users: list[[UserInfo](#userinfo)]
results: list[[Result](common.md#result)]
**async def sync_user_profile**(param: [SyncUserProfileParam](#syncuserprofileparam)) -> [SyncUserProfileResult](#syncuserprofileresult)
Calls method `49` on the server.
**async def search_users_user_point**(param: [SearchUsersUserPointParam](#searchusersuserpointparam)) -> [RMCResponse](common.md)
Calls method `50` on the server. The RMC response has the following attributes:
users: list[[UserInfo](#userinfo)]
ranks: list[int]
result: bool
**async def search_users_played_course**(param: [SearchUsersPlayedCourseParam](#searchusersplayedcourseparam)) -> list[[UserInfo](#userinfo)]
Calls method `53` on the server.
**async def search_users_cleared_course**(param: [SearchUsersClearedCourseParam](#searchusersclearedcourseparam)) -> list[[UserInfo](#userinfo)]
Calls method `54` on the server.
**async def search_users_positive_rated_course**(param: [SearchUsersPositiveRatedCourseParam](#searchuserspositiveratedcourseparam)) -> list[[UserInfo](#userinfo)]
Calls method `55` on the server.
**async def update_last_login_time**() -> None
Calls method `59` on the server.
**async def get_username_ng_type**() -> int
Calls method `65` on the server.
**async def get_courses**(param: [GetCoursesParam](#getcoursesparam)) -> [RMCResponse](common.md)
Calls method `70` on the server. The RMC response has the following attributes:
courses: list[[CourseInfo](#courseinfo)]
results: list[[Result](common.md#result)]
**async def search_courses_point_ranking**(param: [SearchCoursesPointRankingParam](#searchcoursespointrankingparam)) -> [RMCResponse](common.md)
Calls method `71` on the server. The RMC response has the following attributes:
courses: list[[CourseInfo](#courseinfo)]
ranks: list[int]
result: bool
**async def search_courses_latest**(param: [SearchCoursesLatestParam](#searchcourseslatestparam)) -> [RMCResponse](common.md)
Calls method `73` on the server. The RMC response has the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def search_courses_posted_by**(param: [SearchCoursesPostedByParam](#searchcoursespostedbyparam)) -> [RMCResponse](common.md)
Calls method `74` on the server. The RMC response has the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def search_courses_positive_rated_by**(param: [SearchCoursesPositiveRatedByParam](#searchcoursespositiveratedbyparam)) -> list[[CourseInfo](#courseinfo)]
Calls method `75` on the server.
**async def search_courses_played_by**(param: [SearchCoursesPlayedByParam](#searchcoursesplayedbyparam)) -> list[[CourseInfo](#courseinfo)]
Calls method `76` on the server.
**async def search_courses_endless_mode**(param: [SearchCoursesEndlessModeParam](#searchcoursesendlessmodeparam)) -> list[[CourseInfo](#courseinfo)]
Calls method `79` on the server.
**async def search_courses_first_clear**(param: [SearchCoursesFirstClearParam](#searchcoursesfirstclearparam)) -> [RMCResponse](common.md)
Calls method `80` on the server. The RMC response has the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def search_courses_best_time**(param: [SearchCoursesBestTimeParam](#searchcoursesbesttimeparam)) -> [RMCResponse](common.md)
Calls method `81` on the server. The RMC response has the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def get_courses_event**(param: [GetCoursesParam](#getcoursesparam), dummy: [GetCoursesEventParam](#getcourseseventparam)) -> [RMCResponse](common.md)
Calls method `85` on the server. The RMC response has the following attributes:
courses: list[[EventCourseInfo](#eventcourseinfo)]
results: list[[Result](common.md#result)]
**async def search_courses_event**(param: [SearchCoursesEventParam](#searchcourseseventparam)) -> list[[EventCourseInfo](#eventcourseinfo)]
Calls method `86` on the server.
**async def search_comments_in_order**(param: [SearchCommentsInOrderParam](#searchcommentsinorderparam)) -> [RMCResponse](common.md)
Calls method `94` on the server. The RMC response has the following attributes:
comments: list[[CommentInfo](#commentinfo)]
result: bool
**async def search_comments**(data_id: int) -> list[[CommentInfo](#commentinfo)]
Calls method `95` on the server.
**async def get_death_positions**(data_id: int) -> list[[DeathPositionInfo](#deathpositioninfo)]
Calls method `103` on the server.
**async def get_user_or_course**(param: [GetUserOrCourseParam](#getuserorcourseparam)) -> [RMCResponse](common.md)
Calls method `131` on the server. The RMC response has the following attributes:
user: [UserInfo](#userinfo)
course: [CourseInfo](#courseinfo)
**async def get_req_get_info_headers_info**(type: int) -> [ReqGetInfoHeadersInfo](#reqgetinfoheadersinfo)
Calls method `134` on the server.
**async def get_event_course_stamp**() -> int
Calls method `153` on the server.
**async def get_event_course_status**() -> [EventCourseStatusInfo](#eventcoursestatusinfo)
Calls method `154` on the server.
**async def get_event_course_histogram**(param: [GetEventCourseHistogramParam](#geteventcoursehistogramparam)) -> [EventCourseHistogram](#eventcoursehistogram)
Calls method `156` on the server.
**async def get_event_course_ghost**(param: [GetEventCourseGhostParam](#geteventcourseghostparam)) -> list[[EventCourseGhostInfo](#eventcourseghostinfo)]
Calls method `157` on the server.
**async def get_world_map**(param: [GetWorldMapParam](#getworldmapparam)) -> [RMCResponse](common.md)
Calls method `160` on the server. The RMC response has the following attributes:
maps: list[[WorldMapInfo](#worldmapinfo)]
results: list[[Result](common.md#result)]
**async def search_world_map_pick_up**(param: [SearchWorldMapPickUpParam](#searchworldmappickupparam)) -> list[[WorldMapInfo](#worldmapinfo)]
Calls method `162` on the server.
## DataStoreServerSMM2
**def _\_init__**()
Creates a new [`DataStoreServerSMM2`](#datastoreserversmm2).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def prepare_get_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParamV1](#datastorepreparegetparamv1)) -> [DataStoreReqGetInfoV1](#datastorereqgetinfov1)
Handler for method `1`. This method should be overridden by a subclass.
**async def prepare_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParamV1](#datastorepreparepostparamv1)) -> [DataStoreReqPostInfoV1](#datastorereqpostinfov1)
Handler for method `2`. This method should be overridden by a subclass.
**async def complete_post_object_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParamV1](#datastorecompletepostparamv1)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def delete_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreDeleteParam](#datastoredeleteparam)) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_objects**(client: [RMCClient](rmc.md#rmcclient), param: list[[DataStoreDeleteParam](#datastoredeleteparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `5`. This method should be overridden by a subclass.
**async def change_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def change_metas_v1**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParamV1](#datastorechangemetaparamv1)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [DataStoreMetaInfo](#datastoremetainfo)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: [DataStoreGetMetaParam](#datastoregetmetaparam)) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
info: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def prepare_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareUpdateParam](#datastoreprepareupdateparam)) -> [DataStoreReqUpdateInfo](#datastorerequpdateinfo)
Handler for method `10`. This method should be overridden by a subclass.
**async def complete_update_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompleteUpdateParam](#datastorecompleteupdateparam)) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def search_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_notification_url**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNotificationUrlParam](#datastoregetnotificationurlparam)) -> [DataStoreReqGetNotificationUrlInfo](#datastorereqgetnotificationurlinfo)
Handler for method `13`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `14`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotificationV1](#datastorenotificationv1)]
has_next: bool
**async def rate_object**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), param: [DataStoreRateObjectParam](#datastorerateobjectparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `16`. This method should be overridden by a subclass.
**async def get_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], access_password: int) -> [RMCResponse](common.md)
Handler for method `17`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]]
results: list[[Result](common.md#result)]
**async def reset_rating**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), update_password: int) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def reset_ratings**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `19`. This method should be overridden by a subclass.
**async def get_specific_meta_v1**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParamV1](#datastoregetspecificmetaparamv1)) -> list[[DataStoreSpecificMetaInfoV1](#datastorespecificmetainfov1)]
Handler for method `20`. This method should be overridden by a subclass.
**async def post_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> int
Handler for method `21`. This method should be overridden by a subclass.
**async def touch_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreTouchObjectParam](#datastoretouchobjectparam)) -> None
Handler for method `22`. This method should be overridden by a subclass.
**async def get_rating_with_log**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), access_password: int) -> [RMCResponse](common.md)
Handler for method `23`. This method should be overridden by a subclass. The RMC response must have the following attributes:
rating: [DataStoreRatingInfo](#datastoreratinginfo)
log: [DataStoreRatingLog](#datastoreratinglog)
**async def prepare_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> [DataStoreReqPostInfo](#datastorereqpostinfo)
Handler for method `24`. This method should be overridden by a subclass.
**async def prepare_get_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [DataStoreReqGetInfo](#datastorereqgetinfo)
Handler for method `25`. This method should be overridden by a subclass.
**async def complete_post_object**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreCompletePostParam](#datastorecompletepostparam)) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def get_new_arrived_notifications**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetNewArrivedNotificationsParam](#datastoregetnewarrivednotificationsparam)) -> [RMCResponse](common.md)
Handler for method `27`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: list[[DataStoreNotification](#datastorenotification)]
has_next: bool
**async def get_specific_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreGetSpecificMetaParam](#datastoregetspecificmetaparam)) -> list[[DataStoreSpecificMetaInfo](#datastorespecificmetainfo)]
Handler for method `28`. This method should be overridden by a subclass.
**async def get_persistence_info**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_id: int) -> [DataStorePersistenceInfo](#datastorepersistenceinfo)
Handler for method `29`. This method should be overridden by a subclass.
**async def get_persistence_infos**(client: [RMCClient](rmc.md#rmcclient), owner_id: int, slot_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `30`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePersistenceInfo](#datastorepersistenceinfo)]
results: list[[Result](common.md#result)]
**async def perpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, data_id: int, delete_last_object: bool) -> None
Handler for method `31`. This method should be overridden by a subclass.
**async def unperpetuate_object**(client: [RMCClient](rmc.md#rmcclient), persistence_slot_id: int, delete_last_object: bool) -> None
Handler for method `32`. This method should be overridden by a subclass.
**async def prepare_get_object_or_meta_binary**(client: [RMCClient](rmc.md#rmcclient), param: [DataStorePrepareGetParam](#datastorepreparegetparam)) -> [RMCResponse](common.md)
Handler for method `33`. This method should be overridden by a subclass. The RMC response must have the following attributes:
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo)
additional_meta: [DataStoreReqGetAdditionalMeta](#datastorereqgetadditionalmeta)
**async def get_password_info**(client: [RMCClient](rmc.md#rmcclient), data_id: int) -> [DataStorePasswordInfo](#datastorepasswordinfo)
Handler for method `34`. This method should be overridden by a subclass.
**async def get_password_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `35`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStorePasswordInfo](#datastorepasswordinfo)]
results: list[[Result](common.md#result)]
**async def get_metas_multiple_param**(client: [RMCClient](rmc.md#rmcclient), params: list[[DataStoreGetMetaParam](#datastoregetmetaparam)]) -> [RMCResponse](common.md)
Handler for method `36`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreMetaInfo](#datastoremetainfo)]
results: list[[Result](common.md#result)]
**async def complete_post_objects**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def change_meta**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreChangeMetaParam](#datastorechangemetaparam)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def change_metas**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStoreChangeMetaParam](#datastorechangemetaparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `39`. This method should be overridden by a subclass.
**async def rate_objects**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `40`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def post_meta_binary_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_id: int, param: [DataStorePreparePostParam](#datastorepreparepostparam)) -> None
Handler for method `41`. This method should be overridden by a subclass.
**async def post_meta_binaries_with_data_id**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int], param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool) -> list[[Result](common.md#result)]
Handler for method `42`. This method should be overridden by a subclass.
**async def rate_object_with_posting**(client: [RMCClient](rmc.md#rmcclient), target: [DataStoreRatingTarget](#datastoreratingtarget), rate_param: [DataStoreRateObjectParam](#datastorerateobjectparam), post_param: [DataStorePreparePostParam](#datastorepreparepostparam), fetch_ratings: bool) -> [DataStoreRatingInfo](#datastoreratinginfo)
Handler for method `43`. This method should be overridden by a subclass.
**async def rate_objects_with_posting**(client: [RMCClient](rmc.md#rmcclient), targets: list[[DataStoreRatingTarget](#datastoreratingtarget)], rate_param: list[[DataStoreRateObjectParam](#datastorerateobjectparam)], post_param: list[[DataStorePreparePostParam](#datastorepreparepostparam)], transactional: bool, fetch_ratings: bool) -> [RMCResponse](common.md)
Handler for method `44`. This method should be overridden by a subclass. The RMC response must have the following attributes:
ratings: list[[DataStoreRatingInfo](#datastoreratinginfo)]
results: list[[Result](common.md#result)]
**async def get_object_infos**(client: [RMCClient](rmc.md#rmcclient), data_ids: list[int]) -> [RMCResponse](common.md)
Handler for method `45`. This method should be overridden by a subclass. The RMC response must have the following attributes:
infos: list[[DataStoreReqGetInfo](#datastorereqgetinfo)]
results: list[[Result](common.md#result)]
**async def search_object_light**(client: [RMCClient](rmc.md#rmcclient), param: [DataStoreSearchParam](#datastoresearchparam)) -> [DataStoreSearchResult](#datastoresearchresult)
Handler for method `46`. This method should be overridden by a subclass.
**async def register_user**(client: [RMCClient](rmc.md#rmcclient), param: [RegisterUserParam](#registeruserparam)) -> None
Handler for method `47`. This method should be overridden by a subclass.
**async def get_users**(client: [RMCClient](rmc.md#rmcclient), param: [GetUsersParam](#getusersparam)) -> [RMCResponse](common.md)
Handler for method `48`. This method should be overridden by a subclass. The RMC response must have the following attributes:
users: list[[UserInfo](#userinfo)]
results: list[[Result](common.md#result)]
**async def sync_user_profile**(client: [RMCClient](rmc.md#rmcclient), param: [SyncUserProfileParam](#syncuserprofileparam)) -> [SyncUserProfileResult](#syncuserprofileresult)
Handler for method `49`. This method should be overridden by a subclass.
**async def search_users_user_point**(client: [RMCClient](rmc.md#rmcclient), param: [SearchUsersUserPointParam](#searchusersuserpointparam)) -> [RMCResponse](common.md)
Handler for method `50`. This method should be overridden by a subclass. The RMC response must have the following attributes:
users: list[[UserInfo](#userinfo)]
ranks: list[int]
result: bool
**async def search_users_played_course**(client: [RMCClient](rmc.md#rmcclient), param: [SearchUsersPlayedCourseParam](#searchusersplayedcourseparam)) -> list[[UserInfo](#userinfo)]
Handler for method `53`. This method should be overridden by a subclass.
**async def search_users_cleared_course**(client: [RMCClient](rmc.md#rmcclient), param: [SearchUsersClearedCourseParam](#searchusersclearedcourseparam)) -> list[[UserInfo](#userinfo)]
Handler for method `54`. This method should be overridden by a subclass.
**async def search_users_positive_rated_course**(client: [RMCClient](rmc.md#rmcclient), param: [SearchUsersPositiveRatedCourseParam](#searchuserspositiveratedcourseparam)) -> list[[UserInfo](#userinfo)]
Handler for method `55`. This method should be overridden by a subclass.
**async def update_last_login_time**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `59`. This method should be overridden by a subclass.
**async def get_username_ng_type**(client: [RMCClient](rmc.md#rmcclient)) -> int
Handler for method `65`. This method should be overridden by a subclass.
**async def get_courses**(client: [RMCClient](rmc.md#rmcclient), param: [GetCoursesParam](#getcoursesparam)) -> [RMCResponse](common.md)
Handler for method `70`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[CourseInfo](#courseinfo)]
results: list[[Result](common.md#result)]
**async def search_courses_point_ranking**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesPointRankingParam](#searchcoursespointrankingparam)) -> [RMCResponse](common.md)
Handler for method `71`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[CourseInfo](#courseinfo)]
ranks: list[int]
result: bool
**async def search_courses_latest**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesLatestParam](#searchcourseslatestparam)) -> [RMCResponse](common.md)
Handler for method `73`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def search_courses_posted_by**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesPostedByParam](#searchcoursespostedbyparam)) -> [RMCResponse](common.md)
Handler for method `74`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def search_courses_positive_rated_by**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesPositiveRatedByParam](#searchcoursespositiveratedbyparam)) -> list[[CourseInfo](#courseinfo)]
Handler for method `75`. This method should be overridden by a subclass.
**async def search_courses_played_by**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesPlayedByParam](#searchcoursesplayedbyparam)) -> list[[CourseInfo](#courseinfo)]
Handler for method `76`. This method should be overridden by a subclass.
**async def search_courses_endless_mode**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesEndlessModeParam](#searchcoursesendlessmodeparam)) -> list[[CourseInfo](#courseinfo)]
Handler for method `79`. This method should be overridden by a subclass.
**async def search_courses_first_clear**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesFirstClearParam](#searchcoursesfirstclearparam)) -> [RMCResponse](common.md)
Handler for method `80`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def search_courses_best_time**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesBestTimeParam](#searchcoursesbesttimeparam)) -> [RMCResponse](common.md)
Handler for method `81`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[CourseInfo](#courseinfo)]
result: bool
**async def get_courses_event**(client: [RMCClient](rmc.md#rmcclient), param: [GetCoursesParam](#getcoursesparam), dummy: [GetCoursesEventParam](#getcourseseventparam)) -> [RMCResponse](common.md)
Handler for method `85`. This method should be overridden by a subclass. The RMC response must have the following attributes:
courses: list[[EventCourseInfo](#eventcourseinfo)]
results: list[[Result](common.md#result)]
**async def search_courses_event**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCoursesEventParam](#searchcourseseventparam)) -> list[[EventCourseInfo](#eventcourseinfo)]
Handler for method `86`. This method should be overridden by a subclass.
**async def search_comments_in_order**(client: [RMCClient](rmc.md#rmcclient), param: [SearchCommentsInOrderParam](#searchcommentsinorderparam)) -> [RMCResponse](common.md)
Handler for method `94`. This method should be overridden by a subclass. The RMC response must have the following attributes:
comments: list[[CommentInfo](#commentinfo)]
result: bool
**async def search_comments**(client: [RMCClient](rmc.md#rmcclient), data_id: int) -> list[[CommentInfo](#commentinfo)]
Handler for method `95`. This method should be overridden by a subclass.
**async def get_death_positions**(client: [RMCClient](rmc.md#rmcclient), data_id: int) -> list[[DeathPositionInfo](#deathpositioninfo)]
Handler for method `103`. This method should be overridden by a subclass.
**async def get_user_or_course**(client: [RMCClient](rmc.md#rmcclient), param: [GetUserOrCourseParam](#getuserorcourseparam)) -> [RMCResponse](common.md)
Handler for method `131`. This method should be overridden by a subclass. The RMC response must have the following attributes:
user: [UserInfo](#userinfo)
course: [CourseInfo](#courseinfo)
**async def get_req_get_info_headers_info**(client: [RMCClient](rmc.md#rmcclient), type: int) -> [ReqGetInfoHeadersInfo](#reqgetinfoheadersinfo)
Handler for method `134`. This method should be overridden by a subclass.
**async def get_event_course_stamp**(client: [RMCClient](rmc.md#rmcclient)) -> int
Handler for method `153`. This method should be overridden by a subclass.
**async def get_event_course_status**(client: [RMCClient](rmc.md#rmcclient)) -> [EventCourseStatusInfo](#eventcoursestatusinfo)
Handler for method `154`. This method should be overridden by a subclass.
**async def get_event_course_histogram**(client: [RMCClient](rmc.md#rmcclient), param: [GetEventCourseHistogramParam](#geteventcoursehistogramparam)) -> [EventCourseHistogram](#eventcoursehistogram)
Handler for method `156`. This method should be overridden by a subclass.
**async def get_event_course_ghost**(client: [RMCClient](rmc.md#rmcclient), param: [GetEventCourseGhostParam](#geteventcourseghostparam)) -> list[[EventCourseGhostInfo](#eventcourseghostinfo)]
Handler for method `157`. This method should be overridden by a subclass.
**async def get_world_map**(client: [RMCClient](rmc.md#rmcclient), param: [GetWorldMapParam](#getworldmapparam)) -> [RMCResponse](common.md)
Handler for method `160`. This method should be overridden by a subclass. The RMC response must have the following attributes:
maps: list[[WorldMapInfo](#worldmapinfo)]
results: list[[Result](common.md#result)]
**async def search_world_map_pick_up**(client: [RMCClient](rmc.md#rmcclient), param: [SearchWorldMapPickUpParam](#searchworldmappickupparam)) -> list[[WorldMapInfo](#worldmapinfo)]
Handler for method `162`. This method should be overridden by a subclass.
## ClearCondition
This class defines the following constants:
`NORMAL = 0`
`COLLECT_COINS = 4116396131`
`KILL_SKIPSQUEAKS = 4042480826`
## CourseDifficulty
This class defines the following constants:
`EASY = 0`
`STANDARD = 1`
`EXPERT = 2`
`SUPER_EXPERT = 3`
## CourseOption
This class defines the following constants:
`PLAY_STATS = 1`
`RATINGS = 2`
`TIME_STATS = 4`
`COMMENT_STATS = 8`
`UNK9 = 16`
`UNK10 = 32`
`UNK8 = 64`
`ONE_SCREEN_THUMBNAIL = 128`
`ENTIRE_THUMBNAIL = 256`
`ALL = 511`
## CourseTag
This class defines the following constants:
`NONE = 0`
`STANDARD = 1`
`PUZZLE_SOLVING = 2`
`SPEEDRUN = 3`
`AUTOSCROLL = 4`
`AUTO_MARIO = 5`
`SHORT_AND_SWEET = 6`
`MULTIPLAYER_VS = 7`
`THEMED = 8`
`MUSIC = 9`
## CourseTheme
This class defines the following constants:
`GROUND = 0`
`UNDERGROUND = 1`
`CASTLE = 2`
`AIRSHIP = 3`
`UNDERWATER = 4`
`GHOST_HOUSE = 5`
`SNOW = 6`
`DESERT = 7`
`SKY = 8`
`FOREST = 9`
## EventCourseOption
This class defines the following constants:
`UNK3 = 1`
`GET_INFO = 2`
`BEST_TIME = 8`
`ONE_SCREEN_THUMBNAIL = 16`
`ENTIRE_THUMBNAIL = 32`
`UNK1 = 64`
`MEDAL_TIME = 256`
`GHOST = 512`
`ALL = 1023`
## GameStyle
This class defines the following constants:
`SMB1 = 0`
`SMB3 = 1`
`SMW = 2`
`NSMBU = 3`
`SM3DW = 4`
## MultiplayerStatsKeys
This class defines the following constants:
`MULTIPLAYER_SCORE = 0`
`VERSUS_PLAYS = 2`
`VERSUS_WINS = 3`
`COOP_PLAYS = 10`
`COOP_WINS = 11`
## PlayStatsKeys
This class defines the following constants:
`PLAYS = 0`
`CLEARS = 1`
`ATTEMPTS = 2`
`DEATHS = 3`
## UserOption
This class defines the following constants:
`PLAY_STATS = 1`
`MAKER_STATS = 2`
`UNK2 = 4`
`ENDLESS_MODE = 8`
`MULTIPLAYER_STATS = 16`
`BADGE_INFO = 32`
`UNK8 = 64`
`UNK9 = 128`
`UNK1 = 512`
`UNK7 = 1024`
`UNK11 = 4096`
`UNK13 = 8192`
`UNK15 = 32768`
`ALL = 65535`
## BadgeInfo
**def _\_init__**()
Creates a new `BadgeInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: int
## CommentInfo
**def _\_init__**()
Creates a new `CommentInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: str
unk3: int
unk4: int
unk5: int
unk6: int
unk7: int
unk8: int
unk9: int
unk10: int
unk11: bool
unk12: bool
unk13: [DateTime](common.md#datetime)
unk14: bytes
unk15: str
picture: [CommentPictureReqGetInfoWithoutHeaders](#commentpicturereqgetinfowithoutheaders) = [CommentPictureReqGetInfoWithoutHeaders](#commentpicturereqgetinfowithoutheaders)()
unk16: int
unk17: int
## CommentPictureReqGetInfoWithoutHeaders
**def _\_init__**()
Creates a new `CommentPictureReqGetInfoWithoutHeaders` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
data_type: int
unk1: int
unk2: bytes
filename: str
## CourseInfo
**def _\_init__**()
Creates a new `CourseInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
code: str
owner_id: int
name: str
description: str
game_style: int
course_theme: int
upload_time: [DateTime](common.md#datetime)
difficulty: int
tag1: int
tag2: int
unk1: int
clear_condition: int
clear_condition_magnitude: int
unk2: int
unk3: bytes
play_stats: dict[int, int]
ratings: dict[int, int]
unk4: dict[int, int]
time_stats: [CourseTimeStats](#coursetimestats) = [CourseTimeStats](#coursetimestats)()
comment_stats: dict[int, int]
unk9: int
unk10: int
unk11: int
unk12: int
one_screen_thumbnail: [RelationObjectReqGetInfo](#relationobjectreqgetinfo) = [RelationObjectReqGetInfo](#relationobjectreqgetinfo)()
entire_thumbnail: [RelationObjectReqGetInfo](#relationobjectreqgetinfo) = [RelationObjectReqGetInfo](#relationobjectreqgetinfo)()
## CourseTimeStats
**def _\_init__**()
Creates a new `CourseTimeStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
first_completion: int
world_record_holder: int
world_record: int
upload_time: int
## DataStoreChangeMetaCompareParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaCompareParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
comparison_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
referred_count: int
data_type: int
status: int
## DataStoreChangeMetaParam
**def _\_init__**()
Creates a new `DataStoreChangeMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
referred_count: int
data_type: int
status: int
compare_param: [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam) = [DataStoreChangeMetaCompareParam](#datastorechangemetacompareparam)()
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
## DataStoreChangeMetaParamV1
**def _\_init__**()
Creates a new `DataStoreChangeMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
modifies_flag: int
name: str
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
period: int
meta_binary: bytes
tags: list[str]
update_password: int
## DataStoreCompletePostParam
**def _\_init__**()
Creates a new `DataStoreCompletePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompletePostParamV1
**def _\_init__**()
Creates a new `DataStoreCompletePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
success: bool
## DataStoreCompleteUpdateParam
**def _\_init__**()
Creates a new `DataStoreCompleteUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
version: int
success: bool
## DataStoreDeleteParam
**def _\_init__**()
Creates a new `DataStoreDeleteParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
update_password: int
## DataStoreGetMetaParam
**def _\_init__**()
Creates a new `DataStoreGetMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
result_option: int = 0
access_password: int = 0
## DataStoreGetNewArrivedNotificationsParam
**def _\_init__**()
Creates a new `DataStoreGetNewArrivedNotificationsParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
last_notification_id: int
limit: int
## DataStoreGetNotificationUrlParam
**def _\_init__**()
Creates a new `DataStoreGetNotificationUrlParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
previous_url: str
## DataStoreGetSpecificMetaParam
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreGetSpecificMetaParamV1
**def _\_init__**()
Creates a new `DataStoreGetSpecificMetaParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
## DataStoreKeyValue
**def _\_init__**()
Creates a new `DataStoreKeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: str
value: str
## DataStoreMetaInfo
**def _\_init__**()
Creates a new `DataStoreMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
create_time: [DateTime](common.md#datetime)
update_time: [DateTime](common.md#datetime)
period: int
status: int
referred_count: int
refer_data_id: int
flag: int
referred_time: [DateTime](common.md#datetime)
expire_time: [DateTime](common.md#datetime)
tags: list[str]
ratings: list[[DataStoreRatingInfoWithSlot](#datastoreratinginfowithslot)]
## DataStoreNotification
**def _\_init__**()
Creates a new `DataStoreNotification` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStoreNotificationV1
**def _\_init__**()
Creates a new `DataStoreNotificationV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
notification_id: int
data_id: int
## DataStorePasswordInfo
**def _\_init__**()
Creates a new `DataStorePasswordInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
access_password: int
update_password: int
## DataStorePermission
**def _\_init__**()
Creates a new `DataStorePermission` instance. Required fields must be filled in manually.
The following fields are defined in this class:
permission: int = 3
recipients: list[int] = []
## DataStorePersistenceInfo
**def _\_init__**()
Creates a new `DataStorePersistenceInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
slot_id: int
data_id: int
## DataStorePersistenceInitParam
**def _\_init__**()
Creates a new `DataStorePersistenceInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
persistence_id: int = 65535
delete_last_object: bool = True
## DataStorePersistenceTarget
**def _\_init__**()
Creates a new `DataStorePersistenceTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int = 0
persistence_id: int = 65535
## DataStorePrepareGetParam
**def _\_init__**()
Creates a new `DataStorePrepareGetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int = 0
lock_id: int = 0
persistence_target: [DataStorePersistenceTarget](#datastorepersistencetarget) = [DataStorePersistenceTarget](#datastorepersistencetarget)()
access_password: int = 0
If `nex.version` >= 30500:
extra_data: list[str] = []
## DataStorePrepareGetParamV1
**def _\_init__**()
Creates a new `DataStorePrepareGetParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int = 0
## DataStorePreparePostParam
**def _\_init__**()
Creates a new `DataStorePreparePostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int
meta_binary: bytes
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str] = []
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)] = []
persistence_init_param: [DataStorePersistenceInitParam](#datastorepersistenceinitparam) = [DataStorePersistenceInitParam](#datastorepersistenceinitparam)()
If `nex.version` >= 30500:
extra_data: list[str]
## DataStorePreparePostParamV1
**def _\_init__**()
Creates a new `DataStorePreparePostParamV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
size: int
name: str
data_type: int = 0
meta_binary: bytes = b""
permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
delete_permission: [DataStorePermission](#datastorepermission) = [DataStorePermission](#datastorepermission)()
flag: int
period: int
refer_data_id: int = 0
tags: list[str]
rating_init_param: list[[DataStoreRatingInitParamWithSlot](#datastoreratinginitparamwithslot)]
## DataStorePrepareUpdateParam
**def _\_init__**()
Creates a new `DataStorePrepareUpdateParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
size: int
update_password: int
extra_data: list[str]
## DataStoreRateObjectParam
**def _\_init__**()
Creates a new `DataStoreRateObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rating_value: int
access_password: int
## DataStoreRatingInfo
**def _\_init__**()
Creates a new `DataStoreRatingInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_value: int
count: int
initial_value: int
## DataStoreRatingInfoWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInfoWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
info: [DataStoreRatingInfo](#datastoreratinginfo) = [DataStoreRatingInfo](#datastoreratinginfo)()
## DataStoreRatingInitParam
**def _\_init__**()
Creates a new `DataStoreRatingInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flag: int
internal_flag: int
lock_type: int
initial_value: int
range_min: int
range_max: int
period_hour: int
period_duration: int
## DataStoreRatingInitParamWithSlot
**def _\_init__**()
Creates a new `DataStoreRatingInitParamWithSlot` instance. Required fields must be filled in manually.
The following fields are defined in this class:
slot: int
param: [DataStoreRatingInitParam](#datastoreratinginitparam) = [DataStoreRatingInitParam](#datastoreratinginitparam)()
## DataStoreRatingLog
**def _\_init__**()
Creates a new `DataStoreRatingLog` instance. Required fields must be filled in manually.
The following fields are defined in this class:
is_rated: bool
pid: int
rating_value: int
lock_expiration_time: [DateTime](common.md#datetime)
## DataStoreRatingTarget
**def _\_init__**()
Creates a new `DataStoreRatingTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
slot: int
## DataStoreReqGetAdditionalMeta
**def _\_init__**()
Creates a new `DataStoreReqGetAdditionalMeta` instance. Required fields must be filled in manually.
The following fields are defined in this class:
owner_id: int
data_type: int
version: int
meta_binary: bytes
## DataStoreReqGetInfo
**def _\_init__**()
Creates a new `DataStoreReqGetInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
If `nex.version` >= 30500:
data_id: int
## DataStoreReqGetInfoV1
**def _\_init__**()
Creates a new `DataStoreReqGetInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
size: int
root_ca_cert: bytes
## DataStoreReqGetNotificationUrlInfo
**def _\_init__**()
Creates a new `DataStoreReqGetNotificationUrlInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
key: str
query: str
root_ca_cert: bytes
## DataStoreReqPostInfo
**def _\_init__**()
Creates a new `DataStoreReqPostInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqPostInfoV1
**def _\_init__**()
Creates a new `DataStoreReqPostInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreReqUpdateInfo
**def _\_init__**()
Creates a new `DataStoreReqUpdateInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
version: int
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
form: list[[DataStoreKeyValue](#datastorekeyvalue)]
root_ca_cert: bytes
## DataStoreSearchParam
**def _\_init__**()
Creates a new `DataStoreSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
search_target: int = 1
owner_ids: list[int] = []
owner_type: int = 0
destination_ids: list[int] = []
data_type: int = 65535
created_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
created_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_after: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
updated_before: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).future()
refer_data_id: int = 0
tags: list[str] = []
result_order_column: int = 0
result_order: int = 0
result_range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
result_option: int = 0
minimal_rating_frequency: int = 0
use_cache: bool = False
total_count_enabled: bool = True
data_types: list[int] = []
## DataStoreSearchResult
**def _\_init__**()
Creates a new `DataStoreSearchResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
total_count: int
result: list[[DataStoreMetaInfo](#datastoremetainfo)]
total_count_type: int
## DataStoreSpecificMetaInfo
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreSpecificMetaInfoV1
**def _\_init__**()
Creates a new `DataStoreSpecificMetaInfoV1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
owner_id: int
size: int
data_type: int
version: int
## DataStoreTouchObjectParam
**def _\_init__**()
Creates a new `DataStoreTouchObjectParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
lock_id: int
access_password: int
## DeathPositionInfo
**def _\_init__**()
Creates a new `DeathPositionInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
x: int
y: int
is_subworld: bool
## EventCourseGhostInfo
**def _\_init__**()
Creates a new `EventCourseGhostInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
replay_file: [RelationObjectReqGetInfo](#relationobjectreqgetinfo) = [RelationObjectReqGetInfo](#relationobjectreqgetinfo)()
time: int
pid: int
## EventCourseHistogram
**def _\_init__**()
Creates a new `EventCourseHistogram` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
unk1: int
unk2: int
unk3: int
values: list[int]
medals: dict[int, int]
unk4: int
## EventCourseInfo
**def _\_init__**()
Creates a new `EventCourseInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
name: str
description: str
game_style: int
course_theme: int
unk1: bool
unk2: bool
upload_time: [DateTime](common.md#datetime)
get_info: [DataStoreReqGetInfo](#datastorereqgetinfo) = [DataStoreReqGetInfo](#datastorereqgetinfo)()
unk3: dict[int, int]
unk4: [UnknownStruct6](#unknownstruct6) = [UnknownStruct6](#unknownstruct6)()
unk5: int
one_screen_thumbnail: [EventCourseThumbnail](#eventcoursethumbnail) = [EventCourseThumbnail](#eventcoursethumbnail)()
entire_thumbnail: [EventCourseThumbnail](#eventcoursethumbnail) = [EventCourseThumbnail](#eventcoursethumbnail)()
If `revision` >= 1:
end_time: [DateTime](common.md#datetime)
unk6: int
unk7: int
unk8: int
unk9: int
best_time: int
unk10: int
medal_time: int
personal_ghost: [RelationObjectReqGetInfo](#relationobjectreqgetinfo) = [RelationObjectReqGetInfo](#relationobjectreqgetinfo)()
## EventCourseStatusInfo
**def _\_init__**()
Creates a new `EventCourseStatusInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: bool
unk3: [DateTime](common.md#datetime)
## EventCourseThumbnail
**def _\_init__**()
Creates a new `EventCourseThumbnail` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
filesize: int
root_ca_cert: bytes
filename: str
## GetCoursesEventParam
**def _\_init__**()
Creates a new `GetCoursesEventParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
## GetCoursesParam
**def _\_init__**()
Creates a new `GetCoursesParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_ids: list[int]
option: int = 0
## GetEventCourseGhostParam
**def _\_init__**()
Creates a new `GetEventCourseGhostParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
time: int
count: int
## GetEventCourseHistogramParam
**def _\_init__**()
Creates a new `GetEventCourseHistogramParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
## GetUserOrCourseParam
**def _\_init__**()
Creates a new `GetUserOrCourseParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
code: str
user_option: int = 0
course_option: int = 0
## GetUsersParam
**def _\_init__**()
Creates a new `GetUsersParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pids: list[int]
option: int = 0
## GetWorldMapParam
**def _\_init__**()
Creates a new `GetWorldMapParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
ids: list[str]
option: int = 0
## RegisterUserParam
**def _\_init__**()
Creates a new `RegisterUserParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
name: str
unk1: [UnknownStruct1](#unknownstruct1) = [UnknownStruct1](#unknownstruct1)()
unk2: bytes
language: int
country: str
device_id: str
## RelationObjectReqGetInfo
**def _\_init__**()
Creates a new `RelationObjectReqGetInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
url: str
data_type: int
size: int
unk: bytes
filename: str
## ReqGetInfoHeadersInfo
**def _\_init__**()
Creates a new `ReqGetInfoHeadersInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
headers: list[[DataStoreKeyValue](#datastorekeyvalue)]
expiration: int
## SearchCommentsInOrderParam
**def _\_init__**()
Creates a new `SearchCommentsInOrderParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## SearchCoursesBestTimeParam
**def _\_init__**()
Creates a new `SearchCoursesBestTimeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
option: int = 0
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## SearchCoursesEndlessModeParam
**def _\_init__**()
Creates a new `SearchCoursesEndlessModeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
count: int
difficulty: int
## SearchCoursesEventParam
**def _\_init__**()
Creates a new `SearchCoursesEventParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
## SearchCoursesFirstClearParam
**def _\_init__**()
Creates a new `SearchCoursesFirstClearParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
option: int = 0
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## SearchCoursesLatestParam
**def _\_init__**()
Creates a new `SearchCoursesLatestParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## SearchCoursesPlayedByParam
**def _\_init__**()
Creates a new `SearchCoursesPlayedByParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
count: int
pid: int
## SearchCoursesPointRankingParam
**def _\_init__**()
Creates a new `SearchCoursesPointRankingParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
difficulty: int
reject_regions: list[int] = []
## SearchCoursesPositiveRatedByParam
**def _\_init__**()
Creates a new `SearchCoursesPositiveRatedByParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
count: int
pid: int
## SearchCoursesPostedByParam
**def _\_init__**()
Creates a new `SearchCoursesPostedByParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
pids: list[int]
## SearchUsersClearedCourseParam
**def _\_init__**()
Creates a new `SearchUsersClearedCourseParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
option: int = 0
count: int
## SearchUsersPlayedCourseParam
**def _\_init__**()
Creates a new `SearchUsersPlayedCourseParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
option: int = 0
count: int
## SearchUsersPositiveRatedCourseParam
**def _\_init__**()
Creates a new `SearchUsersPositiveRatedCourseParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data_id: int
option: int = 0
count: int
## SearchUsersUserPointParam
**def _\_init__**()
Creates a new `SearchUsersUserPointParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
option: int = 0
buffer: bytes
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## SearchWorldMapPickUpParam
**def _\_init__**()
Creates a new `SearchWorldMapPickUpParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
count: int
## SearchWorldMapPlayedByParam
**def _\_init__**()
Creates a new `SearchWorldMapPlayedByParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: int
## SyncUserProfileParam
**def _\_init__**()
Creates a new `SyncUserProfileParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
username: str
unk1: [UnknownStruct1](#unknownstruct1) = [UnknownStruct1](#unknownstruct1)()
unk2: bytes
unk3: int
country: str
unk4: bool
unk5: bool
unk_guid: str
unk6: int
## SyncUserProfileResult
**def _\_init__**()
Creates a new `SyncUserProfileResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
username: str
unk1: [UnknownStruct1](#unknownstruct1) = [UnknownStruct1](#unknownstruct1)()
unk2: bytes
unk3: int
country: str
unk4: int
unk5: bool
unk6: bool
## UnknownStruct1
**def _\_init__**()
Creates a new `UnknownStruct1` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: int
unk3: int
unk4: int
## UnknownStruct3
**def _\_init__**()
Creates a new `UnknownStruct3` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: bool
unk2: [DateTime](common.md#datetime)
## UnknownStruct6
**def _\_init__**()
Creates a new `UnknownStruct6` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: int
## UserInfo
**def _\_init__**()
Creates a new `UserInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
code: str
name: str
unk1: [UnknownStruct1](#unknownstruct1) = [UnknownStruct1](#unknownstruct1)()
unk2: bytes
country: str
region: int
last_active: [DateTime](common.md#datetime)
unk3: bool
unk4: bool
unk5: bool
play_stats: dict[int, int]
maker_stats: dict[int, int]
endless_challenge_high_scores: dict[int, int]
multiplayer_stats: dict[int, int]
unk7: dict[int, int]
badges: list[[BadgeInfo](#badgeinfo)]
unk8: dict[int, int]
unk9: dict[int, int]
If `revision` >= 1:
unk10: bool
unk11: [DateTime](common.md#datetime)
unk12: bool
If `revision` >= 2:
unk13: [UnknownStruct3](#unknownstruct3) = [UnknownStruct3](#unknownstruct3)()
If `revision` >= 3:
unk14: str
unk15: dict[int, int]
unk16: bool
## WorldMapInfo
**def _\_init__**()
Creates a new `WorldMapInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: str
owner_id: int
unk1: bytes
thumbnail: [RelationObjectReqGetInfo](#relationobjectreqgetinfo) = [RelationObjectReqGetInfo](#relationobjectreqgetinfo)()
worlds: int
levels: int
unk2: int
unk3: [DateTime](common.md#datetime)
data_ids: list[int]
unk4: dict[int, int]
unk5: int
unk6: int
unk7: int
================================================
FILE: docs/reference/nex/debug.md
================================================
# Module: nintendo.nex.debug
Provides a client and server for the `DebugProtocol`. This page was generated automatically from `debug.proto`.
**class** [DebugClient](#debugclient)
The client for the `DebugProtocol`.
**class** [DebugServer](#debugserver)
The server for the `DebugProtocol`.
**class** [ApiCall](#apicall)([Structure](common.md))
**class** [ApiCallSummary](#apicallsummary)([Structure](common.md))
## DebugClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`DebugClient`](#debugclient).
**async def enable_api_recorder**() -> None
Calls method `1` on the server.
**async def disable_api_recorder**() -> None
Calls method `2` on the server.
**async def is_api_recorder_enabled**() -> bool
Calls method `3` on the server.
**async def get_api_calls**(pids: list[int], start: [DateTime](common.md#datetime), end: [DateTime](common.md#datetime)) -> list[[ApiCall](#apicall)]
Calls method `4` on the server.
**async def get_api_call_summary**(pid: int, start: [DateTime](common.md#datetime), end: [DateTime](common.md#datetime), only_limit_exceeded: bool) -> list[[ApiCallSummary](#apicallsummary)]
Calls method `7` on the server.
## DebugServer
**def _\_init__**()
Creates a new [`DebugServer`](#debugserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def enable_api_recorder**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def disable_api_recorder**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def is_api_recorder_enabled**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def get_api_calls**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], start: [DateTime](common.md#datetime), end: [DateTime](common.md#datetime)) -> list[[ApiCall](#apicall)]
Handler for method `4`. This method should be overridden by a subclass.
**async def get_api_call_summary**(client: [RMCClient](rmc.md#rmcclient), pid: int, start: [DateTime](common.md#datetime), end: [DateTime](common.md#datetime), only_limit_exceeded: bool) -> list[[ApiCallSummary](#apicallsummary)]
Handler for method `7`. This method should be overridden by a subclass.
## ApiCall
**def _\_init__**()
Creates a new `ApiCall` instance. Required fields must be filled in manually.
The following fields are defined in this class:
name: str
time: [DateTime](common.md#datetime)
pid: int
## ApiCallSummary
**def _\_init__**()
Creates a new `ApiCallSummary` instance. Required fields must be filled in manually.
The following fields are defined in this class:
name: str
limit_exceeded: int
duration: int
limit: int
start: [DateTime](common.md#datetime)
limit_exceeded_count: int
total_count: int
================================================
FILE: docs/reference/nex/errors.md
================================================
# Module: nintendo.nex.errors
Provides descriptions for error codes. The error codes in these tables do **not** have the most significant bit set.
`error_names: dict[int, str]`
Provides descriptions for error codes.
`error_codes: dict[str, int]`
The reverse of `error_names`.
================================================
FILE: docs/reference/nex/friends.md
================================================
# Module: nintendo.nex.friends
Provides a client and server for the `FriendsProtocolV1` and `FriendsProtocolV2`. This page was generated automatically from `friends.proto`.
**class** [FriendsClientV1](#friendsclientv1)
The client for the `FriendsProtocolV1`.
**class** [FriendsClientV2](#friendsclientv2)
The client for the `FriendsProtocolV2`.
**class** [FriendsServerV1](#friendsserverv1)
The server for the `FriendsProtocolV1`.
**class** [FriendsServerV2](#friendsserverv2)
The server for the `FriendsProtocolV2`.
**class** [AccountExtraInfo](#accountextrainfo)([Structure](common.md))
**class** [BlacklistedPrincipal](#blacklistedprincipal)([Data](common.md))
**class** [Comment](#comment)([Data](common.md))
**class** [FriendComment](#friendcomment)([Data](common.md))
**class** [FriendInfo](#friendinfo)([Data](common.md))
**class** [FriendKey](#friendkey)([Structure](common.md))
**class** [FriendMii](#friendmii)([Data](common.md))
**class** [FriendMiiList](#friendmiilist)([Data](common.md))
**class** [FriendPersistentInfo](#friendpersistentinfo)([Data](common.md))
**class** [FriendPicture](#friendpicture)([Data](common.md))
**class** [FriendPresence](#friendpresence)([Data](common.md))
**class** [FriendRelationship](#friendrelationship)([Data](common.md))
**class** [FriendRequest](#friendrequest)([Data](common.md))
**class** [FriendRequestMessage](#friendrequestmessage)([Data](common.md))
**class** [GameKey](#gamekey)([Data](common.md))
**class** [Mii](#mii)([Data](common.md))
**class** [MiiList](#miilist)([Data](common.md))
**class** [MiiV2](#miiv2)([Data](common.md))
**class** [MyProfile](#myprofile)([Data](common.md))
**class** [NNAInfo](#nnainfo)([Data](common.md))
**class** [NintendoCreateAccountData](#nintendocreateaccountdata)([Data](common.md))
**class** [NintendoPresence](#nintendopresence)([Data](common.md))
**class** [NintendoPresenceV2](#nintendopresencev2)([Data](common.md))
**class** [PersistentNotification](#persistentnotification)([Data](common.md))
**class** [PlayedGame](#playedgame)([Data](common.md))
**class** [PrincipalBasicInfo](#principalbasicinfo)([Data](common.md))
**class** [PrincipalPreference](#principalpreference)([Data](common.md))
**class** [PrincipalRequestBlockSetting](#principalrequestblocksetting)([Data](common.md))
## FriendsClientV1
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`FriendsClientV1`](#friendsclientv1).
**async def update_profile**(profile_data: [MyProfile](#myprofile)) -> None
Calls method `1` on the server.
**async def update_mii**(mii: [Mii](#mii)) -> None
Calls method `2` on the server.
**async def update_mii_list**(mii_list: [MiiList](#miilist)) -> None
Calls method `3` on the server.
**async def update_played_games**(played_games: list[[PlayedGame](#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](#friendkey)]) -> list[[FriendMii](#friendmii)]
Calls method `6` on the server.
**async def get_friend_mii_list**(friends: list[[FriendKey](#friendkey)]) -> list[[FriendMiiList](#friendmiilist)]
Calls method `7` on the server.
**async def is_active_game**(unk1: list[int], game_key: [GameKey](#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](#friendrelationship)]
Calls method `9` on the server.
**async def get_friend_relationships**(principal_ids: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Calls method `10` on the server.
**async def add_friend_by_principal_id**(friend_seed: int, pid: int) -> [FriendRelationship](#friendrelationship)
Calls method `11` on the server.
**async def add_friend_by_principal_ids**(unk: int, pids: list[int]) -> list[[FriendRelationship](#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](#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](#friendrelationship)]
Calls method `17` on the server.
**async def update_presence**(presence_info: [NintendoPresence](#nintendopresence), unk: bool) -> None
Calls method `18` on the server.
**async def update_favorite_game_key**(game_key: [GameKey](#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](#friendpresence)]
Calls method `22` on the server.
**async def get_friend_comment**(friends: list[[FriendKey](#friendkey)]) -> list[[FriendComment](#friendcomment)]
Calls method `23` on the server.
**async def get_friend_picture**(principal_ids: list[int]) -> list[[FriendPicture](#friendpicture)]
Calls method `24` on the server.
**async def get_friend_persistent_info**(principal_ids: list[int]) -> list[[FriendPersistentInfo](#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](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`FriendsClientV2`](#friendsclientv2).
**async def update_and_get_all_information**(nna_info: [NNAInfo](#nnainfo), presence: [NintendoPresenceV2](#nintendopresencev2), birthday: [DateTime](common.md#datetime)) -> [RMCResponse](common.md)
Calls method `1` on the server. The RMC response has the following attributes:
principal_preference: [PrincipalPreference](#principalpreference)
comment: [Comment](#comment)
friends: list[[FriendInfo](#friendinfo)]
sent_requests: list[[FriendRequest](#friendrequest)]
received_requests: list[[FriendRequest](#friendrequest)]
blacklist: list[[BlacklistedPrincipal](#blacklistedprincipal)]
unk1: bool
notifications: list[[PersistentNotification](#persistentnotification)]
unk2: bool
**async def add_friend**(pid: int) -> [RMCResponse](common.md)
Calls method `2` on the server. The RMC response has the following attributes:
request: [FriendRequest](#friendrequest)
info: [FriendInfo](#friendinfo)
**async def add_friend_by_name**(name: str) -> [RMCResponse](common.md)
Calls method `3` on the server. The RMC response has the following attributes:
request: [FriendRequest](#friendrequest)
info: [FriendInfo](#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](#gamekey), unk6: [DateTime](common.md#datetime)) -> [RMCResponse](common.md)
Calls method `5` on the server. The RMC response has the following attributes:
request: [FriendRequest](#friendrequest)
info: [FriendInfo](#friendinfo)
**async def cancel_friend_request**(id: int) -> None
Calls method `6` on the server.
**async def accept_friend_request**(id: int) -> [FriendInfo](#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](#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)) -> [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](#nintendopresencev2)) -> None
Calls method `13` on the server.
**async def update_mii**(mii: [MiiV2](#miiv2)) -> [DateTime](common.md#datetime)
Calls method `14` on the server.
**async def update_comment**(comment: [Comment](#comment)) -> [DateTime](common.md#datetime)
Calls method `15` on the server.
**async def update_preference**(preference: [PrincipalPreference](#principalpreference)) -> None
Calls method `16` on the server.
**async def get_basic_info**(pids: list[int]) -> list[[PrincipalBasicInfo](#principalbasicinfo)]
Calls method `17` on the server.
**async def delete_persistent_notification**(notifications: list[[PersistentNotification](#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](#principalrequestblocksetting)]
Calls method `20` on the server.
## FriendsServerV1
**def _\_init__**()
Creates a new [`FriendsServerV1`](#friendsserverv1).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def update_profile**(client: [RMCClient](rmc.md#rmcclient), profile_data: [MyProfile](#myprofile)) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def update_mii**(client: [RMCClient](rmc.md#rmcclient), mii: [Mii](#mii)) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def update_mii_list**(client: [RMCClient](rmc.md#rmcclient), mii_list: [MiiList](#miilist)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def update_played_games**(client: [RMCClient](rmc.md#rmcclient), played_games: list[[PlayedGame](#playedgame)]) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def update_preference**(client: [RMCClient](rmc.md#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](rmc.md#rmcclient), friends: list[[FriendKey](#friendkey)]) -> list[[FriendMii](#friendmii)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_friend_mii_list**(client: [RMCClient](rmc.md#rmcclient), friends: list[[FriendKey](#friendkey)]) -> list[[FriendMiiList](#friendmiilist)]
Handler for method `7`. This method should be overridden by a subclass.
**async def is_active_game**(client: [RMCClient](rmc.md#rmcclient), unk1: list[int], game_key: [GameKey](#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](rmc.md#rmcclient), unk1: int, unk2: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_friend_relationships**(client: [RMCClient](rmc.md#rmcclient), principal_ids: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `10`. This method should be overridden by a subclass.
**async def add_friend_by_principal_id**(client: [RMCClient](rmc.md#rmcclient), friend_seed: int, pid: int) -> [FriendRelationship](#friendrelationship)
Handler for method `11`. This method should be overridden by a subclass.
**async def add_friend_by_principal_ids**(client: [RMCClient](rmc.md#rmcclient), unk: int, pids: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `12`. This method should be overridden by a subclass.
**async def remove_friend_by_local_friend_code**(client: [RMCClient](rmc.md#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](rmc.md#rmcclient), pid: int) -> None
Handler for method `14`. This method should be overridden by a subclass.
**async def get_all_friends**(client: [RMCClient](rmc.md#rmcclient)) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `15`. This method should be overridden by a subclass.
**async def update_black_list**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> None
Handler for method `16`. This method should be overridden by a subclass.
**async def sync_friend**(client: [RMCClient](rmc.md#rmcclient), friend_seed: int, principal_ids: list[int], unk: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `17`. This method should be overridden by a subclass.
**async def update_presence**(client: [RMCClient](rmc.md#rmcclient), presence_info: [NintendoPresence](#nintendopresence), unk: bool) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def update_favorite_game_key**(client: [RMCClient](rmc.md#rmcclient), game_key: [GameKey](#gamekey)) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def update_comment**(client: [RMCClient](rmc.md#rmcclient), comment: str) -> None
Handler for method `20`. This method should be overridden by a subclass.
**async def update_picture**(client: [RMCClient](rmc.md#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](rmc.md#rmcclient), principal_ids: list[int]) -> list[[FriendPresence](#friendpresence)]
Handler for method `22`. This method should be overridden by a subclass.
**async def get_friend_comment**(client: [RMCClient](rmc.md#rmcclient), friends: list[[FriendKey](#friendkey)]) -> list[[FriendComment](#friendcomment)]
Handler for method `23`. This method should be overridden by a subclass.
**async def get_friend_picture**(client: [RMCClient](rmc.md#rmcclient), principal_ids: list[int]) -> list[[FriendPicture](#friendpicture)]
Handler for method `24`. This method should be overridden by a subclass.
**async def get_friend_persistent_info**(client: [RMCClient](rmc.md#rmcclient), principal_ids: list[int]) -> list[[FriendPersistentInfo](#friendpersistentinfo)]
Handler for method `25`. This method should be overridden by a subclass.
**async def send_invitation**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
## FriendsServerV2
**def _\_init__**()
Creates a new [`FriendsServerV2`](#friendsserverv2).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def update_and_get_all_information**(client: [RMCClient](rmc.md#rmcclient), nna_info: [NNAInfo](#nnainfo), presence: [NintendoPresenceV2](#nintendopresencev2), birthday: [DateTime](common.md#datetime)) -> [RMCResponse](common.md)
Handler for method `1`. This method should be overridden by a subclass. The RMC response must have the following attributes:
principal_preference: [PrincipalPreference](#principalpreference)
comment: [Comment](#comment)
friends: list[[FriendInfo](#friendinfo)]
sent_requests: list[[FriendRequest](#friendrequest)]
received_requests: list[[FriendRequest](#friendrequest)]
blacklist: list[[BlacklistedPrincipal](#blacklistedprincipal)]
unk1: bool
notifications: list[[PersistentNotification](#persistentnotification)]
unk2: bool
**async def add_friend**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> [RMCResponse](common.md)
Handler for method `2`. This method should be overridden by a subclass. The RMC response must have the following attributes:
request: [FriendRequest](#friendrequest)
info: [FriendInfo](#friendinfo)
**async def add_friend_by_name**(client: [RMCClient](rmc.md#rmcclient), name: str) -> [RMCResponse](common.md)
Handler for method `3`. This method should be overridden by a subclass. The RMC response must have the following attributes:
request: [FriendRequest](#friendrequest)
info: [FriendInfo](#friendinfo)
**async def remove_friend**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def add_friend_request**(client: [RMCClient](rmc.md#rmcclient), unk1: int, unk2: int, unk3: str, unk4: int, unk5: str, game_key: [GameKey](#gamekey), unk6: [DateTime](common.md#datetime)) -> [RMCResponse](common.md)
Handler for method `5`. This method should be overridden by a subclass. The RMC response must have the following attributes:
request: [FriendRequest](#friendrequest)
info: [FriendInfo](#friendinfo)
**async def cancel_friend_request**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def accept_friend_request**(client: [RMCClient](rmc.md#rmcclient), id: int) -> [FriendInfo](#friendinfo)
Handler for method `7`. This method should be overridden by a subclass.
**async def delete_friend_request**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def deny_friend_request**(client: [RMCClient](rmc.md#rmcclient), id: int) -> [BlacklistedPrincipal](#blacklistedprincipal)
Handler for method `9`. This method should be overridden by a subclass.
**async def mark_friend_requests_as_received**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> None
Handler for method `10`. This method should be overridden by a subclass.
**async def add_black_list**(client: [RMCClient](rmc.md#rmcclient), principal: [BlacklistedPrincipal](#blacklistedprincipal)) -> [BlacklistedPrincipal](#blacklistedprincipal)
Handler for method `11`. This method should be overridden by a subclass.
**async def remove_black_list**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> None
Handler for method `12`. This method should be overridden by a subclass.
**async def update_presence**(client: [RMCClient](rmc.md#rmcclient), presence: [NintendoPresenceV2](#nintendopresencev2)) -> None
Handler for method `13`. This method should be overridden by a subclass.
**async def update_mii**(client: [RMCClient](rmc.md#rmcclient), mii: [MiiV2](#miiv2)) -> [DateTime](common.md#datetime)
Handler for method `14`. This method should be overridden by a subclass.
**async def update_comment**(client: [RMCClient](rmc.md#rmcclient), comment: [Comment](#comment)) -> [DateTime](common.md#datetime)
Handler for method `15`. This method should be overridden by a subclass.
**async def update_preference**(client: [RMCClient](rmc.md#rmcclient), preference: [PrincipalPreference](#principalpreference)) -> None
Handler for method `16`. This method should be overridden by a subclass.
**async def get_basic_info**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[PrincipalBasicInfo](#principalbasicinfo)]
Handler for method `17`. This method should be overridden by a subclass.
**async def delete_persistent_notification**(client: [RMCClient](rmc.md#rmcclient), notifications: list[[PersistentNotification](#persistentnotification)]) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def check_setting_status**(client: [RMCClient](rmc.md#rmcclient)) -> int
Handler for method `19`. This method should be overridden by a subclass.
**async def get_request_block_settings**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> list[[PrincipalRequestBlockSetting](#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) = [PrincipalBasicInfo](#principalbasicinfo)()
game_key: [GameKey](#gamekey) = [GameKey](#gamekey)()
since: [DateTime](common.md#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](common.md#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](common.md#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) = [NNAInfo](#nnainfo)()
presence: [NintendoPresenceV2](#nintendopresencev2) = [NintendoPresenceV2](#nintendopresencev2)()
comment: [Comment](#comment) = [Comment](#comment)()
befriended: [DateTime](common.md#datetime)
last_online: [DateTime](common.md#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](common.md#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) = [Mii](#mii)()
modified_at: [DateTime](common.md#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) = [MiiList](#miilist)()
unk2: [DateTime](common.md#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) = [GameKey](#gamekey)()
message: str
message_updated: [DateTime](common.md#datetime)
friended: [DateTime](common.md#datetime)
last_online: [DateTime](common.md#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](common.md#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) = [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) = [PrincipalBasicInfo](#principalbasicinfo)()
message: [FriendRequestMessage](#friendrequestmessage) = [FriendRequestMessage](#friendrequestmessage)()
sent: [DateTime](common.md#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) = [GameKey](#gamekey)()
datetime: [DateTime](common.md#datetime)
expires: [DateTime](common.md#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](common.md#datetime) = [DateTime](common.md#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) = [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) = [NNAInfo](#nnainfo)()
token: str
birthday: [DateTime](common.md#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) = [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) = [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) = [GameKey](#gamekey)()
datetime: [DateTime](common.md#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) = [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
================================================
FILE: docs/reference/nex/friends_3ds.md
================================================
# Module: nintendo.nex.friends_3ds
Provides a client and server for the `FriendsProtocolV1`. This page was generated automatically from `friends_3ds.proto`.
**class** [FriendsClientV1](#friendsclientv1)
The client for the `FriendsProtocolV1`.
**class** [FriendsServerV1](#friendsserverv1)
The server for the `FriendsProtocolV1`.
**class** [FriendMii](#friendmii)([Structure](common.md))
**class** [FriendMiiList](#friendmiilist)([Structure](common.md))
**class** [FriendMiiRequest](#friendmiirequest)([Structure](common.md))
**class** [FriendPersistentInfo](#friendpersistentinfo)([Structure](common.md))
**class** [FriendPicture](#friendpicture)([Structure](common.md))
**class** [FriendPresence](#friendpresence)([Structure](common.md))
**class** [FriendRelationship](#friendrelationship)([Structure](common.md))
**class** [GameKey](#gamekey)([Data](common.md))
**class** [Mii](#mii)([Structure](common.md))
**class** [MiiList](#miilist)([Structure](common.md))
**class** [MyProfile](#myprofile)([Structure](common.md))
**class** [NintendoPresence](#nintendopresence)([Structure](common.md))
**class** [PlayedGame](#playedgame)([Structure](common.md))
## FriendsClientV1
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`FriendsClientV1`](#friendsclientv1).
**async def update_profile**(profile_data: [MyProfile](#myprofile)) -> None
Calls method `1` on the server.
**async def update_mii**(mii: [Mii](#mii)) -> None
Calls method `2` on the server.
**async def update_mii_list**(mii_list: [MiiList](#miilist)) -> None
Calls method `3` on the server.
**async def update_played_games**(played_games: list[[PlayedGame](#playedgame)]) -> None
Calls method `4` on the server.
**async def update_preference**(unk1: bool, unk2: bool, unk3: bool) -> None
Calls method `5` on the server.
**async def get_friend_mii**(friends: list[[FriendMiiRequest](#friendmiirequest)]) -> list[[FriendMii](#friendmii)]
Calls method `6` on the server.
**async def get_friend_mii_list**(friends: list[[FriendMiiRequest](#friendmiirequest)]) -> list[[FriendMiiList](#friendmiilist)]
Calls method `7` on the server.
**async def get_friend_relationships**(unk: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Calls method `10` on the server.
**async def add_friend_by_principal_id**(unk: int, pid: int) -> [FriendRelationship](#friendrelationship)
Calls method `11` on the server.
**async def get_all_friends**() -> list[[FriendRelationship](#friendrelationship)]
Calls method `15` on the server.
**async def sync_friend**(unk1: int, unk2: list[int], unk3: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Calls method `17` on the server.
**async def update_presence**(presence_info: [NintendoPresence](#nintendopresence), unk: bool) -> None
Calls method `18` on the server.
**async def update_favorite_game_key**(game_key: [GameKey](#gamekey)) -> None
Calls method `19` on the server.
**async def update_comment**(comment: str) -> None
Calls method `20` on the server.
**async def get_friend_presence**(unk: list[int]) -> list[[FriendPresence](#friendpresence)]
Calls method `22` on the server.
**async def get_friend_picture**(unk: list[int]) -> list[[FriendPicture](#friendpicture)]
Calls method `24` on the server.
**async def get_friend_persistent_info**(unk: list[int]) -> list[[FriendPersistentInfo](#friendpersistentinfo)]
Calls method `25` on the server.
**async def send_invitation**(unk: list[int]) -> None
Calls method `26` on the server.
## FriendsServerV1
**def _\_init__**()
Creates a new [`FriendsServerV1`](#friendsserverv1).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def update_profile**(client: [RMCClient](rmc.md#rmcclient), profile_data: [MyProfile](#myprofile)) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def update_mii**(client: [RMCClient](rmc.md#rmcclient), mii: [Mii](#mii)) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def update_mii_list**(client: [RMCClient](rmc.md#rmcclient), mii_list: [MiiList](#miilist)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def update_played_games**(client: [RMCClient](rmc.md#rmcclient), played_games: list[[PlayedGame](#playedgame)]) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def update_preference**(client: [RMCClient](rmc.md#rmcclient), unk1: bool, unk2: bool, unk3: bool) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def get_friend_mii**(client: [RMCClient](rmc.md#rmcclient), friends: list[[FriendMiiRequest](#friendmiirequest)]) -> list[[FriendMii](#friendmii)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_friend_mii_list**(client: [RMCClient](rmc.md#rmcclient), friends: list[[FriendMiiRequest](#friendmiirequest)]) -> list[[FriendMiiList](#friendmiilist)]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_friend_relationships**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `10`. This method should be overridden by a subclass.
**async def add_friend_by_principal_id**(client: [RMCClient](rmc.md#rmcclient), unk: int, pid: int) -> [FriendRelationship](#friendrelationship)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_all_friends**(client: [RMCClient](rmc.md#rmcclient)) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `15`. This method should be overridden by a subclass.
**async def sync_friend**(client: [RMCClient](rmc.md#rmcclient), unk1: int, unk2: list[int], unk3: list[int]) -> list[[FriendRelationship](#friendrelationship)]
Handler for method `17`. This method should be overridden by a subclass.
**async def update_presence**(client: [RMCClient](rmc.md#rmcclient), presence_info: [NintendoPresence](#nintendopresence), unk: bool) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def update_favorite_game_key**(client: [RMCClient](rmc.md#rmcclient), game_key: [GameKey](#gamekey)) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def update_comment**(client: [RMCClient](rmc.md#rmcclient), comment: str) -> None
Handler for method `20`. This method should be overridden by a subclass.
**async def get_friend_presence**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> list[[FriendPresence](#friendpresence)]
Handler for method `22`. This method should be overridden by a subclass.
**async def get_friend_picture**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> list[[FriendPicture](#friendpicture)]
Handler for method `24`. This method should be overridden by a subclass.
**async def get_friend_persistent_info**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> list[[FriendPersistentInfo](#friendpersistentinfo)]
Handler for method `25`. This method should be overridden by a subclass.
**async def send_invitation**(client: [RMCClient](rmc.md#rmcclient), unk: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
## FriendMii
**def _\_init__**()
Creates a new `FriendMii` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
mii: [Mii](#mii) = [Mii](#mii)()
unk2: [DateTime](common.md#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) = [MiiList](#miilist)()
unk2: [DateTime](common.md#datetime)
## FriendMiiRequest
**def _\_init__**()
Creates a new `FriendMiiRequest` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: [DateTime](common.md#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) = [GameKey](#gamekey)()
message: str
message_updated: [DateTime](common.md#datetime)
friended: [DateTime](common.md#datetime)
unk: [DateTime](common.md#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](common.md#datetime)
## FriendPresence
**def _\_init__**()
Creates a new `FriendPresence` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk: int
presence: [NintendoPresence](#nintendopresence) = [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:
unk1: int
unk2: int
unk3: int
## 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:
unk1: str
unk2: bool
unk3: 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]
## 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
unk1: int
unk2: str
unk3: str
## 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) = [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
## 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) = [GameKey](#gamekey)()
datetime: [DateTime](common.md#datetime)
================================================
FILE: docs/reference/nex/health.md
================================================
# Module: nintendo.nex.health
Provides a client and server for the `HealthProtocol`. This page was generated automatically from `health.proto`.
**class** [HealthClient](#healthclient)
The client for the `HealthProtocol`.
**class** [HealthServer](#healthserver)
The server for the `HealthProtocol`.
## HealthClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`HealthClient`](#healthclient).
**async def ping_daemon**() -> bool
Calls method `1` on the server.
**async def ping_database**() -> bool
Calls method `2` on the server.
**async def run_sanity_check**() -> bool
Calls method `3` on the server.
**async def fix_sanity_errors**() -> bool
Calls method `4` on the server.
## HealthServer
**def _\_init__**()
Creates a new [`HealthServer`](#healthserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def ping_daemon**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def ping_database**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `2`. This method should be overridden by a subclass.
**async def run_sanity_check**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def fix_sanity_errors**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `4`. This method should be overridden by a subclass.
================================================
FILE: docs/reference/nex/hpp.md
================================================
# Module: nintendo.nex.hpp
Provides a client that performs remote method calls through HTTP.
**class** [HppClient](#hppclient)
The HTTP RMC client.
## HppClient
**def _\_init__**(settings: [Settings](settings.md#settings), game_server_id: int, nex_version: str, pid: int, password: str)
Creates a new `hpp` client.
**def set_environment**(env: str) -> None
Changes the environment. The default is `"L1"` (production).
**async def request**(protocol: int, method: int, body: bytes) -> bytes
Performs a remote method call. Blocks until the RMC is complete. Returns the body of the RMC response on success. Raises [`RMCError`](common.md#rmcerror) if the server returns an error code.
================================================
FILE: docs/reference/nex/kerberos.md
================================================
# Module: nintendo.nex.kerberos
Provides classes for Kerberos authentication. For details, click [here](https://github.com/kinnay/nintendo/wiki/Kerberos-Authentication).
**class** [KeyDerivationOld](#keyderivationold)
Implements the old key derivation method (used by 3DS and Wii U servers).
**class** [KeyDerivationNew](#keyderivationnew)
Implements the new key derivation method (used by Switch servers).
**class** [KerberosEncryption](#kerberosencryption)
Implements Kerberos encryption (RC4 + HMAC).
**class** [ClientTicket](#clientticket)
The Kerberos ticket that's visible to the client.
**class** [ServerTicket](#serverticket)
The internal part of the Kerberos ticket that's only visible to the server.
**class** [Credentials](#credentials)
Holds information that's required to log in on a secure server.
## KeyDerivationOld
**def _\_init__**(base_count: int = 65000, pid_count: int = 1024)
Creates a new key derivation instance.
**def derive_key**(password: bytes, pid: int) -> bytes
Derives the Kerberos key from the given password and user id.
## KeyDerivationNew
**def _\_init__**(base_count: int = 1, pid_count: int = 1)
Creates a new key derivation instance.
**def derive_key**(password: bytes, pid: int) -> bytes
Derives the Kerberos key from the given password and user id.
## KerberosEncryption
**def _\_init__**(key: bytes)
Creates a `KerberosEncryption` instance.
**def check**(data: bytes) -> bool
Checks the HMAC. Returns `True` if it is correct.
**def decrypt**(data: bytes) -> bytes
Checks the HMAC and decrypts the given data. Raises `ValueError` if the HMAC is incorrect.
**def encrypt**(data: bytes) -> bytes
Encrypts the given data and adds a HMAC.
## ClientTicket
`session_key: bytes = None`
The session key of the ticket.
`target: int = None`
The target user id of the ticket.
`internal: bytes = None`
The internal ticket data that can only be decrypted by the target user.
**def _\_init__**()
Creates a new [`ClientTicket`](#clientticket) instance. The attributes must be filled in manually.
**def encrypt**(key: bytes, settings: [Settings](settings.md#settings)) -> bytes
Encodes the ticket and encrypts it with the given Kerberos key.
@classmethod
**def decrypt**(data: bytes, key: bytes, settings: [Settings](settings.md#settings)) -> [`ClientTicket`](#clientticket)
Decrypts `data` with the given Kerberos key and parses the ticket.
## ServerTicket
timestamp: [DateTime](common.md#datetime) = None
Time at which the ticket was issued.
`source: int = None`
The source user id of the ticket.
`session_key: bytes = None`
The session key of the ticket.
**def _\_init__**()
Creates a new [`ServerTicket`](#serverticket) instance. The attributes must be filled in manually.
**def encrypt**(key: bytes, settings: [Settings](settings.md#settings)) -> bytes
Encodes the ticket and encrypts it with the given Kerberos key.
@classmethod
**def decrypt**(data: bytes, key: bytes, settings: [Settings](settings.md#settings)) -> [`ServerTicket`](#serverticket)
Decrypts `data` with the given Kerberos key and parses the ticket.
## Credentials
ticket: [ClientTicket](#clientticket)
The ticket received from the authentication server.
`pid: int`
The source user id of the ticket.
`cid: int`
The connection id.
**def _\_init__**(ticket: [ClientTicket](#clientticket), pid: int, cid: int)
Creates a new [`Credentials`](#credentials) object from the given ticket, user id and connection id.
================================================
FILE: docs/reference/nex/matchmaking.md
================================================
# Module: nintendo.nex.matchmaking
Provides a client and server for the `MatchMakingProtocol`, `MatchMakingProtocolExt`, `MatchmakeExtensionProtocol` and `MatchmakeRefereeProtocol`. This page was generated automatically from `matchmaking.proto`.
**class** [MatchMakingClient](#matchmakingclient)
The client for the `MatchMakingProtocol`.
**class** [MatchMakingClientExt](#matchmakingclientext)
The client for the `MatchMakingProtocolExt`.
**class** [MatchmakeExtensionClient](#matchmakeextensionclient)
The client for the `MatchmakeExtensionProtocol`.
**class** [MatchmakeRefereeClient](#matchmakerefereeclient)
The client for the `MatchmakeRefereeProtocol`.
**class** [MatchMakingServer](#matchmakingserver)
The server for the `MatchMakingProtocol`.
**class** [MatchMakingServerExt](#matchmakingserverext)
The server for the `MatchMakingProtocolExt`.
**class** [MatchmakeExtensionServer](#matchmakeextensionserver)
The server for the `MatchmakeExtensionProtocol`.
**class** [MatchmakeRefereeServer](#matchmakerefereeserver)
The server for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeSystem](#matchmakesystem)
**class** [AutoMatchmakeParam](#automatchmakeparam)([Structure](common.md))
**class** [CreateMatchmakeSessionParam](#creatematchmakesessionparam)([Structure](common.md))
**class** [DeletionEntry](#deletionentry)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)([Structure](common.md))
**class** [Gathering](#gathering)([Structure](common.md))
**class** [GatheringStats](#gatheringstats)([Structure](common.md))
**class** [GatheringURLs](#gatheringurls)([Structure](common.md))
**class** [Invitation](#invitation)([Structure](common.md))
**class** [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)([Structure](common.md))
**class** [MatchmakeBlockListParam](#matchmakeblocklistparam)([Structure](common.md))
**class** [MatchmakeParam](#matchmakeparam)([Structure](common.md))
**class** [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)([Structure](common.md))
**class** [MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)([Structure](common.md))
**class** [MatchmakeRefereeRound](#matchmakerefereeround)([Structure](common.md))
**class** [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)([Structure](common.md))
**class** [MatchmakeRefereeStats](#matchmakerefereestats)([Structure](common.md))
**class** [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)([Structure](common.md))
**class** [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)([Structure](common.md))
**class** [MatchmakeSession](#matchmakesession)([Gathering](#gathering))
**class** [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)([Structure](common.md))
**class** [ParticipantDetails](#participantdetails)([Structure](common.md))
**class** [PersistentGathering](#persistentgathering)([Gathering](#gathering))
**class** [PlayingSession](#playingsession)([Structure](common.md))
**class** [SimpleCommunity](#simplecommunity)([Structure](common.md))
**class** [SimplePlayingSession](#simpleplayingsession)([Structure](common.md))
**class** [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)([Structure](common.md))
## MatchMakingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClient`](#matchmakingclient).
**async def register_gathering**(gathering: [Gathering](#gathering)) -> int
Calls method `1` on the server.
**async def unregister_gathering**(gid: int) -> bool
Calls method `2` on the server.
**async def unregister_gatherings**(gids: list[int]) -> bool
Calls method `3` on the server.
**async def update_gathering**(gathering: [Gathering](#gathering)) -> bool
Calls method `4` on the server.
**async def invite**(gid: int, pids: list[int], message: str) -> bool
Calls method `5` on the server.
**async def accept_invitation**(gid: int, message: str) -> bool
Calls method `6` on the server.
**async def decline_invitation**(gid: int, message: str) -> bool
Calls method `7` on the server.
**async def cancel_invitation**(gid: int, pids: list[int], message: str) -> bool
Calls method `8` on the server.
**async def get_invitations_sent**(gid: int) -> list[[Invitation](#invitation)]
Calls method `9` on the server.
**async def get_invitations_received**() -> list[[Invitation](#invitation)]
Calls method `10` on the server.
**async def participate**(gid: int, message: str) -> bool
Calls method `11` on the server.
**async def cancel_participation**(gid: int, message: str) -> bool
Calls method `12` on the server.
**async def get_participants**(gid: int) -> list[int]
Calls method `13` on the server.
**async def add_participants**(gid: int, pids: list[int], message: str) -> bool
Calls method `14` on the server.
**async def get_detailed_participants**(gid: int) -> list[[ParticipantDetails](#participantdetails)]
Calls method `15` on the server.
**async def get_participants_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `16` on the server.
**async def find_by_type**(type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `17` on the server.
**async def find_by_description**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `18` on the server.
**async def find_by_description_regex**(regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `19` on the server.
**async def find_by_id**(ids: list[int]) -> list[[Gathering](#gathering)]
Calls method `20` on the server.
**async def find_by_single_id**(gid: int) -> [RMCResponse](common.md)
Calls method `21` on the server. The RMC response has the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `22` on the server.
**async def find_by_participants**(pids: list[int]) -> list[[Gathering](#gathering)]
Calls method `23` on the server.
**async def find_invitations**(range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `24` on the server.
**async def find_by_sql_query**(query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `25` on the server.
**async def launch_session**(gid: int, url: str) -> bool
Calls method `26` on the server.
**async def update_session_url**(gid: int, url: str) -> bool
Calls method `27` on the server.
**async def get_session_url**(gid: int) -> [RMCResponse](common.md)
Calls method `28` on the server. The RMC response has the following attributes:
result: bool
url: str
**async def get_state**(gid: int) -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
result: bool
state: int
**async def set_state**(gid: int, state: int) -> bool
Calls method `30` on the server.
**async def report_stats**(gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Calls method `31` on the server.
**async def get_stats**(gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Calls method `32` on the server. The RMC response has the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(gid: int) -> bool
Calls method `33` on the server.
**async def get_pending_deletions**(reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `34` on the server. The RMC response has the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(deletions: list[int]) -> bool
Calls method `35` on the server.
**async def migrate_gathering_ownership_v1**(gid: int, potential_owners: list[int]) -> bool
Calls method `36` on the server.
**async def find_by_description_like**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `37` on the server.
**async def register_local_url**(gid: int, url: [StationURL](common.md#stationurl)) -> None
Calls method `38` on the server.
**async def register_local_urls**(gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `39` on the server.
**async def update_session_host_v1**(gid: int) -> None
Calls method `40` on the server.
**async def get_session_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `41` on the server.
**async def update_session_host**(gid: int, is_migrate_owner: bool) -> None
Calls method `42` on the server.
**async def update_gathering_ownership**(gid: int, participants_only: bool) -> bool
Calls method `43` on the server.
**async def migrate_gathering_ownership**(gid: int, potential_owners: list[int], participants_only: bool) -> None
Calls method `44` on the server.
## MatchMakingClientExt
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClientExt`](#matchmakingclientext).
**async def end_participation**(gid: int, message: str) -> bool
Calls method `1` on the server.
**async def get_participants**(gid: int, only_active: bool) -> list[int]
Calls method `2` on the server.
**async def get_detailed_participants**(gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Calls method `3` on the server.
**async def get_participants_urls**(gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Calls method `4` on the server.
**async def get_gathering_relations**(id: int, descr: str) -> str
Calls method `5` on the server.
**async def delete_from_deletions**(deletions: list[int], pid: int) -> None
Calls method `6` on the server.
## MatchmakeExtensionClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeExtensionClient`](#matchmakeextensionclient).
**async def close_participation**(gid: int) -> None
Calls method `1` on the server.
**async def open_participation**(gid: int) -> None
Calls method `2` on the server.
**async def auto_matchmake_postpone**(gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `3` on the server.
**async def browse_matchmake_session**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `4` on the server.
**async def browse_matchmake_session_with_host_urls**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `5` on the server. The RMC response has the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(gid: int, message: str) -> bytes
Calls method `7` on the server.
**async def modify_current_game_attribute**(gid: int, attrib: int, value: int) -> None
Calls method `8` on the server.
**async def update_notification_data**(type: int, param1: int, param2: int, param3: str) -> None
Calls method `9` on the server.
**async def get_friend_notification_data**(type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `10` on the server.
**async def update_application_buffer**(gid: int, buffer: bytes) -> None
Calls method `11` on the server.
**async def update_matchmake_session_attribute**(gid: int, attribs: list[int]) -> None
Calls method `12` on the server.
**async def get_friend_notification_data_list**(types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `13` on the server.
**async def update_matchmake_session**(gathering: [Gathering](#gathering)) -> None
Calls method `14` on the server.
**async def auto_matchmake_with_search_criteria_postpone**(search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `15` on the server.
**async def get_playing_session**(pids: list[int]) -> list[[PlayingSession](#playingsession)]
Calls method `16` on the server.
**async def create_community**(community: [PersistentGathering](#persistentgathering), message: str) -> int
Calls method `17` on the server.
**async def update_community**(community: [PersistentGathering](#persistentgathering)) -> None
Calls method `18` on the server.
**async def join_community**(gid: int, message: str, password: str) -> None
Calls method `19` on the server.
**async def find_community_by_gathering_id**(gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Calls method `20` on the server.
**async def find_official_community**(available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `21` on the server.
**async def find_community_by_participant**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `22` on the server.
**async def update_privacy_setting**(online_status: bool, community_participation: bool) -> None
Calls method `23` on the server.
**async def get_my_block_list**() -> list[int]
Calls method `24` on the server.
**async def add_to_block_list**(pids: list[int]) -> None
Calls method `25` on the server.
**async def remove_from_block_list**(pids: list[int]) -> None
Calls method `26` on the server.
**async def clear_my_block_list**() -> None
Calls method `27` on the server.
**async def report_violation**(pid: int, username: str, violation_code: int) -> None
Calls method `28` on the server.
**async def is_violation_user**() -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Calls method `30` on the server.
**async def get_simple_playing_session**(pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Calls method `31` on the server.
**async def get_simple_community**(gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Calls method `32` on the server.
**async def auto_matchmake_with_gathering_id_postpone**(gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `33` on the server.
**async def update_progress_score**(gid: int, score: int) -> None
Calls method `34` on the server.
**async def debug_notify_event**(pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Calls method `35` on the server.
**async def generate_matchmake_session_system_password**(gid: int) -> str
Calls method `36` on the server.
**async def clear_matchmake_session_system_password**(gid: int) -> None
Calls method `37` on the server.
**async def create_matchmake_session_with_param**(param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `38` on the server.
**async def join_matchmake_session_with_param**(param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `39` on the server.
**async def auto_matchmake_with_param_postpone**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `40` on the server.
**async def find_matchmake_session_by_gathering_id_detail**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `41` on the server.
**async def browse_matchmake_session_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `42` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `43` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Calls method `44` on the server.
**async def request_matchmaking**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Calls method `45` on the server.
**async def withdraw_matchmaking**(request_id: int) -> None
Calls method `46` on the server.
**async def withdraw_matchmaking_all**() -> None
Calls method `47` on the server.
**async def find_matchmake_session_by_gathering_id**(gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `48` on the server.
**async def find_matchmake_session_by_single_gathering_id**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `49` on the server.
**async def find_matchmake_session_by_owner**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `50` on the server.
**async def find_matchmake_session_by_participant**(param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Calls method `51` on the server.
**async def browse_matchmake_session_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `52` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Calls method `53` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
## MatchmakeRefereeClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeRefereeClient`](#matchmakerefereeclient).
**async def start_round**(param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Calls method `1` on the server.
**async def get_start_round_param**(round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Calls method `2` on the server.
**async def end_round**(param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Calls method `3` on the server.
**async def end_round_without_report**(round_id: int) -> None
Calls method `4` on the server.
**async def get_round_participants**(round_id: int) -> list[int]
Calls method `5` on the server.
**async def get_not_summarized_round**() -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Calls method `6` on the server.
**async def get_round**(round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Calls method `7` on the server.
**async def get_stats_primary**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `8` on the server.
**async def get_stats_primaries**(targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Calls method `10` on the server.
**async def create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `11` on the server.
**async def get_or_create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `12` on the server.
**async def reset_stats**() -> None
Calls method `13` on the server.
## MatchMakingServer
**def _\_init__**()
Creates a new [`MatchMakingServer`](#matchmakingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def unregister_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `2`. This method should be overridden by a subclass.
**async def unregister_gatherings**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def update_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> bool
Handler for method `4`. This method should be overridden by a subclass.
**async def invite**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `5`. This method should be overridden by a subclass.
**async def accept_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `6`. This method should be overridden by a subclass.
**async def decline_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `7`. This method should be overridden by a subclass.
**async def cancel_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `8`. This method should be overridden by a subclass.
**async def get_invitations_sent**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[Invitation](#invitation)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_invitations_received**(client: [RMCClient](rmc.md#rmcclient)) -> list[[Invitation](#invitation)]
Handler for method `10`. This method should be overridden by a subclass.
**async def participate**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `11`. This method should be overridden by a subclass.
**async def cancel_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `12`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[int]
Handler for method `13`. This method should be overridden by a subclass.
**async def add_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `14`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `15`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `16`. This method should be overridden by a subclass.
**async def find_by_type**(client: [RMCClient](rmc.md#rmcclient), type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `17`. This method should be overridden by a subclass.
**async def find_by_description**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `18`. This method should be overridden by a subclass.
**async def find_by_description_regex**(client: [RMCClient](rmc.md#rmcclient), regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `19`. This method should be overridden by a subclass.
**async def find_by_id**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_by_single_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `21`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(client: [RMCClient](rmc.md#rmcclient), owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def find_by_participants**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `23`. This method should be overridden by a subclass.
**async def find_invitations**(client: [RMCClient](rmc.md#rmcclient), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `24`. This method should be overridden by a subclass.
**async def find_by_sql_query**(client: [RMCClient](rmc.md#rmcclient), query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `25`. This method should be overridden by a subclass.
**async def launch_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `26`. This method should be overridden by a subclass.
**async def update_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `27`. This method should be overridden by a subclass.
**async def get_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `28`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
url: str
**async def get_state**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
state: int
**async def set_state**(client: [RMCClient](rmc.md#rmcclient), gid: int, state: int) -> bool
Handler for method `30`. This method should be overridden by a subclass.
**async def report_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Handler for method `31`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Handler for method `32`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `33`. This method should be overridden by a subclass.
**async def get_pending_deletions**(client: [RMCClient](rmc.md#rmcclient), reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `34`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int]) -> bool
Handler for method `35`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int]) -> bool
Handler for method `36`. This method should be overridden by a subclass.
**async def find_by_description_like**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `37`. This method should be overridden by a subclass.
**async def register_local_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: [StationURL](common.md#stationurl)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def register_local_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `39`. This method should be overridden by a subclass.
**async def update_session_host_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `40`. This method should be overridden by a subclass.
**async def get_session_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `41`. This method should be overridden by a subclass.
**async def update_session_host**(client: [RMCClient](rmc.md#rmcclient), gid: int, is_migrate_owner: bool) -> None
Handler for method `42`. This method should be overridden by a subclass.
**async def update_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, participants_only: bool) -> bool
Handler for method `43`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int], participants_only: bool) -> None
Handler for method `44`. This method should be overridden by a subclass.
## MatchMakingServerExt
**def _\_init__**()
Creates a new [`MatchMakingServerExt`](#matchmakingserverext).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def end_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[int]
Handler for method `2`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `3`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Handler for method `4`. This method should be overridden by a subclass.
**async def get_gathering_relations**(client: [RMCClient](rmc.md#rmcclient), id: int, descr: str) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int], pid: int) -> None
Handler for method `6`. This method should be overridden by a subclass.
## MatchmakeExtensionServer
**def _\_init__**()
Creates a new [`MatchmakeExtensionServer`](#matchmakeextensionserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def close_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def open_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def auto_matchmake_postpone**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `3`. This method should be overridden by a subclass.
**async def browse_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `4`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `5`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bytes
Handler for method `7`. This method should be overridden by a subclass.
**async def modify_current_game_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attrib: int, value: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def update_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int, param1: int, param2: int, param3: str) -> None
Handler for method `9`. This method should be overridden by a subclass.
**async def get_friend_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `10`. This method should be overridden by a subclass.
**async def update_application_buffer**(client: [RMCClient](rmc.md#rmcclient), gid: int, buffer: bytes) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def update_matchmake_session_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attribs: list[int]) -> None
Handler for method `12`. This method should be overridden by a subclass.
**async def get_friend_notification_data_list**(client: [RMCClient](rmc.md#rmcclient), types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `13`. This method should be overridden by a subclass.
**async def update_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> None
Handler for method `14`. This method should be overridden by a subclass.
**async def auto_matchmake_with_search_criteria_postpone**(client: [RMCClient](rmc.md#rmcclient), search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[PlayingSession](#playingsession)]
Handler for method `16`. This method should be overridden by a subclass.
**async def create_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering), message: str) -> int
Handler for method `17`. This method should be overridden by a subclass.
**async def update_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering)) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def join_community**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str, password: str) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def find_community_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_official_community**(client: [RMCClient](rmc.md#rmcclient), available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `21`. This method should be overridden by a subclass.
**async def find_community_by_participant**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def update_privacy_setting**(client: [RMCClient](rmc.md#rmcclient), online_status: bool, community_participation: bool) -> None
Handler for method `23`. This method should be overridden by a subclass.
**async def get_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> list[int]
Handler for method `24`. This method should be overridden by a subclass.
**async def add_to_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `25`. This method should be overridden by a subclass.
**async def remove_from_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def clear_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `27`. This method should be overridden by a subclass.
**async def report_violation**(client: [RMCClient](rmc.md#rmcclient), pid: int, username: str, violation_code: int) -> None
Handler for method `28`. This method should be overridden by a subclass.
**async def is_violation_user**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(client: [RMCClient](rmc.md#rmcclient), gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Handler for method `30`. This method should be overridden by a subclass.
**async def get_simple_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Handler for method `31`. This method should be overridden by a subclass.
**async def get_simple_community**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Handler for method `32`. This method should be overridden by a subclass.
**async def auto_matchmake_with_gathering_id_postpone**(client: [RMCClient](rmc.md#rmcclient), gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `33`. This method should be overridden by a subclass.
**async def update_progress_score**(client: [RMCClient](rmc.md#rmcclient), gid: int, score: int) -> None
Handler for method `34`. This method should be overridden by a subclass.
**async def debug_notify_event**(client: [RMCClient](rmc.md#rmcclient), pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Handler for method `35`. This method should be overridden by a subclass.
**async def generate_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> str
Handler for method `36`. This method should be overridden by a subclass.
**async def clear_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def create_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `38`. This method should be overridden by a subclass.
**async def join_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `39`. This method should be overridden by a subclass.
**async def auto_matchmake_with_param_postpone**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `40`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id_detail**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `41`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `42`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `43`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(client: [RMCClient](rmc.md#rmcclient), param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Handler for method `44`. This method should be overridden by a subclass.
**async def request_matchmaking**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Handler for method `45`. This method should be overridden by a subclass.
**async def withdraw_matchmaking**(client: [RMCClient](rmc.md#rmcclient), request_id: int) -> None
Handler for method `46`. This method should be overridden by a subclass.
**async def withdraw_matchmaking_all**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `47`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `48`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_single_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `49`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_owner**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `50`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_participant**(client: [RMCClient](rmc.md#rmcclient), param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Handler for method `51`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `52`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Handler for method `53`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
## MatchmakeRefereeServer
**def _\_init__**()
Creates a new [`MatchmakeRefereeServer`](#matchmakerefereeserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def start_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def get_start_round_param**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Handler for method `2`. This method should be overridden by a subclass.
**async def end_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def end_round_without_report**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_round_participants**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> list[int]
Handler for method `5`. This method should be overridden by a subclass.
**async def get_not_summarized_round**(client: [RMCClient](rmc.md#rmcclient)) -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_round**(client: [RMCClient](rmc.md#rmcclient), round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Handler for method `7`. This method should be overridden by a subclass.
**async def get_stats_primary**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_stats_primaries**(client: [RMCClient](rmc.md#rmcclient), targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Handler for method `10`. This method should be overridden by a subclass.
**async def create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_or_create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `12`. This method should be overridden by a subclass.
**async def reset_stats**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `13`. This method should be overridden by a subclass.
## MatchmakeSystem
This class defines the following constants:
`GLOBAL = 1`
`FRIENDS = 2`
## AutoMatchmakeParam
**def _\_init__**()
Creates a new `AutoMatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)]
target_gids: list[int]
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## CreateMatchmakeSessionParam
**def _\_init__**()
Creates a new `CreateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
additional_participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
## DeletionEntry
**def _\_init__**()
Creates a new `DeletionEntry` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
pid: int
reason: int
## FindMatchmakeSessionByParticipantParam
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pids: list[int]
options: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## FindMatchmakeSessionByParticipantResult
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
## Gathering
**def _\_init__**()
Creates a new `Gathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int = 0
owner: int = 0
host: int = 0
min_participants: int = 0
max_participants: int = 0
participation_policy: int = 1
policy_argument: int = 0
flags: int = 512
state: int = 0
description: str = ""
## GatheringStats
**def _\_init__**()
Creates a new `GatheringStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
flags: int
values: list[float]
## GatheringURLs
**def _\_init__**()
Creates a new `GatheringURLs` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
urls: list[[StationURL](common.md#stationurl)]
## Invitation
**def _\_init__**()
Creates a new `Invitation` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
guest: int
message: str
## JoinMatchmakeSessionParam
**def _\_init__**()
Creates a new `JoinMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
participants: list[int]
gid_for_participation_check: int
options: int
behavior: int
user_password: str
system_password: str
join_message: str
num_participants: int
extra_participants: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## MatchmakeBlockListParam
**def _\_init__**()
Creates a new `MatchmakeBlockListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
options: int = 0
## MatchmakeParam
**def _\_init__**()
Creates a new `MatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
param: dict[str, object] = {}
## MatchmakeRefereeEndRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeEndRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
round_id: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereePersonalRoundResult
**def _\_init__**()
Creates a new `MatchmakeRefereePersonalRoundResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
personal_round_result_flag: int
round_win_loss: int
rating_change: int
buffer: bytes
## MatchmakeRefereeRound
**def _\_init__**()
Creates a new `MatchmakeRefereeRound` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
gid: int
state: int
personal_data_category: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereeStartRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStartRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
personal_data_category: int
gid: int
pids: list[int]
## MatchmakeRefereeStats
**def _\_init__**()
Creates a new `MatchmakeRefereeStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int
category: int
pid: int
recent_disconnection: int
recent_violation: int
recent_mismatch: int
recent_win: int
recent_loss: int
recent_draw: int
total_disconnect: int
total_violation: int
total_mismatch: int
total_win: int
total_loss: int
total_draw: int
rating_value: int
## MatchmakeRefereeStatsInitParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
initial_rating: int
## MatchmakeRefereeStatsTarget
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
category: int
## MatchmakeSession
**def _\_init__**()
Creates a new `MatchmakeSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
game_mode: int = 0
attribs: list[int] = [0, 0, 0, 0, 0, 0]
open_participation: bool = True
matchmake_system: int = 0
application_data: bytes = b""
num_participants: int = 0
If 30000 <= `nex.version` < 40000:
If `nex.version` >= 30500:
progress_score: int = 100
If `nex.version` >= 30000:
session_key: bytes = b""
If `nex.version` >= 30500:
option: int = 0
If `nex.version` >= 30600:
If `revision` >= 1:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
If `nex.version` >= 30700:
If `revision` >= 2:
user_password: str = ""
If `nex.version` >= 30800:
If `revision` >= 3:
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
If `nex.version` >= 40000:
progress_score: int = 100
session_key: bytes = b""
option: int = 0
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
user_password: str = ""
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
codeword: str = ""
## MatchmakeSessionSearchCriteria
**def _\_init__**()
Creates a new `MatchmakeSessionSearchCriteria` instance. Required fields must be filled in manually.
The following fields are defined in this class:
attribs: list[str] = ["", "", "", "", "", ""]
game_mode: str = ""
min_participants: str = ""
max_participants: str = ""
matchmake_system: str = ""
vacant_only: bool = True
exclude_locked: bool = True
exclude_non_host_pid: bool = False
selection_method: int = 0
If `nex.version` >= 30500:
vacant_participants: int = 1
If `nex.version` >= 40000:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
exclude_user_password: bool = False
exclude_system_password: bool = False
refer_gid: int = 0
codeword: str = ""
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## ParticipantDetails
**def _\_init__**()
Creates a new `ParticipantDetails` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
message: str
participants: int
## PersistentGathering
**def _\_init__**()
Creates a new `PersistentGathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
password: str
attribs: list[int]
application_buffer: bytes
participation_start: [DateTime](common.md#datetime)
participation_end: [DateTime](common.md#datetime)
matchmake_session_count: int
num_participants: int
## PlayingSession
**def _\_init__**()
Creates a new `PlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gathering: [Gathering](#gathering)
## SimpleCommunity
**def _\_init__**()
Creates a new `SimpleCommunity` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
matchmake_session_count: int
## SimplePlayingSession
**def _\_init__**()
Creates a new `SimplePlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gid: int
game_mode: int
attribute: int
## UpdateMatchmakeSessionParam
**def _\_init__**()
Creates a new `UpdateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
modification_flags: int
attributes: list[int]
open_participation: bool
application_buffer: bytes
progress_score: int
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime)
user_password: str
game_mode: int
description: str
min_participants: int
max_participants: int
matchmake_system: int
participation_policy: int
policy_argument: int
codeword: str
================================================
FILE: docs/reference/nex/matchmaking_eagle.md
================================================
# Module: nintendo.nex.matchmaking_eagle
Provides a client and server for the `MatchMakingProtocol`, `MatchMakingProtocolExt`, `MatchmakeExtensionProtocol` and `MatchmakeRefereeProtocol`. This page was generated automatically from `matchmaking_eagle.proto`.
**class** [MatchMakingClient](#matchmakingclient)
The client for the `MatchMakingProtocol`.
**class** [MatchMakingClientExt](#matchmakingclientext)
The client for the `MatchMakingProtocolExt`.
**class** [MatchmakeExtensionClient](#matchmakeextensionclient)
The client for the `MatchmakeExtensionProtocol`.
**class** [MatchmakeRefereeClient](#matchmakerefereeclient)
The client for the `MatchmakeRefereeProtocol`.
**class** [MatchMakingServer](#matchmakingserver)
The server for the `MatchMakingProtocol`.
**class** [MatchMakingServerExt](#matchmakingserverext)
The server for the `MatchMakingProtocolExt`.
**class** [MatchmakeExtensionServer](#matchmakeextensionserver)
The server for the `MatchmakeExtensionProtocol`.
**class** [MatchmakeRefereeServer](#matchmakerefereeserver)
The server for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeSystem](#matchmakesystem)
**class** [AutoMatchmakeParam](#automatchmakeparam)([Structure](common.md))
**class** [CreateMatchmakeSessionParam](#creatematchmakesessionparam)([Structure](common.md))
**class** [DeletionEntry](#deletionentry)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)([Structure](common.md))
**class** [Gathering](#gathering)([Structure](common.md))
**class** [GatheringStats](#gatheringstats)([Structure](common.md))
**class** [GatheringURLs](#gatheringurls)([Structure](common.md))
**class** [Invitation](#invitation)([Structure](common.md))
**class** [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)([Structure](common.md))
**class** [MatchmakeBlockListParam](#matchmakeblocklistparam)([Structure](common.md))
**class** [MatchmakeParam](#matchmakeparam)([Structure](common.md))
**class** [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)([Structure](common.md))
**class** [MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)([Structure](common.md))
**class** [MatchmakeRefereeRound](#matchmakerefereeround)([Structure](common.md))
**class** [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)([Structure](common.md))
**class** [MatchmakeRefereeStats](#matchmakerefereestats)([Structure](common.md))
**class** [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)([Structure](common.md))
**class** [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)([Structure](common.md))
**class** [MatchmakeSession](#matchmakesession)([Gathering](#gathering))
**class** [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)([Structure](common.md))
**class** [ParticipantDetails](#participantdetails)([Structure](common.md))
**class** [PersistentGathering](#persistentgathering)([Gathering](#gathering))
**class** [PlayingSession](#playingsession)([Structure](common.md))
**class** [SimpleCommunity](#simplecommunity)([Structure](common.md))
**class** [SimplePlayingSession](#simpleplayingsession)([Structure](common.md))
**class** [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)([Structure](common.md))
## MatchMakingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClient`](#matchmakingclient).
**async def register_gathering**(gathering: [Gathering](#gathering)) -> int
Calls method `1` on the server.
**async def unregister_gathering**(gid: int) -> bool
Calls method `2` on the server.
**async def unregister_gatherings**(gids: list[int]) -> bool
Calls method `3` on the server.
**async def update_gathering**(gathering: [Gathering](#gathering)) -> bool
Calls method `4` on the server.
**async def invite**(gid: int, pids: list[int], message: str) -> bool
Calls method `5` on the server.
**async def accept_invitation**(gid: int, message: str) -> bool
Calls method `6` on the server.
**async def decline_invitation**(gid: int, message: str) -> bool
Calls method `7` on the server.
**async def cancel_invitation**(gid: int, pids: list[int], message: str) -> bool
Calls method `8` on the server.
**async def get_invitations_sent**(gid: int) -> list[[Invitation](#invitation)]
Calls method `9` on the server.
**async def get_invitations_received**() -> list[[Invitation](#invitation)]
Calls method `10` on the server.
**async def participate**(gid: int, message: str) -> bool
Calls method `11` on the server.
**async def cancel_participation**(gid: int, message: str) -> bool
Calls method `12` on the server.
**async def get_participants**(gid: int) -> list[int]
Calls method `13` on the server.
**async def add_participants**(gid: int, pids: list[int], message: str) -> bool
Calls method `14` on the server.
**async def get_detailed_participants**(gid: int) -> list[[ParticipantDetails](#participantdetails)]
Calls method `15` on the server.
**async def get_participants_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `16` on the server.
**async def find_by_type**(type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `17` on the server.
**async def find_by_description**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `18` on the server.
**async def find_by_description_regex**(regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `19` on the server.
**async def find_by_id**(ids: list[int]) -> list[[Gathering](#gathering)]
Calls method `20` on the server.
**async def find_by_single_id**(gid: int) -> [RMCResponse](common.md)
Calls method `21` on the server. The RMC response has the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `22` on the server.
**async def find_by_participants**(pids: list[int]) -> list[[Gathering](#gathering)]
Calls method `23` on the server.
**async def find_invitations**(range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `24` on the server.
**async def find_by_sql_query**(query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `25` on the server.
**async def launch_session**(gid: int, url: str) -> bool
Calls method `26` on the server.
**async def update_session_url**(gid: int, url: str) -> bool
Calls method `27` on the server.
**async def get_session_url**(gid: int) -> [RMCResponse](common.md)
Calls method `28` on the server. The RMC response has the following attributes:
result: bool
url: str
**async def get_state**(gid: int) -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
result: bool
state: int
**async def set_state**(gid: int, state: int) -> bool
Calls method `30` on the server.
**async def report_stats**(gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Calls method `31` on the server.
**async def get_stats**(gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Calls method `32` on the server. The RMC response has the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(gid: int) -> bool
Calls method `33` on the server.
**async def get_pending_deletions**(reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `34` on the server. The RMC response has the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(deletions: list[int]) -> bool
Calls method `35` on the server.
**async def migrate_gathering_ownership_v1**(gid: int, potential_owners: list[int]) -> bool
Calls method `36` on the server.
**async def find_by_description_like**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `37` on the server.
**async def register_local_url**(gid: int, url: [StationURL](common.md#stationurl)) -> None
Calls method `38` on the server.
**async def register_local_urls**(gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `39` on the server.
**async def update_session_host_v1**(gid: int) -> None
Calls method `40` on the server.
**async def get_session_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `41` on the server.
**async def update_session_host**(gid: int, is_migrate_owner: bool) -> None
Calls method `42` on the server.
**async def update_gathering_ownership**(gid: int, participants_only: bool) -> bool
Calls method `43` on the server.
**async def migrate_gathering_ownership**(gid: int, potential_owners: list[int], participants_only: bool) -> None
Calls method `44` on the server.
## MatchMakingClientExt
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClientExt`](#matchmakingclientext).
**async def end_participation**(gid: int, message: str) -> bool
Calls method `1` on the server.
**async def get_participants**(gid: int, only_active: bool) -> list[int]
Calls method `2` on the server.
**async def get_detailed_participants**(gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Calls method `3` on the server.
**async def get_participants_urls**(gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Calls method `4` on the server.
**async def get_gathering_relations**(id: int, descr: str) -> str
Calls method `5` on the server.
**async def delete_from_deletions**(deletions: list[int], pid: int) -> None
Calls method `6` on the server.
## MatchmakeExtensionClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeExtensionClient`](#matchmakeextensionclient).
**async def close_participation**(gid: int) -> None
Calls method `1` on the server.
**async def open_participation**(gid: int) -> None
Calls method `2` on the server.
**async def auto_matchmake_postpone**(gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `3` on the server.
**async def browse_matchmake_session**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `4` on the server.
**async def browse_matchmake_session_with_host_urls**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `5` on the server. The RMC response has the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(gid: int, message: str) -> bytes
Calls method `7` on the server.
**async def modify_current_game_attribute**(gid: int, attrib: int, value: int) -> None
Calls method `8` on the server.
**async def update_notification_data**(type: int, param1: int, param2: int, param3: str) -> None
Calls method `9` on the server.
**async def get_friend_notification_data**(type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `10` on the server.
**async def update_application_buffer**(gid: int, buffer: bytes) -> None
Calls method `11` on the server.
**async def update_matchmake_session_attribute**(gid: int, attribs: list[int]) -> None
Calls method `12` on the server.
**async def get_friend_notification_data_list**(types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `13` on the server.
**async def update_matchmake_session**(gathering: [Gathering](#gathering)) -> None
Calls method `14` on the server.
**async def auto_matchmake_with_search_criteria_postpone**(search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `15` on the server.
**async def get_playing_session**(pids: list[int]) -> list[[PlayingSession](#playingsession)]
Calls method `16` on the server.
**async def create_community**(community: [PersistentGathering](#persistentgathering), message: str) -> int
Calls method `17` on the server.
**async def update_community**(community: [PersistentGathering](#persistentgathering)) -> None
Calls method `18` on the server.
**async def join_community**(gid: int, message: str, password: str) -> None
Calls method `19` on the server.
**async def find_community_by_gathering_id**(gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Calls method `20` on the server.
**async def find_official_community**(available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `21` on the server.
**async def find_community_by_participant**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `22` on the server.
**async def update_privacy_setting**(online_status: bool, community_participation: bool) -> None
Calls method `23` on the server.
**async def get_my_block_list**() -> list[int]
Calls method `24` on the server.
**async def add_to_block_list**(pids: list[int]) -> None
Calls method `25` on the server.
**async def remove_from_block_list**(pids: list[int]) -> None
Calls method `26` on the server.
**async def clear_my_block_list**() -> None
Calls method `27` on the server.
**async def report_violation**(pid: int, username: str, violation_code: int) -> None
Calls method `28` on the server.
**async def is_violation_user**() -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Calls method `30` on the server.
**async def get_simple_playing_session**(pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Calls method `31` on the server.
**async def get_simple_community**(gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Calls method `32` on the server.
**async def auto_matchmake_with_gathering_id_postpone**(gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `33` on the server.
**async def update_progress_score**(gid: int, score: int) -> None
Calls method `34` on the server.
**async def debug_notify_event**(pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Calls method `35` on the server.
**async def generate_matchmake_session_system_password**(gid: int) -> str
Calls method `36` on the server.
**async def clear_matchmake_session_system_password**(gid: int) -> None
Calls method `37` on the server.
**async def create_matchmake_session_with_param**(param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `38` on the server.
**async def join_matchmake_session_with_param**(param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `39` on the server.
**async def auto_matchmake_with_param_postpone**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `40` on the server.
**async def find_matchmake_session_by_gathering_id_detail**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `41` on the server.
**async def browse_matchmake_session_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `42` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `43` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Calls method `44` on the server.
**async def request_matchmaking**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Calls method `45` on the server.
**async def withdraw_matchmaking**(request_id: int) -> None
Calls method `46` on the server.
**async def withdraw_matchmaking_all**() -> None
Calls method `47` on the server.
**async def find_matchmake_session_by_gathering_id**(gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `48` on the server.
**async def find_matchmake_session_by_single_gathering_id**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `49` on the server.
**async def find_matchmake_session_by_owner**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `50` on the server.
**async def find_matchmake_session_by_participant**(param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Calls method `51` on the server.
**async def browse_matchmake_session_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `52` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Calls method `53` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
## MatchmakeRefereeClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeRefereeClient`](#matchmakerefereeclient).
**async def start_round**(param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Calls method `1` on the server.
**async def get_start_round_param**(round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Calls method `2` on the server.
**async def end_round**(param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Calls method `3` on the server.
**async def end_round_with_partial_report**(param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Calls method `4` on the server.
**async def end_round_without_report**(round_id: int) -> None
Calls method `5` on the server.
**async def get_round_participants**(round_id: int) -> list[int]
Calls method `6` on the server.
**async def get_not_summarized_round**() -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Calls method `7` on the server.
**async def get_round**(round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Calls method `8` on the server.
**async def get_stats_primary**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `9` on the server.
**async def get_stats_primaries**(targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Calls method `10` on the server. The RMC response has the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Calls method `11` on the server.
**async def create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `12` on the server.
**async def get_or_create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `13` on the server.
**async def reset_stats**() -> None
Calls method `14` on the server.
## MatchMakingServer
**def _\_init__**()
Creates a new [`MatchMakingServer`](#matchmakingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def unregister_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `2`. This method should be overridden by a subclass.
**async def unregister_gatherings**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def update_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> bool
Handler for method `4`. This method should be overridden by a subclass.
**async def invite**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `5`. This method should be overridden by a subclass.
**async def accept_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `6`. This method should be overridden by a subclass.
**async def decline_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `7`. This method should be overridden by a subclass.
**async def cancel_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `8`. This method should be overridden by a subclass.
**async def get_invitations_sent**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[Invitation](#invitation)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_invitations_received**(client: [RMCClient](rmc.md#rmcclient)) -> list[[Invitation](#invitation)]
Handler for method `10`. This method should be overridden by a subclass.
**async def participate**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `11`. This method should be overridden by a subclass.
**async def cancel_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `12`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[int]
Handler for method `13`. This method should be overridden by a subclass.
**async def add_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `14`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `15`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `16`. This method should be overridden by a subclass.
**async def find_by_type**(client: [RMCClient](rmc.md#rmcclient), type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `17`. This method should be overridden by a subclass.
**async def find_by_description**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `18`. This method should be overridden by a subclass.
**async def find_by_description_regex**(client: [RMCClient](rmc.md#rmcclient), regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `19`. This method should be overridden by a subclass.
**async def find_by_id**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_by_single_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `21`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(client: [RMCClient](rmc.md#rmcclient), owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def find_by_participants**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `23`. This method should be overridden by a subclass.
**async def find_invitations**(client: [RMCClient](rmc.md#rmcclient), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `24`. This method should be overridden by a subclass.
**async def find_by_sql_query**(client: [RMCClient](rmc.md#rmcclient), query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `25`. This method should be overridden by a subclass.
**async def launch_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `26`. This method should be overridden by a subclass.
**async def update_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `27`. This method should be overridden by a subclass.
**async def get_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `28`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
url: str
**async def get_state**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
state: int
**async def set_state**(client: [RMCClient](rmc.md#rmcclient), gid: int, state: int) -> bool
Handler for method `30`. This method should be overridden by a subclass.
**async def report_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Handler for method `31`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Handler for method `32`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `33`. This method should be overridden by a subclass.
**async def get_pending_deletions**(client: [RMCClient](rmc.md#rmcclient), reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `34`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int]) -> bool
Handler for method `35`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int]) -> bool
Handler for method `36`. This method should be overridden by a subclass.
**async def find_by_description_like**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `37`. This method should be overridden by a subclass.
**async def register_local_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: [StationURL](common.md#stationurl)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def register_local_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `39`. This method should be overridden by a subclass.
**async def update_session_host_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `40`. This method should be overridden by a subclass.
**async def get_session_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `41`. This method should be overridden by a subclass.
**async def update_session_host**(client: [RMCClient](rmc.md#rmcclient), gid: int, is_migrate_owner: bool) -> None
Handler for method `42`. This method should be overridden by a subclass.
**async def update_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, participants_only: bool) -> bool
Handler for method `43`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int], participants_only: bool) -> None
Handler for method `44`. This method should be overridden by a subclass.
## MatchMakingServerExt
**def _\_init__**()
Creates a new [`MatchMakingServerExt`](#matchmakingserverext).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def end_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[int]
Handler for method `2`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `3`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Handler for method `4`. This method should be overridden by a subclass.
**async def get_gathering_relations**(client: [RMCClient](rmc.md#rmcclient), id: int, descr: str) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int], pid: int) -> None
Handler for method `6`. This method should be overridden by a subclass.
## MatchmakeExtensionServer
**def _\_init__**()
Creates a new [`MatchmakeExtensionServer`](#matchmakeextensionserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def close_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def open_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def auto_matchmake_postpone**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `3`. This method should be overridden by a subclass.
**async def browse_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `4`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `5`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bytes
Handler for method `7`. This method should be overridden by a subclass.
**async def modify_current_game_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attrib: int, value: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def update_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int, param1: int, param2: int, param3: str) -> None
Handler for method `9`. This method should be overridden by a subclass.
**async def get_friend_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `10`. This method should be overridden by a subclass.
**async def update_application_buffer**(client: [RMCClient](rmc.md#rmcclient), gid: int, buffer: bytes) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def update_matchmake_session_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attribs: list[int]) -> None
Handler for method `12`. This method should be overridden by a subclass.
**async def get_friend_notification_data_list**(client: [RMCClient](rmc.md#rmcclient), types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `13`. This method should be overridden by a subclass.
**async def update_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> None
Handler for method `14`. This method should be overridden by a subclass.
**async def auto_matchmake_with_search_criteria_postpone**(client: [RMCClient](rmc.md#rmcclient), search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[PlayingSession](#playingsession)]
Handler for method `16`. This method should be overridden by a subclass.
**async def create_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering), message: str) -> int
Handler for method `17`. This method should be overridden by a subclass.
**async def update_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering)) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def join_community**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str, password: str) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def find_community_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_official_community**(client: [RMCClient](rmc.md#rmcclient), available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `21`. This method should be overridden by a subclass.
**async def find_community_by_participant**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def update_privacy_setting**(client: [RMCClient](rmc.md#rmcclient), online_status: bool, community_participation: bool) -> None
Handler for method `23`. This method should be overridden by a subclass.
**async def get_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> list[int]
Handler for method `24`. This method should be overridden by a subclass.
**async def add_to_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `25`. This method should be overridden by a subclass.
**async def remove_from_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def clear_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `27`. This method should be overridden by a subclass.
**async def report_violation**(client: [RMCClient](rmc.md#rmcclient), pid: int, username: str, violation_code: int) -> None
Handler for method `28`. This method should be overridden by a subclass.
**async def is_violation_user**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(client: [RMCClient](rmc.md#rmcclient), gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Handler for method `30`. This method should be overridden by a subclass.
**async def get_simple_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Handler for method `31`. This method should be overridden by a subclass.
**async def get_simple_community**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Handler for method `32`. This method should be overridden by a subclass.
**async def auto_matchmake_with_gathering_id_postpone**(client: [RMCClient](rmc.md#rmcclient), gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `33`. This method should be overridden by a subclass.
**async def update_progress_score**(client: [RMCClient](rmc.md#rmcclient), gid: int, score: int) -> None
Handler for method `34`. This method should be overridden by a subclass.
**async def debug_notify_event**(client: [RMCClient](rmc.md#rmcclient), pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Handler for method `35`. This method should be overridden by a subclass.
**async def generate_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> str
Handler for method `36`. This method should be overridden by a subclass.
**async def clear_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def create_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `38`. This method should be overridden by a subclass.
**async def join_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `39`. This method should be overridden by a subclass.
**async def auto_matchmake_with_param_postpone**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `40`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id_detail**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `41`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `42`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `43`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(client: [RMCClient](rmc.md#rmcclient), param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Handler for method `44`. This method should be overridden by a subclass.
**async def request_matchmaking**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Handler for method `45`. This method should be overridden by a subclass.
**async def withdraw_matchmaking**(client: [RMCClient](rmc.md#rmcclient), request_id: int) -> None
Handler for method `46`. This method should be overridden by a subclass.
**async def withdraw_matchmaking_all**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `47`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `48`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_single_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `49`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_owner**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `50`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_participant**(client: [RMCClient](rmc.md#rmcclient), param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Handler for method `51`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `52`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Handler for method `53`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
## MatchmakeRefereeServer
**def _\_init__**()
Creates a new [`MatchmakeRefereeServer`](#matchmakerefereeserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def start_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def get_start_round_param**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Handler for method `2`. This method should be overridden by a subclass.
**async def end_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def end_round_with_partial_report**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def end_round_without_report**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def get_round_participants**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> list[int]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_not_summarized_round**(client: [RMCClient](rmc.md#rmcclient)) -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_round**(client: [RMCClient](rmc.md#rmcclient), round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_stats_primary**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `9`. This method should be overridden by a subclass.
**async def get_stats_primaries**(client: [RMCClient](rmc.md#rmcclient), targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Handler for method `10`. This method should be overridden by a subclass. The RMC response must have the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Handler for method `11`. This method should be overridden by a subclass.
**async def create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_or_create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `13`. This method should be overridden by a subclass.
**async def reset_stats**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `14`. This method should be overridden by a subclass.
## MatchmakeSystem
This class defines the following constants:
`GLOBAL = 1`
`FRIENDS = 2`
## AutoMatchmakeParam
**def _\_init__**()
Creates a new `AutoMatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)]
target_gids: list[int]
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## CreateMatchmakeSessionParam
**def _\_init__**()
Creates a new `CreateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
additional_participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
## DeletionEntry
**def _\_init__**()
Creates a new `DeletionEntry` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
pid: int
reason: int
## FindMatchmakeSessionByParticipantParam
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pids: list[int]
options: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## FindMatchmakeSessionByParticipantResult
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
## Gathering
**def _\_init__**()
Creates a new `Gathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int = 0
owner: int = 0
host: int = 0
min_participants: int = 0
max_participants: int = 0
participation_policy: int = 1
policy_argument: int = 0
flags: int = 512
state: int = 0
description: str = ""
## GatheringStats
**def _\_init__**()
Creates a new `GatheringStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
flags: int
values: list[float]
## GatheringURLs
**def _\_init__**()
Creates a new `GatheringURLs` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
urls: list[[StationURL](common.md#stationurl)]
## Invitation
**def _\_init__**()
Creates a new `Invitation` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
guest: int
message: str
## JoinMatchmakeSessionParam
**def _\_init__**()
Creates a new `JoinMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
participants: list[int]
gid_for_participation_check: int
options: int
behavior: int
user_password: str
system_password: str
join_message: str
num_participants: int
extra_participants: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## MatchmakeBlockListParam
**def _\_init__**()
Creates a new `MatchmakeBlockListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
options: int = 0
## MatchmakeParam
**def _\_init__**()
Creates a new `MatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
param: dict[str, object] = {}
## MatchmakeRefereeEndRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeEndRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
round_id: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereePersonalRoundResult
**def _\_init__**()
Creates a new `MatchmakeRefereePersonalRoundResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
personal_round_result_flag: int
round_win_loss: int
rating_value_change: int
buffer: bytes
report_summary_mode: int
event_id: int
## MatchmakeRefereeRound
**def _\_init__**()
Creates a new `MatchmakeRefereeRound` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
gid: int
state: int
personal_data_category: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereeStartRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStartRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
personal_data_category: int
gid: int
pids: list[int]
report_summary_mode: int
event_id: int
## MatchmakeRefereeStats
**def _\_init__**()
Creates a new `MatchmakeRefereeStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int
category: int
pid: int
recent_disconnection: int
recent_violation: int
recent_mismatch: int
recent_win: int
recent_loss: int
recent_draw: int
total_disconnect: int
total_violation: int
total_mismatch: int
total_win: int
total_loss: int
total_draw: int
rating_value: int
## MatchmakeRefereeStatsInitParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
initial_rating: int
## MatchmakeRefereeStatsTarget
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
category: int
## MatchmakeSession
**def _\_init__**()
Creates a new `MatchmakeSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
game_mode: int = 0
attribs: list[int] = [0, 0, 0, 0, 0, 0]
open_participation: bool = True
matchmake_system: int = 0
application_data: bytes = b""
num_participants: int = 0
If 30000 <= `nex.version` < 40000:
If `nex.version` >= 30500:
progress_score: int = 100
If `nex.version` >= 30000:
session_key: bytes = b""
If `nex.version` >= 30500:
option: int = 0
If `nex.version` >= 30600:
If `revision` >= 1:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
If `nex.version` >= 30700:
If `revision` >= 2:
user_password: str = ""
If `nex.version` >= 30800:
If `revision` >= 3:
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
If `nex.version` >= 40000:
progress_score: int = 100
session_key: bytes = b""
option: int = 0
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
user_password: str = ""
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
codeword: str = ""
## MatchmakeSessionSearchCriteria
**def _\_init__**()
Creates a new `MatchmakeSessionSearchCriteria` instance. Required fields must be filled in manually.
The following fields are defined in this class:
attribs: list[str] = ["", "", "", "", "", ""]
game_mode: str = ""
min_participants: str = ""
max_participants: str = ""
matchmake_system: str = ""
vacant_only: bool = True
exclude_locked: bool = True
exclude_non_host_pid: bool = False
selection_method: int = 0
If `nex.version` >= 30500:
vacant_participants: int = 1
If `nex.version` >= 40000:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
exclude_user_password: bool = False
exclude_system_password: bool = False
refer_gid: int = 0
codeword: str = ""
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## ParticipantDetails
**def _\_init__**()
Creates a new `ParticipantDetails` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
message: str
participants: int
## PersistentGathering
**def _\_init__**()
Creates a new `PersistentGathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
password: str
attribs: list[int]
application_buffer: bytes
participation_start: [DateTime](common.md#datetime)
participation_end: [DateTime](common.md#datetime)
matchmake_session_count: int
num_participants: int
## PlayingSession
**def _\_init__**()
Creates a new `PlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gathering: [Gathering](#gathering)
## SimpleCommunity
**def _\_init__**()
Creates a new `SimpleCommunity` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
matchmake_session_count: int
## SimplePlayingSession
**def _\_init__**()
Creates a new `SimplePlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gid: int
game_mode: int
attribute: int
## UpdateMatchmakeSessionParam
**def _\_init__**()
Creates a new `UpdateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
modification_flags: int
attributes: list[int]
open_participation: bool
application_buffer: bytes
progress_score: int
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime)
user_password: str
game_mode: int
description: str
min_participants: int
max_participants: int
matchmake_system: int
participation_policy: int
policy_argument: int
codeword: str
================================================
FILE: docs/reference/nex/matchmaking_mhxx.md
================================================
# Module: nintendo.nex.matchmaking_mhxx
Provides a client and server for the `MatchMakingProtocol`, `MatchMakingProtocolExt`, `MatchmakeRefereeProtocol` and `MatchmakeExtensionProtocolMHXX`. This page was generated automatically from `matchmaking_mhxx.proto`.
**class** [MatchMakingClient](#matchmakingclient)
The client for the `MatchMakingProtocol`.
**class** [MatchMakingClientExt](#matchmakingclientext)
The client for the `MatchMakingProtocolExt`.
**class** [MatchmakeRefereeClient](#matchmakerefereeclient)
The client for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeExtensionClientMHXX](#matchmakeextensionclientmhxx)
The client for the `MatchmakeExtensionProtocolMHXX`.
**class** [MatchMakingServer](#matchmakingserver)
The server for the `MatchMakingProtocol`.
**class** [MatchMakingServerExt](#matchmakingserverext)
The server for the `MatchMakingProtocolExt`.
**class** [MatchmakeRefereeServer](#matchmakerefereeserver)
The server for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeExtensionServerMHXX](#matchmakeextensionservermhxx)
The server for the `MatchmakeExtensionProtocolMHXX`.
**class** [MatchmakeSystem](#matchmakesystem)
**class** [AutoMatchmakeParam](#automatchmakeparam)([Structure](common.md))
**class** [CreateMatchmakeSessionParam](#creatematchmakesessionparam)([Structure](common.md))
**class** [DeletionEntry](#deletionentry)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)([Structure](common.md))
**class** [FriendUserInfo](#frienduserinfo)([Structure](common.md))
**class** [FriendUserParam](#frienduserparam)([Structure](common.md))
**class** [Gathering](#gathering)([Structure](common.md))
**class** [GatheringStats](#gatheringstats)([Structure](common.md))
**class** [GatheringURLs](#gatheringurls)([Structure](common.md))
**class** [Invitation](#invitation)([Structure](common.md))
**class** [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)([Structure](common.md))
**class** [MatchmakeBlockListParam](#matchmakeblocklistparam)([Structure](common.md))
**class** [MatchmakeParam](#matchmakeparam)([Structure](common.md))
**class** [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)([Structure](common.md))
**class** [MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)([Structure](common.md))
**class** [MatchmakeRefereeRound](#matchmakerefereeround)([Structure](common.md))
**class** [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)([Structure](common.md))
**class** [MatchmakeRefereeStats](#matchmakerefereestats)([Structure](common.md))
**class** [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)([Structure](common.md))
**class** [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)([Structure](common.md))
**class** [MatchmakeSession](#matchmakesession)([Gathering](#gathering))
**class** [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)([Structure](common.md))
**class** [ParticipantDetails](#participantdetails)([Structure](common.md))
**class** [PersistentGathering](#persistentgathering)([Gathering](#gathering))
**class** [PlayingSession](#playingsession)([Structure](common.md))
**class** [SimpleCommunity](#simplecommunity)([Structure](common.md))
**class** [SimplePlayingSession](#simpleplayingsession)([Structure](common.md))
**class** [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)([Structure](common.md))
## MatchMakingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClient`](#matchmakingclient).
**async def register_gathering**(gathering: [Gathering](#gathering)) -> int
Calls method `1` on the server.
**async def unregister_gathering**(gid: int) -> bool
Calls method `2` on the server.
**async def unregister_gatherings**(gids: list[int]) -> bool
Calls method `3` on the server.
**async def update_gathering**(gathering: [Gathering](#gathering)) -> bool
Calls method `4` on the server.
**async def invite**(gid: int, pids: list[int], message: str) -> bool
Calls method `5` on the server.
**async def accept_invitation**(gid: int, message: str) -> bool
Calls method `6` on the server.
**async def decline_invitation**(gid: int, message: str) -> bool
Calls method `7` on the server.
**async def cancel_invitation**(gid: int, pids: list[int], message: str) -> bool
Calls method `8` on the server.
**async def get_invitations_sent**(gid: int) -> list[[Invitation](#invitation)]
Calls method `9` on the server.
**async def get_invitations_received**() -> list[[Invitation](#invitation)]
Calls method `10` on the server.
**async def participate**(gid: int, message: str) -> bool
Calls method `11` on the server.
**async def cancel_participation**(gid: int, message: str) -> bool
Calls method `12` on the server.
**async def get_participants**(gid: int) -> list[int]
Calls method `13` on the server.
**async def add_participants**(gid: int, pids: list[int], message: str) -> bool
Calls method `14` on the server.
**async def get_detailed_participants**(gid: int) -> list[[ParticipantDetails](#participantdetails)]
Calls method `15` on the server.
**async def get_participants_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `16` on the server.
**async def find_by_type**(type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `17` on the server.
**async def find_by_description**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `18` on the server.
**async def find_by_description_regex**(regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `19` on the server.
**async def find_by_id**(ids: list[int]) -> list[[Gathering](#gathering)]
Calls method `20` on the server.
**async def find_by_single_id**(gid: int) -> [RMCResponse](common.md)
Calls method `21` on the server. The RMC response has the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `22` on the server.
**async def find_by_participants**(pids: list[int]) -> list[[Gathering](#gathering)]
Calls method `23` on the server.
**async def find_invitations**(range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `24` on the server.
**async def find_by_sql_query**(query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `25` on the server.
**async def launch_session**(gid: int, url: str) -> bool
Calls method `26` on the server.
**async def update_session_url**(gid: int, url: str) -> bool
Calls method `27` on the server.
**async def get_session_url**(gid: int) -> [RMCResponse](common.md)
Calls method `28` on the server. The RMC response has the following attributes:
result: bool
url: str
**async def get_state**(gid: int) -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
result: bool
state: int
**async def set_state**(gid: int, state: int) -> bool
Calls method `30` on the server.
**async def report_stats**(gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Calls method `31` on the server.
**async def get_stats**(gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Calls method `32` on the server. The RMC response has the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(gid: int) -> bool
Calls method `33` on the server.
**async def get_pending_deletions**(reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `34` on the server. The RMC response has the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(deletions: list[int]) -> bool
Calls method `35` on the server.
**async def migrate_gathering_ownership_v1**(gid: int, potential_owners: list[int]) -> bool
Calls method `36` on the server.
**async def find_by_description_like**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `37` on the server.
**async def register_local_url**(gid: int, url: [StationURL](common.md#stationurl)) -> None
Calls method `38` on the server.
**async def register_local_urls**(gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `39` on the server.
**async def update_session_host_v1**(gid: int) -> None
Calls method `40` on the server.
**async def get_session_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `41` on the server.
**async def update_session_host**(gid: int, is_migrate_owner: bool) -> None
Calls method `42` on the server.
**async def update_gathering_ownership**(gid: int, participants_only: bool) -> bool
Calls method `43` on the server.
**async def migrate_gathering_ownership**(gid: int, potential_owners: list[int], participants_only: bool) -> None
Calls method `44` on the server.
## MatchMakingClientExt
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClientExt`](#matchmakingclientext).
**async def end_participation**(gid: int, message: str) -> bool
Calls method `1` on the server.
**async def get_participants**(gid: int, only_active: bool) -> list[int]
Calls method `2` on the server.
**async def get_detailed_participants**(gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Calls method `3` on the server.
**async def get_participants_urls**(gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Calls method `4` on the server.
**async def get_gathering_relations**(id: int, descr: str) -> str
Calls method `5` on the server.
**async def delete_from_deletions**(deletions: list[int], pid: int) -> None
Calls method `6` on the server.
## MatchmakeRefereeClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeRefereeClient`](#matchmakerefereeclient).
**async def start_round**(param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Calls method `1` on the server.
**async def get_start_round_param**(round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Calls method `2` on the server.
**async def end_round**(param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Calls method `3` on the server.
**async def end_round_without_report**(round_id: int) -> None
Calls method `4` on the server.
**async def get_round_participants**(round_id: int) -> list[int]
Calls method `5` on the server.
**async def get_not_summarized_round**() -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Calls method `6` on the server.
**async def get_round**(round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Calls method `7` on the server.
**async def get_stats_primary**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `8` on the server.
**async def get_stats_primaries**(targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Calls method `10` on the server.
**async def create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `11` on the server.
**async def get_or_create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `12` on the server.
**async def reset_stats**() -> None
Calls method `13` on the server.
## MatchmakeExtensionClientMHXX
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeExtensionClientMHXX`](#matchmakeextensionclientmhxx).
**async def close_participation**(gid: int) -> None
Calls method `1` on the server.
**async def open_participation**(gid: int) -> None
Calls method `2` on the server.
**async def auto_matchmake_postpone**(gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `3` on the server.
**async def browse_matchmake_session**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `4` on the server.
**async def browse_matchmake_session_with_host_urls**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `5` on the server. The RMC response has the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(gid: int, message: str) -> bytes
Calls method `7` on the server.
**async def modify_current_game_attribute**(gid: int, attrib: int, value: int) -> None
Calls method `8` on the server.
**async def update_notification_data**(type: int, param1: int, param2: int, param3: str) -> None
Calls method `9` on the server.
**async def get_friend_notification_data**(type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `10` on the server.
**async def update_application_buffer**(gid: int, buffer: bytes) -> None
Calls method `11` on the server.
**async def update_matchmake_session_attribute**(gid: int, attribs: list[int]) -> None
Calls method `12` on the server.
**async def get_friend_notification_data_list**(types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `13` on the server.
**async def update_matchmake_session**(gathering: [Gathering](#gathering)) -> None
Calls method `14` on the server.
**async def auto_matchmake_with_search_criteria_postpone**(search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `15` on the server.
**async def get_playing_session**(pids: list[int]) -> list[[PlayingSession](#playingsession)]
Calls method `16` on the server.
**async def create_community**(community: [PersistentGathering](#persistentgathering), message: str) -> int
Calls method `17` on the server.
**async def update_community**(community: [PersistentGathering](#persistentgathering)) -> None
Calls method `18` on the server.
**async def join_community**(gid: int, message: str, password: str) -> None
Calls method `19` on the server.
**async def find_community_by_gathering_id**(gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Calls method `20` on the server.
**async def find_official_community**(available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `21` on the server.
**async def find_community_by_participant**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `22` on the server.
**async def update_privacy_setting**(online_status: bool, community_participation: bool) -> None
Calls method `23` on the server.
**async def get_my_block_list**() -> list[int]
Calls method `24` on the server.
**async def add_to_block_list**(pids: list[int]) -> None
Calls method `25` on the server.
**async def remove_from_block_list**(pids: list[int]) -> None
Calls method `26` on the server.
**async def clear_my_block_list**() -> None
Calls method `27` on the server.
**async def report_violation**(pid: int, username: str, violation_code: int) -> None
Calls method `28` on the server.
**async def is_violation_user**() -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Calls method `30` on the server.
**async def get_simple_playing_session**(pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Calls method `31` on the server.
**async def get_simple_community**(gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Calls method `32` on the server.
**async def auto_matchmake_with_gathering_id_postpone**(gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `33` on the server.
**async def update_progress_score**(gid: int, score: int) -> None
Calls method `34` on the server.
**async def debug_notify_event**(pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Calls method `35` on the server.
**async def generate_matchmake_session_system_password**(gid: int) -> str
Calls method `36` on the server.
**async def clear_matchmake_session_system_password**(gid: int) -> None
Calls method `37` on the server.
**async def create_matchmake_session_with_param**(param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `38` on the server.
**async def join_matchmake_session_with_param**(param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `39` on the server.
**async def auto_matchmake_with_param_postpone**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `40` on the server.
**async def find_matchmake_session_by_gathering_id_detail**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `41` on the server.
**async def browse_matchmake_session_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `42` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `43` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Calls method `44` on the server.
**async def request_matchmaking**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Calls method `45` on the server.
**async def withdraw_matchmaking**(request_id: int) -> None
Calls method `46` on the server.
**async def withdraw_matchmaking_all**() -> None
Calls method `47` on the server.
**async def find_matchmake_session_by_gathering_id**(gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `48` on the server.
**async def find_matchmake_session_by_single_gathering_id**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `49` on the server.
**async def find_matchmake_session_by_owner**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `50` on the server.
**async def find_matchmake_session_by_participant**(param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Calls method `51` on the server.
**async def browse_matchmake_session_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `52` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Calls method `53` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_friend_user_profile**(param: [FriendUserParam](#frienduserparam)) -> None
Calls method `54` on the server.
**async def get_friend_user_profiles**(pids: list[int]) -> list[[FriendUserInfo](#frienduserinfo)]
Calls method `55` on the server.
**async def get_friends**() -> list[[FriendUserInfo](#frienduserinfo)]
Calls method `56` on the server.
**async def add_friends**(pids: list[int]) -> None
Calls method `57` on the server.
**async def remove_friend**(pid: int) -> None
Calls method `58` on the server.
**async def find_community_by_owner**(id: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `59` on the server.
## MatchMakingServer
**def _\_init__**()
Creates a new [`MatchMakingServer`](#matchmakingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def unregister_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `2`. This method should be overridden by a subclass.
**async def unregister_gatherings**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def update_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> bool
Handler for method `4`. This method should be overridden by a subclass.
**async def invite**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `5`. This method should be overridden by a subclass.
**async def accept_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `6`. This method should be overridden by a subclass.
**async def decline_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `7`. This method should be overridden by a subclass.
**async def cancel_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `8`. This method should be overridden by a subclass.
**async def get_invitations_sent**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[Invitation](#invitation)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_invitations_received**(client: [RMCClient](rmc.md#rmcclient)) -> list[[Invitation](#invitation)]
Handler for method `10`. This method should be overridden by a subclass.
**async def participate**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `11`. This method should be overridden by a subclass.
**async def cancel_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `12`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[int]
Handler for method `13`. This method should be overridden by a subclass.
**async def add_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `14`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `15`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `16`. This method should be overridden by a subclass.
**async def find_by_type**(client: [RMCClient](rmc.md#rmcclient), type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `17`. This method should be overridden by a subclass.
**async def find_by_description**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `18`. This method should be overridden by a subclass.
**async def find_by_description_regex**(client: [RMCClient](rmc.md#rmcclient), regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `19`. This method should be overridden by a subclass.
**async def find_by_id**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_by_single_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `21`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(client: [RMCClient](rmc.md#rmcclient), owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def find_by_participants**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `23`. This method should be overridden by a subclass.
**async def find_invitations**(client: [RMCClient](rmc.md#rmcclient), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `24`. This method should be overridden by a subclass.
**async def find_by_sql_query**(client: [RMCClient](rmc.md#rmcclient), query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `25`. This method should be overridden by a subclass.
**async def launch_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `26`. This method should be overridden by a subclass.
**async def update_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `27`. This method should be overridden by a subclass.
**async def get_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `28`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
url: str
**async def get_state**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
state: int
**async def set_state**(client: [RMCClient](rmc.md#rmcclient), gid: int, state: int) -> bool
Handler for method `30`. This method should be overridden by a subclass.
**async def report_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Handler for method `31`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Handler for method `32`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `33`. This method should be overridden by a subclass.
**async def get_pending_deletions**(client: [RMCClient](rmc.md#rmcclient), reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `34`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int]) -> bool
Handler for method `35`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int]) -> bool
Handler for method `36`. This method should be overridden by a subclass.
**async def find_by_description_like**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `37`. This method should be overridden by a subclass.
**async def register_local_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: [StationURL](common.md#stationurl)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def register_local_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `39`. This method should be overridden by a subclass.
**async def update_session_host_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `40`. This method should be overridden by a subclass.
**async def get_session_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `41`. This method should be overridden by a subclass.
**async def update_session_host**(client: [RMCClient](rmc.md#rmcclient), gid: int, is_migrate_owner: bool) -> None
Handler for method `42`. This method should be overridden by a subclass.
**async def update_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, participants_only: bool) -> bool
Handler for method `43`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int], participants_only: bool) -> None
Handler for method `44`. This method should be overridden by a subclass.
## MatchMakingServerExt
**def _\_init__**()
Creates a new [`MatchMakingServerExt`](#matchmakingserverext).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def end_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[int]
Handler for method `2`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `3`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Handler for method `4`. This method should be overridden by a subclass.
**async def get_gathering_relations**(client: [RMCClient](rmc.md#rmcclient), id: int, descr: str) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int], pid: int) -> None
Handler for method `6`. This method should be overridden by a subclass.
## MatchmakeRefereeServer
**def _\_init__**()
Creates a new [`MatchmakeRefereeServer`](#matchmakerefereeserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def start_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def get_start_round_param**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Handler for method `2`. This method should be overridden by a subclass.
**async def end_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def end_round_without_report**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_round_participants**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> list[int]
Handler for method `5`. This method should be overridden by a subclass.
**async def get_not_summarized_round**(client: [RMCClient](rmc.md#rmcclient)) -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_round**(client: [RMCClient](rmc.md#rmcclient), round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Handler for method `7`. This method should be overridden by a subclass.
**async def get_stats_primary**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_stats_primaries**(client: [RMCClient](rmc.md#rmcclient), targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Handler for method `10`. This method should be overridden by a subclass.
**async def create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_or_create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `12`. This method should be overridden by a subclass.
**async def reset_stats**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `13`. This method should be overridden by a subclass.
## MatchmakeExtensionServerMHXX
**def _\_init__**()
Creates a new [`MatchmakeExtensionServerMHXX`](#matchmakeextensionservermhxx).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def close_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def open_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def auto_matchmake_postpone**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `3`. This method should be overridden by a subclass.
**async def browse_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `4`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `5`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bytes
Handler for method `7`. This method should be overridden by a subclass.
**async def modify_current_game_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attrib: int, value: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def update_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int, param1: int, param2: int, param3: str) -> None
Handler for method `9`. This method should be overridden by a subclass.
**async def get_friend_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `10`. This method should be overridden by a subclass.
**async def update_application_buffer**(client: [RMCClient](rmc.md#rmcclient), gid: int, buffer: bytes) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def update_matchmake_session_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attribs: list[int]) -> None
Handler for method `12`. This method should be overridden by a subclass.
**async def get_friend_notification_data_list**(client: [RMCClient](rmc.md#rmcclient), types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `13`. This method should be overridden by a subclass.
**async def update_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> None
Handler for method `14`. This method should be overridden by a subclass.
**async def auto_matchmake_with_search_criteria_postpone**(client: [RMCClient](rmc.md#rmcclient), search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[PlayingSession](#playingsession)]
Handler for method `16`. This method should be overridden by a subclass.
**async def create_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering), message: str) -> int
Handler for method `17`. This method should be overridden by a subclass.
**async def update_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering)) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def join_community**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str, password: str) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def find_community_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_official_community**(client: [RMCClient](rmc.md#rmcclient), available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `21`. This method should be overridden by a subclass.
**async def find_community_by_participant**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def update_privacy_setting**(client: [RMCClient](rmc.md#rmcclient), online_status: bool, community_participation: bool) -> None
Handler for method `23`. This method should be overridden by a subclass.
**async def get_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> list[int]
Handler for method `24`. This method should be overridden by a subclass.
**async def add_to_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `25`. This method should be overridden by a subclass.
**async def remove_from_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def clear_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `27`. This method should be overridden by a subclass.
**async def report_violation**(client: [RMCClient](rmc.md#rmcclient), pid: int, username: str, violation_code: int) -> None
Handler for method `28`. This method should be overridden by a subclass.
**async def is_violation_user**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(client: [RMCClient](rmc.md#rmcclient), gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Handler for method `30`. This method should be overridden by a subclass.
**async def get_simple_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Handler for method `31`. This method should be overridden by a subclass.
**async def get_simple_community**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Handler for method `32`. This method should be overridden by a subclass.
**async def auto_matchmake_with_gathering_id_postpone**(client: [RMCClient](rmc.md#rmcclient), gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `33`. This method should be overridden by a subclass.
**async def update_progress_score**(client: [RMCClient](rmc.md#rmcclient), gid: int, score: int) -> None
Handler for method `34`. This method should be overridden by a subclass.
**async def debug_notify_event**(client: [RMCClient](rmc.md#rmcclient), pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Handler for method `35`. This method should be overridden by a subclass.
**async def generate_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> str
Handler for method `36`. This method should be overridden by a subclass.
**async def clear_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def create_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `38`. This method should be overridden by a subclass.
**async def join_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `39`. This method should be overridden by a subclass.
**async def auto_matchmake_with_param_postpone**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `40`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id_detail**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `41`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `42`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `43`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(client: [RMCClient](rmc.md#rmcclient), param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Handler for method `44`. This method should be overridden by a subclass.
**async def request_matchmaking**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Handler for method `45`. This method should be overridden by a subclass.
**async def withdraw_matchmaking**(client: [RMCClient](rmc.md#rmcclient), request_id: int) -> None
Handler for method `46`. This method should be overridden by a subclass.
**async def withdraw_matchmaking_all**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `47`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `48`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_single_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `49`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_owner**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `50`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_participant**(client: [RMCClient](rmc.md#rmcclient), param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Handler for method `51`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `52`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Handler for method `53`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_friend_user_profile**(client: [RMCClient](rmc.md#rmcclient), param: [FriendUserParam](#frienduserparam)) -> None
Handler for method `54`. This method should be overridden by a subclass.
**async def get_friend_user_profiles**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[FriendUserInfo](#frienduserinfo)]
Handler for method `55`. This method should be overridden by a subclass.
**async def get_friends**(client: [RMCClient](rmc.md#rmcclient)) -> list[[FriendUserInfo](#frienduserinfo)]
Handler for method `56`. This method should be overridden by a subclass.
**async def add_friends**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `57`. This method should be overridden by a subclass.
**async def remove_friend**(client: [RMCClient](rmc.md#rmcclient), pid: int) -> None
Handler for method `58`. This method should be overridden by a subclass.
**async def find_community_by_owner**(client: [RMCClient](rmc.md#rmcclient), id: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `59`. This method should be overridden by a subclass.
## MatchmakeSystem
This class defines the following constants:
`GLOBAL = 1`
`FRIENDS = 2`
## AutoMatchmakeParam
**def _\_init__**()
Creates a new `AutoMatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)]
target_gids: list[int]
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## CreateMatchmakeSessionParam
**def _\_init__**()
Creates a new `CreateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
additional_participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
## DeletionEntry
**def _\_init__**()
Creates a new `DeletionEntry` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
pid: int
reason: int
## FindMatchmakeSessionByParticipantParam
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pids: list[int]
options: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## FindMatchmakeSessionByParticipantResult
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
## FriendUserInfo
**def _\_init__**()
Creates a new `FriendUserInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
presence: int
## FriendUserParam
**def _\_init__**()
Creates a new `FriendUserParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
name: str
## Gathering
**def _\_init__**()
Creates a new `Gathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int = 0
owner: int = 0
host: int = 0
min_participants: int = 0
max_participants: int = 0
participation_policy: int = 1
policy_argument: int = 0
flags: int = 512
state: int = 0
description: str = ""
## GatheringStats
**def _\_init__**()
Creates a new `GatheringStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
flags: int
values: list[float]
## GatheringURLs
**def _\_init__**()
Creates a new `GatheringURLs` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
urls: list[[StationURL](common.md#stationurl)]
## Invitation
**def _\_init__**()
Creates a new `Invitation` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
guest: int
message: str
## JoinMatchmakeSessionParam
**def _\_init__**()
Creates a new `JoinMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
participants: list[int]
gid_for_participation_check: int
options: int
behavior: int
user_password: str
system_password: str
join_message: str
num_participants: int
extra_participants: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## MatchmakeBlockListParam
**def _\_init__**()
Creates a new `MatchmakeBlockListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
options: int = 0
## MatchmakeParam
**def _\_init__**()
Creates a new `MatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
param: dict[str, object] = {}
## MatchmakeRefereeEndRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeEndRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
round_id: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereePersonalRoundResult
**def _\_init__**()
Creates a new `MatchmakeRefereePersonalRoundResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
personal_round_result_flag: int
round_win_loss: int
rating_change: int
buffer: bytes
## MatchmakeRefereeRound
**def _\_init__**()
Creates a new `MatchmakeRefereeRound` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
gid: int
state: int
personal_data_category: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereeStartRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStartRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
personal_data_category: int
gid: int
pids: list[int]
## MatchmakeRefereeStats
**def _\_init__**()
Creates a new `MatchmakeRefereeStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int
category: int
pid: int
recent_disconnection: int
recent_violation: int
recent_mismatch: int
recent_win: int
recent_loss: int
recent_draw: int
total_disconnect: int
total_violation: int
total_mismatch: int
total_win: int
total_loss: int
total_draw: int
rating_value: int
## MatchmakeRefereeStatsInitParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
initial_rating: int
## MatchmakeRefereeStatsTarget
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
category: int
## MatchmakeSession
**def _\_init__**()
Creates a new `MatchmakeSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
game_mode: int = 0
attribs: list[int] = [0, 0, 0, 0, 0, 0]
open_participation: bool = True
matchmake_system: int = 0
application_data: bytes = b""
num_participants: int = 0
If 30000 <= `nex.version` < 40000:
If `nex.version` >= 30500:
progress_score: int = 100
If `nex.version` >= 30000:
session_key: bytes = b""
If `nex.version` >= 30500:
option: int = 0
If `nex.version` >= 30600:
If `revision` >= 1:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
If `nex.version` >= 30700:
If `revision` >= 2:
user_password: str = ""
If `nex.version` >= 30800:
If `revision` >= 3:
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
If `nex.version` >= 40000:
progress_score: int = 100
session_key: bytes = b""
option: int = 0
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
user_password: str = ""
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
codeword: str = ""
## MatchmakeSessionSearchCriteria
**def _\_init__**()
Creates a new `MatchmakeSessionSearchCriteria` instance. Required fields must be filled in manually.
The following fields are defined in this class:
attribs: list[str] = ["", "", "", "", "", ""]
game_mode: str = ""
min_participants: str = ""
max_participants: str = ""
matchmake_system: str = ""
vacant_only: bool = True
exclude_locked: bool = True
exclude_non_host_pid: bool = False
selection_method: int = 0
If `nex.version` >= 30500:
vacant_participants: int = 1
If `nex.version` >= 40000:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
exclude_user_password: bool = False
exclude_system_password: bool = False
refer_gid: int = 0
codeword: str = ""
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## ParticipantDetails
**def _\_init__**()
Creates a new `ParticipantDetails` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
message: str
participants: int
## PersistentGathering
**def _\_init__**()
Creates a new `PersistentGathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
password: str
attribs: list[int]
application_buffer: bytes
participation_start: [DateTime](common.md#datetime)
participation_end: [DateTime](common.md#datetime)
matchmake_session_count: int
num_participants: int
## PlayingSession
**def _\_init__**()
Creates a new `PlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gathering: [Gathering](#gathering)
## SimpleCommunity
**def _\_init__**()
Creates a new `SimpleCommunity` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
matchmake_session_count: int
## SimplePlayingSession
**def _\_init__**()
Creates a new `SimplePlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gid: int
game_mode: int
attribute: int
## UpdateMatchmakeSessionParam
**def _\_init__**()
Creates a new `UpdateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
modification_flags: int
attributes: list[int]
open_participation: bool
application_buffer: bytes
progress_score: int
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime)
user_password: str
game_mode: int
description: str
min_participants: int
max_participants: int
matchmake_system: int
participation_policy: int
policy_argument: int
codeword: str
================================================
FILE: docs/reference/nex/matchmaking_mk8.md
================================================
# Module: nintendo.nex.matchmaking_mk8
Provides a client and server for the `MatchMakingProtocol`, `MatchMakingProtocolExt`, `MatchmakeRefereeProtocol` and `MatchmakeExtensionProtocolMK8`. This page was generated automatically from `matchmaking_mk8.proto`.
**class** [MatchMakingClient](#matchmakingclient)
The client for the `MatchMakingProtocol`.
**class** [MatchMakingClientExt](#matchmakingclientext)
The client for the `MatchMakingProtocolExt`.
**class** [MatchmakeRefereeClient](#matchmakerefereeclient)
The client for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeExtensionClientMK8](#matchmakeextensionclientmk8)
The client for the `MatchmakeExtensionProtocolMK8`.
**class** [MatchMakingServer](#matchmakingserver)
The server for the `MatchMakingProtocol`.
**class** [MatchMakingServerExt](#matchmakingserverext)
The server for the `MatchMakingProtocolExt`.
**class** [MatchmakeRefereeServer](#matchmakerefereeserver)
The server for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeExtensionServerMK8](#matchmakeextensionservermk8)
The server for the `MatchmakeExtensionProtocolMK8`.
**class** [MatchmakeSystem](#matchmakesystem)
**class** [AutoMatchmakeParam](#automatchmakeparam)([Structure](common.md))
**class** [CreateMatchmakeSessionParam](#creatematchmakesessionparam)([Structure](common.md))
**class** [DeletionEntry](#deletionentry)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)([Structure](common.md))
**class** [Gathering](#gathering)([Structure](common.md))
**class** [GatheringStats](#gatheringstats)([Structure](common.md))
**class** [GatheringURLs](#gatheringurls)([Structure](common.md))
**class** [Invitation](#invitation)([Structure](common.md))
**class** [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)([Structure](common.md))
**class** [MatchmakeBlockListParam](#matchmakeblocklistparam)([Structure](common.md))
**class** [MatchmakeParam](#matchmakeparam)([Structure](common.md))
**class** [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)([Structure](common.md))
**class** [MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)([Structure](common.md))
**class** [MatchmakeRefereeRound](#matchmakerefereeround)([Structure](common.md))
**class** [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)([Structure](common.md))
**class** [MatchmakeRefereeStats](#matchmakerefereestats)([Structure](common.md))
**class** [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)([Structure](common.md))
**class** [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)([Structure](common.md))
**class** [MatchmakeSession](#matchmakesession)([Gathering](#gathering))
**class** [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)([Structure](common.md))
**class** [ParticipantDetails](#participantdetails)([Structure](common.md))
**class** [PersistentGathering](#persistentgathering)([Gathering](#gathering))
**class** [PlayingSession](#playingsession)([Structure](common.md))
**class** [SimpleCommunity](#simplecommunity)([Structure](common.md))
**class** [SimplePlayingSession](#simpleplayingsession)([Structure](common.md))
**class** [SimpleSearchCondition](#simplesearchcondition)([Structure](common.md))
**class** [SimpleSearchDateTimeAttribute](#simplesearchdatetimeattribute)([Structure](common.md))
**class** [SimpleSearchObject](#simplesearchobject)([Structure](common.md))
**class** [SimpleSearchParam](#simplesearchparam)([Structure](common.md))
**class** [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)([Structure](common.md))
## MatchMakingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClient`](#matchmakingclient).
**async def register_gathering**(gathering: [Gathering](#gathering)) -> int
Calls method `1` on the server.
**async def unregister_gathering**(gid: int) -> bool
Calls method `2` on the server.
**async def unregister_gatherings**(gids: list[int]) -> bool
Calls method `3` on the server.
**async def update_gathering**(gathering: [Gathering](#gathering)) -> bool
Calls method `4` on the server.
**async def invite**(gid: int, pids: list[int], message: str) -> bool
Calls method `5` on the server.
**async def accept_invitation**(gid: int, message: str) -> bool
Calls method `6` on the server.
**async def decline_invitation**(gid: int, message: str) -> bool
Calls method `7` on the server.
**async def cancel_invitation**(gid: int, pids: list[int], message: str) -> bool
Calls method `8` on the server.
**async def get_invitations_sent**(gid: int) -> list[[Invitation](#invitation)]
Calls method `9` on the server.
**async def get_invitations_received**() -> list[[Invitation](#invitation)]
Calls method `10` on the server.
**async def participate**(gid: int, message: str) -> bool
Calls method `11` on the server.
**async def cancel_participation**(gid: int, message: str) -> bool
Calls method `12` on the server.
**async def get_participants**(gid: int) -> list[int]
Calls method `13` on the server.
**async def add_participants**(gid: int, pids: list[int], message: str) -> bool
Calls method `14` on the server.
**async def get_detailed_participants**(gid: int) -> list[[ParticipantDetails](#participantdetails)]
Calls method `15` on the server.
**async def get_participants_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `16` on the server.
**async def find_by_type**(type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `17` on the server.
**async def find_by_description**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `18` on the server.
**async def find_by_description_regex**(regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `19` on the server.
**async def find_by_id**(ids: list[int]) -> list[[Gathering](#gathering)]
Calls method `20` on the server.
**async def find_by_single_id**(gid: int) -> [RMCResponse](common.md)
Calls method `21` on the server. The RMC response has the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `22` on the server.
**async def find_by_participants**(pids: list[int]) -> list[[Gathering](#gathering)]
Calls method `23` on the server.
**async def find_invitations**(range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `24` on the server.
**async def find_by_sql_query**(query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `25` on the server.
**async def launch_session**(gid: int, url: str) -> bool
Calls method `26` on the server.
**async def update_session_url**(gid: int, url: str) -> bool
Calls method `27` on the server.
**async def get_session_url**(gid: int) -> [RMCResponse](common.md)
Calls method `28` on the server. The RMC response has the following attributes:
result: bool
url: str
**async def get_state**(gid: int) -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
result: bool
state: int
**async def set_state**(gid: int, state: int) -> bool
Calls method `30` on the server.
**async def report_stats**(gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Calls method `31` on the server.
**async def get_stats**(gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Calls method `32` on the server. The RMC response has the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(gid: int) -> bool
Calls method `33` on the server.
**async def get_pending_deletions**(reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `34` on the server. The RMC response has the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(deletions: list[int]) -> bool
Calls method `35` on the server.
**async def migrate_gathering_ownership_v1**(gid: int, potential_owners: list[int]) -> bool
Calls method `36` on the server.
**async def find_by_description_like**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `37` on the server.
**async def register_local_url**(gid: int, url: [StationURL](common.md#stationurl)) -> None
Calls method `38` on the server.
**async def register_local_urls**(gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `39` on the server.
**async def update_session_host_v1**(gid: int) -> None
Calls method `40` on the server.
**async def get_session_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `41` on the server.
**async def update_session_host**(gid: int, is_migrate_owner: bool) -> None
Calls method `42` on the server.
**async def update_gathering_ownership**(gid: int, participants_only: bool) -> bool
Calls method `43` on the server.
**async def migrate_gathering_ownership**(gid: int, potential_owners: list[int], participants_only: bool) -> None
Calls method `44` on the server.
## MatchMakingClientExt
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClientExt`](#matchmakingclientext).
**async def end_participation**(gid: int, message: str) -> bool
Calls method `1` on the server.
**async def get_participants**(gid: int, only_active: bool) -> list[int]
Calls method `2` on the server.
**async def get_detailed_participants**(gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Calls method `3` on the server.
**async def get_participants_urls**(gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Calls method `4` on the server.
**async def get_gathering_relations**(id: int, descr: str) -> str
Calls method `5` on the server.
**async def delete_from_deletions**(deletions: list[int], pid: int) -> None
Calls method `6` on the server.
## MatchmakeRefereeClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeRefereeClient`](#matchmakerefereeclient).
**async def start_round**(param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Calls method `1` on the server.
**async def get_start_round_param**(round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Calls method `2` on the server.
**async def end_round**(param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Calls method `3` on the server.
**async def end_round_without_report**(round_id: int) -> None
Calls method `4` on the server.
**async def get_round_participants**(round_id: int) -> list[int]
Calls method `5` on the server.
**async def get_not_summarized_round**() -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Calls method `6` on the server.
**async def get_round**(round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Calls method `7` on the server.
**async def get_stats_primary**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `8` on the server.
**async def get_stats_primaries**(targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Calls method `10` on the server.
**async def create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `11` on the server.
**async def get_or_create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `12` on the server.
**async def reset_stats**() -> None
Calls method `13` on the server.
## MatchmakeExtensionClientMK8
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeExtensionClientMK8`](#matchmakeextensionclientmk8).
**async def close_participation**(gid: int) -> None
Calls method `1` on the server.
**async def open_participation**(gid: int) -> None
Calls method `2` on the server.
**async def auto_matchmake_postpone**(gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `3` on the server.
**async def browse_matchmake_session**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `4` on the server.
**async def browse_matchmake_session_with_host_urls**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `5` on the server. The RMC response has the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(gid: int, message: str) -> bytes
Calls method `7` on the server.
**async def modify_current_game_attribute**(gid: int, attrib: int, value: int) -> None
Calls method `8` on the server.
**async def update_notification_data**(type: int, param1: int, param2: int, param3: str) -> None
Calls method `9` on the server.
**async def get_friend_notification_data**(type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `10` on the server.
**async def update_application_buffer**(gid: int, buffer: bytes) -> None
Calls method `11` on the server.
**async def update_matchmake_session_attribute**(gid: int, attribs: list[int]) -> None
Calls method `12` on the server.
**async def get_friend_notification_data_list**(types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `13` on the server.
**async def update_matchmake_session**(gathering: [Gathering](#gathering)) -> None
Calls method `14` on the server.
**async def auto_matchmake_with_search_criteria_postpone**(search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `15` on the server.
**async def get_playing_session**(pids: list[int]) -> list[[PlayingSession](#playingsession)]
Calls method `16` on the server.
**async def create_community**(community: [PersistentGathering](#persistentgathering), message: str) -> int
Calls method `17` on the server.
**async def update_community**(community: [PersistentGathering](#persistentgathering)) -> None
Calls method `18` on the server.
**async def join_community**(gid: int, message: str, password: str) -> None
Calls method `19` on the server.
**async def find_community_by_gathering_id**(gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Calls method `20` on the server.
**async def find_official_community**(available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `21` on the server.
**async def find_community_by_participant**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `22` on the server.
**async def update_privacy_setting**(online_status: bool, community_participation: bool) -> None
Calls method `23` on the server.
**async def get_my_block_list**() -> list[int]
Calls method `24` on the server.
**async def add_to_block_list**(pids: list[int]) -> None
Calls method `25` on the server.
**async def remove_from_block_list**(pids: list[int]) -> None
Calls method `26` on the server.
**async def clear_my_block_list**() -> None
Calls method `27` on the server.
**async def report_violation**(pid: int, username: str, violation_code: int) -> None
Calls method `28` on the server.
**async def is_violation_user**() -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Calls method `30` on the server.
**async def get_simple_playing_session**(pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Calls method `31` on the server.
**async def get_simple_community**(gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Calls method `32` on the server.
**async def auto_matchmake_with_gathering_id_postpone**(gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `33` on the server.
**async def update_progress_score**(gid: int, score: int) -> None
Calls method `34` on the server.
**async def debug_notify_event**(pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Calls method `35` on the server.
**async def create_simple_search_object**(object: [SimpleSearchObject](#simplesearchobject)) -> int
Calls method `36` on the server.
**async def update_simple_search_object**(id: int, object: [SimpleSearchObject](#simplesearchobject)) -> None
Calls method `37` on the server.
**async def delete_simple_search_object**(id: int) -> None
Calls method `38` on the server.
**async def search_simple_search_object**(param: [SimpleSearchParam](#simplesearchparam)) -> list[[SimpleSearchObject](#simplesearchobject)]
Calls method `39` on the server.
**async def join_matchmake_session_with_extra_participants**(gid: int, join_message: str, ignore_blacklist: bool, participation_count: int, extra_participants: int) -> bytes
Calls method `40` on the server.
**async def search_simple_search_object_by_object_ids**(ids: list[int]) -> list[[SimpleSearchObject](#simplesearchobject)]
Calls method `41` on the server.
**async def browse_matchmake_session_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `42` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `43` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Calls method `44` on the server.
**async def request_matchmaking**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Calls method `45` on the server.
**async def withdraw_matchmaking**(request_id: int) -> None
Calls method `46` on the server.
**async def withdraw_matchmaking_all**() -> None
Calls method `47` on the server.
**async def find_matchmake_session_by_gathering_id**(gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `48` on the server.
**async def find_matchmake_session_by_single_gathering_id**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `49` on the server.
**async def find_matchmake_session_by_owner**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `50` on the server.
**async def find_matchmake_session_by_participant**(param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Calls method `51` on the server.
**async def browse_matchmake_session_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `52` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Calls method `53` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
## MatchMakingServer
**def _\_init__**()
Creates a new [`MatchMakingServer`](#matchmakingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def unregister_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `2`. This method should be overridden by a subclass.
**async def unregister_gatherings**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def update_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> bool
Handler for method `4`. This method should be overridden by a subclass.
**async def invite**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `5`. This method should be overridden by a subclass.
**async def accept_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `6`. This method should be overridden by a subclass.
**async def decline_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `7`. This method should be overridden by a subclass.
**async def cancel_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `8`. This method should be overridden by a subclass.
**async def get_invitations_sent**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[Invitation](#invitation)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_invitations_received**(client: [RMCClient](rmc.md#rmcclient)) -> list[[Invitation](#invitation)]
Handler for method `10`. This method should be overridden by a subclass.
**async def participate**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `11`. This method should be overridden by a subclass.
**async def cancel_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `12`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[int]
Handler for method `13`. This method should be overridden by a subclass.
**async def add_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `14`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `15`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `16`. This method should be overridden by a subclass.
**async def find_by_type**(client: [RMCClient](rmc.md#rmcclient), type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `17`. This method should be overridden by a subclass.
**async def find_by_description**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `18`. This method should be overridden by a subclass.
**async def find_by_description_regex**(client: [RMCClient](rmc.md#rmcclient), regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `19`. This method should be overridden by a subclass.
**async def find_by_id**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_by_single_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `21`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(client: [RMCClient](rmc.md#rmcclient), owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def find_by_participants**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `23`. This method should be overridden by a subclass.
**async def find_invitations**(client: [RMCClient](rmc.md#rmcclient), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `24`. This method should be overridden by a subclass.
**async def find_by_sql_query**(client: [RMCClient](rmc.md#rmcclient), query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `25`. This method should be overridden by a subclass.
**async def launch_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `26`. This method should be overridden by a subclass.
**async def update_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `27`. This method should be overridden by a subclass.
**async def get_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `28`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
url: str
**async def get_state**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
state: int
**async def set_state**(client: [RMCClient](rmc.md#rmcclient), gid: int, state: int) -> bool
Handler for method `30`. This method should be overridden by a subclass.
**async def report_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Handler for method `31`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Handler for method `32`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `33`. This method should be overridden by a subclass.
**async def get_pending_deletions**(client: [RMCClient](rmc.md#rmcclient), reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `34`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int]) -> bool
Handler for method `35`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int]) -> bool
Handler for method `36`. This method should be overridden by a subclass.
**async def find_by_description_like**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `37`. This method should be overridden by a subclass.
**async def register_local_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: [StationURL](common.md#stationurl)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def register_local_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `39`. This method should be overridden by a subclass.
**async def update_session_host_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `40`. This method should be overridden by a subclass.
**async def get_session_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `41`. This method should be overridden by a subclass.
**async def update_session_host**(client: [RMCClient](rmc.md#rmcclient), gid: int, is_migrate_owner: bool) -> None
Handler for method `42`. This method should be overridden by a subclass.
**async def update_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, participants_only: bool) -> bool
Handler for method `43`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int], participants_only: bool) -> None
Handler for method `44`. This method should be overridden by a subclass.
## MatchMakingServerExt
**def _\_init__**()
Creates a new [`MatchMakingServerExt`](#matchmakingserverext).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def end_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[int]
Handler for method `2`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `3`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Handler for method `4`. This method should be overridden by a subclass.
**async def get_gathering_relations**(client: [RMCClient](rmc.md#rmcclient), id: int, descr: str) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int], pid: int) -> None
Handler for method `6`. This method should be overridden by a subclass.
## MatchmakeRefereeServer
**def _\_init__**()
Creates a new [`MatchmakeRefereeServer`](#matchmakerefereeserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def start_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def get_start_round_param**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Handler for method `2`. This method should be overridden by a subclass.
**async def end_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def end_round_without_report**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_round_participants**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> list[int]
Handler for method `5`. This method should be overridden by a subclass.
**async def get_not_summarized_round**(client: [RMCClient](rmc.md#rmcclient)) -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_round**(client: [RMCClient](rmc.md#rmcclient), round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Handler for method `7`. This method should be overridden by a subclass.
**async def get_stats_primary**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_stats_primaries**(client: [RMCClient](rmc.md#rmcclient), targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Handler for method `10`. This method should be overridden by a subclass.
**async def create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_or_create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `12`. This method should be overridden by a subclass.
**async def reset_stats**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `13`. This method should be overridden by a subclass.
## MatchmakeExtensionServerMK8
**def _\_init__**()
Creates a new [`MatchmakeExtensionServerMK8`](#matchmakeextensionservermk8).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def close_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def open_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def auto_matchmake_postpone**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `3`. This method should be overridden by a subclass.
**async def browse_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `4`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `5`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bytes
Handler for method `7`. This method should be overridden by a subclass.
**async def modify_current_game_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attrib: int, value: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def update_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int, param1: int, param2: int, param3: str) -> None
Handler for method `9`. This method should be overridden by a subclass.
**async def get_friend_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `10`. This method should be overridden by a subclass.
**async def update_application_buffer**(client: [RMCClient](rmc.md#rmcclient), gid: int, buffer: bytes) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def update_matchmake_session_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attribs: list[int]) -> None
Handler for method `12`. This method should be overridden by a subclass.
**async def get_friend_notification_data_list**(client: [RMCClient](rmc.md#rmcclient), types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `13`. This method should be overridden by a subclass.
**async def update_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> None
Handler for method `14`. This method should be overridden by a subclass.
**async def auto_matchmake_with_search_criteria_postpone**(client: [RMCClient](rmc.md#rmcclient), search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[PlayingSession](#playingsession)]
Handler for method `16`. This method should be overridden by a subclass.
**async def create_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering), message: str) -> int
Handler for method `17`. This method should be overridden by a subclass.
**async def update_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering)) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def join_community**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str, password: str) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def find_community_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_official_community**(client: [RMCClient](rmc.md#rmcclient), available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `21`. This method should be overridden by a subclass.
**async def find_community_by_participant**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def update_privacy_setting**(client: [RMCClient](rmc.md#rmcclient), online_status: bool, community_participation: bool) -> None
Handler for method `23`. This method should be overridden by a subclass.
**async def get_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> list[int]
Handler for method `24`. This method should be overridden by a subclass.
**async def add_to_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `25`. This method should be overridden by a subclass.
**async def remove_from_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def clear_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `27`. This method should be overridden by a subclass.
**async def report_violation**(client: [RMCClient](rmc.md#rmcclient), pid: int, username: str, violation_code: int) -> None
Handler for method `28`. This method should be overridden by a subclass.
**async def is_violation_user**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(client: [RMCClient](rmc.md#rmcclient), gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Handler for method `30`. This method should be overridden by a subclass.
**async def get_simple_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Handler for method `31`. This method should be overridden by a subclass.
**async def get_simple_community**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Handler for method `32`. This method should be overridden by a subclass.
**async def auto_matchmake_with_gathering_id_postpone**(client: [RMCClient](rmc.md#rmcclient), gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `33`. This method should be overridden by a subclass.
**async def update_progress_score**(client: [RMCClient](rmc.md#rmcclient), gid: int, score: int) -> None
Handler for method `34`. This method should be overridden by a subclass.
**async def debug_notify_event**(client: [RMCClient](rmc.md#rmcclient), pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Handler for method `35`. This method should be overridden by a subclass.
**async def create_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), object: [SimpleSearchObject](#simplesearchobject)) -> int
Handler for method `36`. This method should be overridden by a subclass.
**async def update_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), id: int, object: [SimpleSearchObject](#simplesearchobject)) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def delete_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def search_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), param: [SimpleSearchParam](#simplesearchparam)) -> list[[SimpleSearchObject](#simplesearchobject)]
Handler for method `39`. This method should be overridden by a subclass.
**async def join_matchmake_session_with_extra_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, join_message: str, ignore_blacklist: bool, participation_count: int, extra_participants: int) -> bytes
Handler for method `40`. This method should be overridden by a subclass.
**async def search_simple_search_object_by_object_ids**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[SimpleSearchObject](#simplesearchobject)]
Handler for method `41`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `42`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `43`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(client: [RMCClient](rmc.md#rmcclient), param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Handler for method `44`. This method should be overridden by a subclass.
**async def request_matchmaking**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Handler for method `45`. This method should be overridden by a subclass.
**async def withdraw_matchmaking**(client: [RMCClient](rmc.md#rmcclient), request_id: int) -> None
Handler for method `46`. This method should be overridden by a subclass.
**async def withdraw_matchmaking_all**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `47`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `48`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_single_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `49`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_owner**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `50`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_participant**(client: [RMCClient](rmc.md#rmcclient), param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Handler for method `51`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `52`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Handler for method `53`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
## MatchmakeSystem
This class defines the following constants:
`GLOBAL = 1`
`FRIENDS = 2`
## AutoMatchmakeParam
**def _\_init__**()
Creates a new `AutoMatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)]
target_gids: list[int]
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## CreateMatchmakeSessionParam
**def _\_init__**()
Creates a new `CreateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
additional_participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
## DeletionEntry
**def _\_init__**()
Creates a new `DeletionEntry` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
pid: int
reason: int
## FindMatchmakeSessionByParticipantParam
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pids: list[int]
options: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## FindMatchmakeSessionByParticipantResult
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
## Gathering
**def _\_init__**()
Creates a new `Gathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int = 0
owner: int = 0
host: int = 0
min_participants: int = 0
max_participants: int = 0
participation_policy: int = 1
policy_argument: int = 0
flags: int = 512
state: int = 0
description: str = ""
## GatheringStats
**def _\_init__**()
Creates a new `GatheringStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
flags: int
values: list[float]
## GatheringURLs
**def _\_init__**()
Creates a new `GatheringURLs` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
urls: list[[StationURL](common.md#stationurl)]
## Invitation
**def _\_init__**()
Creates a new `Invitation` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
guest: int
message: str
## JoinMatchmakeSessionParam
**def _\_init__**()
Creates a new `JoinMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
participants: list[int]
gid_for_participation_check: int
options: int
behavior: int
user_password: str
system_password: str
join_message: str
num_participants: int
extra_participants: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## MatchmakeBlockListParam
**def _\_init__**()
Creates a new `MatchmakeBlockListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
options: int = 0
## MatchmakeParam
**def _\_init__**()
Creates a new `MatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
param: dict[str, object] = {}
## MatchmakeRefereeEndRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeEndRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
round_id: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereePersonalRoundResult
**def _\_init__**()
Creates a new `MatchmakeRefereePersonalRoundResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
personal_round_result_flag: int
round_win_loss: int
rating_change: int
buffer: bytes
## MatchmakeRefereeRound
**def _\_init__**()
Creates a new `MatchmakeRefereeRound` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
gid: int
state: int
personal_data_category: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereeStartRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStartRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
personal_data_category: int
gid: int
pids: list[int]
## MatchmakeRefereeStats
**def _\_init__**()
Creates a new `MatchmakeRefereeStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int
category: int
pid: int
recent_disconnection: int
recent_violation: int
recent_mismatch: int
recent_win: int
recent_loss: int
recent_draw: int
total_disconnect: int
total_violation: int
total_mismatch: int
total_win: int
total_loss: int
total_draw: int
rating_value: int
## MatchmakeRefereeStatsInitParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
initial_rating: int
## MatchmakeRefereeStatsTarget
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
category: int
## MatchmakeSession
**def _\_init__**()
Creates a new `MatchmakeSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
game_mode: int = 0
attribs: list[int] = [0, 0, 0, 0, 0, 0]
open_participation: bool = True
matchmake_system: int = 0
application_data: bytes = b""
num_participants: int = 0
If 30000 <= `nex.version` < 40000:
If `nex.version` >= 30500:
progress_score: int = 100
If `nex.version` >= 30000:
session_key: bytes = b""
If `nex.version` >= 30500:
option: int = 0
If `nex.version` >= 30600:
If `revision` >= 1:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
If `nex.version` >= 30700:
If `revision` >= 2:
user_password: str = ""
If `nex.version` >= 30800:
If `revision` >= 3:
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
If `nex.version` >= 40000:
progress_score: int = 100
session_key: bytes = b""
option: int = 0
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
user_password: str = ""
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
codeword: str = ""
## MatchmakeSessionSearchCriteria
**def _\_init__**()
Creates a new `MatchmakeSessionSearchCriteria` instance. Required fields must be filled in manually.
The following fields are defined in this class:
attribs: list[str] = ["", "", "", "", "", ""]
game_mode: str = ""
min_participants: str = ""
max_participants: str = ""
matchmake_system: str = ""
vacant_only: bool = True
exclude_locked: bool = True
exclude_non_host_pid: bool = False
selection_method: int = 0
If `nex.version` >= 30500:
vacant_participants: int = 1
If `nex.version` >= 40000:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
exclude_user_password: bool = False
exclude_system_password: bool = False
refer_gid: int = 0
codeword: str = ""
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## ParticipantDetails
**def _\_init__**()
Creates a new `ParticipantDetails` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
message: str
participants: int
## PersistentGathering
**def _\_init__**()
Creates a new `PersistentGathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
password: str
attribs: list[int]
application_buffer: bytes
participation_start: [DateTime](common.md#datetime)
participation_end: [DateTime](common.md#datetime)
matchmake_session_count: int
num_participants: int
## PlayingSession
**def _\_init__**()
Creates a new `PlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gathering: [Gathering](#gathering)
## SimpleCommunity
**def _\_init__**()
Creates a new `SimpleCommunity` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
matchmake_session_count: int
## SimplePlayingSession
**def _\_init__**()
Creates a new `SimplePlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gid: int
game_mode: int
attribute: int
## SimpleSearchCondition
**def _\_init__**()
Creates a new `SimpleSearchCondition` instance. Required fields must be filled in manually.
The following fields are defined in this class:
value: int
operator: int
## SimpleSearchDateTimeAttribute
**def _\_init__**()
Creates a new `SimpleSearchDateTimeAttribute` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: int
unk3: int
unk4: int
start_time: [DateTime](common.md#datetime)
end_time: [DateTime](common.md#datetime)
## SimpleSearchObject
**def _\_init__**()
Creates a new `SimpleSearchObject` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
owner: int
attributes: list[int]
metadata: bytes
community_id: int
community_code: str
datetime: [SimpleSearchDateTimeAttribute](#simplesearchdatetimeattribute) = [SimpleSearchDateTimeAttribute](#simplesearchdatetimeattribute)()
## SimpleSearchParam
**def _\_init__**()
Creates a new `SimpleSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unk1: int
unk2: int
conditions: list[[SimpleSearchCondition](#simplesearchcondition)]
unk3: str
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
unk4: [DateTime](common.md#datetime)
## UpdateMatchmakeSessionParam
**def _\_init__**()
Creates a new `UpdateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
modification_flags: int
attributes: list[int]
open_participation: bool
application_buffer: bytes
progress_score: int
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime)
user_password: str
game_mode: int
description: str
min_participants: int
max_participants: int
matchmake_system: int
participation_policy: int
policy_argument: int
codeword: str
================================================
FILE: docs/reference/nex/matchmaking_mk8d.md
================================================
# Module: nintendo.nex.matchmaking_mk8d
Provides a client and server for the `MatchMakingProtocol`, `MatchMakingProtocolExt`, `MatchmakeRefereeProtocol` and `MatchmakeExtensionProtocolMK8D`. This page was generated automatically from `matchmaking_mk8d.proto`.
**class** [MatchMakingClient](#matchmakingclient)
The client for the `MatchMakingProtocol`.
**class** [MatchMakingClientExt](#matchmakingclientext)
The client for the `MatchMakingProtocolExt`.
**class** [MatchmakeRefereeClient](#matchmakerefereeclient)
The client for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeExtensionClientMK8D](#matchmakeextensionclientmk8d)
The client for the `MatchmakeExtensionProtocolMK8D`.
**class** [MatchMakingServer](#matchmakingserver)
The server for the `MatchMakingProtocol`.
**class** [MatchMakingServerExt](#matchmakingserverext)
The server for the `MatchMakingProtocolExt`.
**class** [MatchmakeRefereeServer](#matchmakerefereeserver)
The server for the `MatchmakeRefereeProtocol`.
**class** [MatchmakeExtensionServerMK8D](#matchmakeextensionservermk8d)
The server for the `MatchmakeExtensionProtocolMK8D`.
**class** [MatchmakeSystem](#matchmakesystem)
**class** [SimpleSearchConditionOperator](#simplesearchconditionoperator)
**class** [AutoMatchmakeParam](#automatchmakeparam)([Structure](common.md))
**class** [CreateMatchmakeSessionParam](#creatematchmakesessionparam)([Structure](common.md))
**class** [DeletionEntry](#deletionentry)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)([Structure](common.md))
**class** [FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)([Structure](common.md))
**class** [Gathering](#gathering)([Structure](common.md))
**class** [GatheringStats](#gatheringstats)([Structure](common.md))
**class** [GatheringURLs](#gatheringurls)([Structure](common.md))
**class** [Invitation](#invitation)([Structure](common.md))
**class** [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)([Structure](common.md))
**class** [MatchmakeBlockListParam](#matchmakeblocklistparam)([Structure](common.md))
**class** [MatchmakeParam](#matchmakeparam)([Structure](common.md))
**class** [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)([Structure](common.md))
**class** [MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)([Structure](common.md))
**class** [MatchmakeRefereeRound](#matchmakerefereeround)([Structure](common.md))
**class** [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)([Structure](common.md))
**class** [MatchmakeRefereeStats](#matchmakerefereestats)([Structure](common.md))
**class** [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)([Structure](common.md))
**class** [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)([Structure](common.md))
**class** [MatchmakeSession](#matchmakesession)([Gathering](#gathering))
**class** [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)([Structure](common.md))
**class** [ParticipantDetails](#participantdetails)([Structure](common.md))
**class** [PersistentGathering](#persistentgathering)([Gathering](#gathering))
**class** [PlayingSession](#playingsession)([Structure](common.md))
**class** [SimpleCommunity](#simplecommunity)([Structure](common.md))
**class** [SimplePlayingSession](#simpleplayingsession)([Structure](common.md))
**class** [SimpleSearchCondition](#simplesearchcondition)([Structure](common.md))
**class** [SimpleSearchDateTimeAttribute](#simplesearchdatetimeattribute)([Structure](common.md))
**class** [SimpleSearchObject](#simplesearchobject)([Structure](common.md))
**class** [SimpleSearchParam](#simplesearchparam)([Structure](common.md))
**class** [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)([Structure](common.md))
## MatchMakingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClient`](#matchmakingclient).
**async def register_gathering**(gathering: [Gathering](#gathering)) -> int
Calls method `1` on the server.
**async def unregister_gathering**(gid: int) -> bool
Calls method `2` on the server.
**async def unregister_gatherings**(gids: list[int]) -> bool
Calls method `3` on the server.
**async def update_gathering**(gathering: [Gathering](#gathering)) -> bool
Calls method `4` on the server.
**async def invite**(gid: int, pids: list[int], message: str) -> bool
Calls method `5` on the server.
**async def accept_invitation**(gid: int, message: str) -> bool
Calls method `6` on the server.
**async def decline_invitation**(gid: int, message: str) -> bool
Calls method `7` on the server.
**async def cancel_invitation**(gid: int, pids: list[int], message: str) -> bool
Calls method `8` on the server.
**async def get_invitations_sent**(gid: int) -> list[[Invitation](#invitation)]
Calls method `9` on the server.
**async def get_invitations_received**() -> list[[Invitation](#invitation)]
Calls method `10` on the server.
**async def participate**(gid: int, message: str) -> bool
Calls method `11` on the server.
**async def cancel_participation**(gid: int, message: str) -> bool
Calls method `12` on the server.
**async def get_participants**(gid: int) -> list[int]
Calls method `13` on the server.
**async def add_participants**(gid: int, pids: list[int], message: str) -> bool
Calls method `14` on the server.
**async def get_detailed_participants**(gid: int) -> list[[ParticipantDetails](#participantdetails)]
Calls method `15` on the server.
**async def get_participants_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `16` on the server.
**async def find_by_type**(type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `17` on the server.
**async def find_by_description**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `18` on the server.
**async def find_by_description_regex**(regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `19` on the server.
**async def find_by_id**(ids: list[int]) -> list[[Gathering](#gathering)]
Calls method `20` on the server.
**async def find_by_single_id**(gid: int) -> [RMCResponse](common.md)
Calls method `21` on the server. The RMC response has the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `22` on the server.
**async def find_by_participants**(pids: list[int]) -> list[[Gathering](#gathering)]
Calls method `23` on the server.
**async def find_invitations**(range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `24` on the server.
**async def find_by_sql_query**(query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `25` on the server.
**async def launch_session**(gid: int, url: str) -> bool
Calls method `26` on the server.
**async def update_session_url**(gid: int, url: str) -> bool
Calls method `27` on the server.
**async def get_session_url**(gid: int) -> [RMCResponse](common.md)
Calls method `28` on the server. The RMC response has the following attributes:
result: bool
url: str
**async def get_state**(gid: int) -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
result: bool
state: int
**async def set_state**(gid: int, state: int) -> bool
Calls method `30` on the server.
**async def report_stats**(gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Calls method `31` on the server.
**async def get_stats**(gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Calls method `32` on the server. The RMC response has the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(gid: int) -> bool
Calls method `33` on the server.
**async def get_pending_deletions**(reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `34` on the server. The RMC response has the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(deletions: list[int]) -> bool
Calls method `35` on the server.
**async def migrate_gathering_ownership_v1**(gid: int, potential_owners: list[int]) -> bool
Calls method `36` on the server.
**async def find_by_description_like**(description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `37` on the server.
**async def register_local_url**(gid: int, url: [StationURL](common.md#stationurl)) -> None
Calls method `38` on the server.
**async def register_local_urls**(gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `39` on the server.
**async def update_session_host_v1**(gid: int) -> None
Calls method `40` on the server.
**async def get_session_urls**(gid: int) -> list[[StationURL](common.md#stationurl)]
Calls method `41` on the server.
**async def update_session_host**(gid: int, is_migrate_owner: bool) -> None
Calls method `42` on the server.
**async def update_gathering_ownership**(gid: int, participants_only: bool) -> bool
Calls method `43` on the server.
**async def migrate_gathering_ownership**(gid: int, potential_owners: list[int], participants_only: bool) -> None
Calls method `44` on the server.
## MatchMakingClientExt
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchMakingClientExt`](#matchmakingclientext).
**async def end_participation**(gid: int, message: str) -> bool
Calls method `1` on the server.
**async def get_participants**(gid: int, only_active: bool) -> list[int]
Calls method `2` on the server.
**async def get_detailed_participants**(gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Calls method `3` on the server.
**async def get_participants_urls**(gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Calls method `4` on the server.
**async def get_gathering_relations**(id: int, descr: str) -> str
Calls method `5` on the server.
**async def delete_from_deletions**(deletions: list[int], pid: int) -> None
Calls method `6` on the server.
## MatchmakeRefereeClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeRefereeClient`](#matchmakerefereeclient).
**async def start_round**(param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Calls method `1` on the server.
**async def get_start_round_param**(round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Calls method `2` on the server.
**async def end_round**(param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Calls method `3` on the server.
**async def end_round_without_report**(round_id: int) -> None
Calls method `4` on the server.
**async def get_round_participants**(round_id: int) -> list[int]
Calls method `5` on the server.
**async def get_not_summarized_round**() -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Calls method `6` on the server.
**async def get_round**(round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Calls method `7` on the server.
**async def get_stats_primary**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `8` on the server.
**async def get_stats_primaries**(targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Calls method `9` on the server. The RMC response has the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Calls method `10` on the server.
**async def create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `11` on the server.
**async def get_or_create_stats**(param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Calls method `12` on the server.
**async def reset_stats**() -> None
Calls method `13` on the server.
## MatchmakeExtensionClientMK8D
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MatchmakeExtensionClientMK8D`](#matchmakeextensionclientmk8d).
**async def close_participation**(gid: int) -> None
Calls method `1` on the server.
**async def open_participation**(gid: int) -> None
Calls method `2` on the server.
**async def auto_matchmake_postpone**(gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `3` on the server.
**async def browse_matchmake_session**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Calls method `4` on the server.
**async def browse_matchmake_session_with_host_urls**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `5` on the server. The RMC response has the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(gid: int, message: str) -> bytes
Calls method `7` on the server.
**async def modify_current_game_attribute**(gid: int, attrib: int, value: int) -> None
Calls method `8` on the server.
**async def update_notification_data**(type: int, param1: int, param2: int, param3: str) -> None
Calls method `9` on the server.
**async def get_friend_notification_data**(type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `10` on the server.
**async def update_application_buffer**(gid: int, buffer: bytes) -> None
Calls method `11` on the server.
**async def update_matchmake_session_attribute**(gid: int, attribs: list[int]) -> None
Calls method `12` on the server.
**async def get_friend_notification_data_list**(types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Calls method `13` on the server.
**async def update_matchmake_session**(gathering: [Gathering](#gathering)) -> None
Calls method `14` on the server.
**async def auto_matchmake_with_search_criteria_postpone**(search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `15` on the server.
**async def get_playing_session**(pids: list[int]) -> list[[PlayingSession](#playingsession)]
Calls method `16` on the server.
**async def create_community**(community: [PersistentGathering](#persistentgathering), message: str) -> int
Calls method `17` on the server.
**async def update_community**(community: [PersistentGathering](#persistentgathering)) -> None
Calls method `18` on the server.
**async def join_community**(gid: int, message: str, password: str) -> None
Calls method `19` on the server.
**async def find_community_by_gathering_id**(gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Calls method `20` on the server.
**async def find_official_community**(available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `21` on the server.
**async def find_community_by_participant**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Calls method `22` on the server.
**async def update_privacy_setting**(online_status: bool, community_participation: bool) -> None
Calls method `23` on the server.
**async def get_my_block_list**() -> list[int]
Calls method `24` on the server.
**async def add_to_block_list**(pids: list[int]) -> None
Calls method `25` on the server.
**async def remove_from_block_list**(pids: list[int]) -> None
Calls method `26` on the server.
**async def clear_my_block_list**() -> None
Calls method `27` on the server.
**async def report_violation**(pid: int, username: str, violation_code: int) -> None
Calls method `28` on the server.
**async def is_violation_user**() -> [RMCResponse](common.md)
Calls method `29` on the server. The RMC response has the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Calls method `30` on the server.
**async def get_simple_playing_session**(pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Calls method `31` on the server.
**async def get_simple_community**(gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Calls method `32` on the server.
**async def auto_matchmake_with_gathering_id_postpone**(gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Calls method `33` on the server.
**async def update_progress_score**(gid: int, score: int) -> None
Calls method `34` on the server.
**async def debug_notify_event**(pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Calls method `35` on the server.
**async def generate_matchmake_session_system_password**(gid: int) -> str
Calls method `36` on the server.
**async def clear_matchmake_session_system_password**(gid: int) -> None
Calls method `37` on the server.
**async def create_matchmake_session_with_param**(param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `38` on the server.
**async def join_matchmake_session_with_param**(param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `39` on the server.
**async def auto_matchmake_with_param_postpone**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Calls method `40` on the server.
**async def find_matchmake_session_by_gathering_id_detail**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `41` on the server.
**async def browse_matchmake_session_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `42` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Calls method `43` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Calls method `44` on the server.
**async def request_matchmaking**(param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Calls method `45` on the server.
**async def withdraw_matchmaking**(request_id: int) -> None
Calls method `46` on the server.
**async def withdraw_matchmaking_all**() -> None
Calls method `47` on the server.
**async def find_matchmake_session_by_gathering_id**(gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `48` on the server.
**async def find_matchmake_session_by_single_gathering_id**(gid: int) -> [MatchmakeSession](#matchmakesession)
Calls method `49` on the server.
**async def find_matchmake_session_by_owner**(pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `50` on the server.
**async def find_matchmake_session_by_participant**(param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Calls method `51` on the server.
**async def browse_matchmake_session_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Calls method `52` on the server.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Calls method `53` on the server. The RMC response has the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_simple_search_object**(object: [SimpleSearchObject](#simplesearchobject)) -> int
Calls method `54` on the server.
**async def update_simple_search_object**(id: int, object: [SimpleSearchObject](#simplesearchobject)) -> None
Calls method `55` on the server.
**async def delete_simple_search_object**(id: int) -> None
Calls method `56` on the server.
**async def search_simple_search_object**(param: [SimpleSearchParam](#simplesearchparam)) -> list[[SimpleSearchObject](#simplesearchobject)]
Calls method `57` on the server.
**async def search_simple_search_object_by_object_ids**(ids: list[int]) -> list[[SimpleSearchObject](#simplesearchobject)]
Calls method `58` on the server.
**async def join_matchmake_session_with_extra_participants**(gid: int, join_message: str, ignore_blacklist: bool, participation_count: int, extra_participants: int) -> bytes
Calls method `59` on the server.
**async def create_competition**(competition: [SimpleSearchObject](#simplesearchobject)) -> [SimpleSearchObject](#simplesearchobject)
Calls method `61` on the server.
**async def delete_competition**(id: int) -> None
Calls method `62` on the server.
**async def register_favorite_competition**(id: int) -> None
Calls method `63` on the server.
**async def unregister_favorite_competition**(id: int) -> None
Calls method `64` on the server.
**async def get_favorite_competition**() -> list[[SimpleSearchObject](#simplesearchobject)]
Calls method `65` on the server.
## MatchMakingServer
**def _\_init__**()
Creates a new [`MatchMakingServer`](#matchmakingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def unregister_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `2`. This method should be overridden by a subclass.
**async def unregister_gatherings**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> bool
Handler for method `3`. This method should be overridden by a subclass.
**async def update_gathering**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> bool
Handler for method `4`. This method should be overridden by a subclass.
**async def invite**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `5`. This method should be overridden by a subclass.
**async def accept_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `6`. This method should be overridden by a subclass.
**async def decline_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `7`. This method should be overridden by a subclass.
**async def cancel_invitation**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `8`. This method should be overridden by a subclass.
**async def get_invitations_sent**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[Invitation](#invitation)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_invitations_received**(client: [RMCClient](rmc.md#rmcclient)) -> list[[Invitation](#invitation)]
Handler for method `10`. This method should be overridden by a subclass.
**async def participate**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `11`. This method should be overridden by a subclass.
**async def cancel_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `12`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[int]
Handler for method `13`. This method should be overridden by a subclass.
**async def add_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], message: str) -> bool
Handler for method `14`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `15`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `16`. This method should be overridden by a subclass.
**async def find_by_type**(client: [RMCClient](rmc.md#rmcclient), type: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `17`. This method should be overridden by a subclass.
**async def find_by_description**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `18`. This method should be overridden by a subclass.
**async def find_by_description_regex**(client: [RMCClient](rmc.md#rmcclient), regex: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `19`. This method should be overridden by a subclass.
**async def find_by_id**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_by_single_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `21`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
gathering: [Gathering](#gathering)
**async def find_by_owner**(client: [RMCClient](rmc.md#rmcclient), owner: int, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def find_by_participants**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[Gathering](#gathering)]
Handler for method `23`. This method should be overridden by a subclass.
**async def find_invitations**(client: [RMCClient](rmc.md#rmcclient), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `24`. This method should be overridden by a subclass.
**async def find_by_sql_query**(client: [RMCClient](rmc.md#rmcclient), query: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `25`. This method should be overridden by a subclass.
**async def launch_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `26`. This method should be overridden by a subclass.
**async def update_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: str) -> bool
Handler for method `27`. This method should be overridden by a subclass.
**async def get_session_url**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `28`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
url: str
**async def get_state**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
state: int
**async def set_state**(client: [RMCClient](rmc.md#rmcclient), gid: int, state: int) -> bool
Handler for method `30`. This method should be overridden by a subclass.
**async def report_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, stats: list[[GatheringStats](#gatheringstats)]) -> bool
Handler for method `31`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), gid: int, pids: list[int], columns: list[int]) -> [RMCResponse](common.md)
Handler for method `32`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
stats: list[[GatheringStats](#gatheringstats)]
**async def delete_gathering**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> bool
Handler for method `33`. This method should be overridden by a subclass.
**async def get_pending_deletions**(client: [RMCClient](rmc.md#rmcclient), reason: int, range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `34`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
deletions: list[[DeletionEntry](#deletionentry)]
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int]) -> bool
Handler for method `35`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int]) -> bool
Handler for method `36`. This method should be overridden by a subclass.
**async def find_by_description_like**(client: [RMCClient](rmc.md#rmcclient), description: str, range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `37`. This method should be overridden by a subclass.
**async def register_local_url**(client: [RMCClient](rmc.md#rmcclient), gid: int, url: [StationURL](common.md#stationurl)) -> None
Handler for method `38`. This method should be overridden by a subclass.
**async def register_local_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int, urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `39`. This method should be overridden by a subclass.
**async def update_session_host_v1**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `40`. This method should be overridden by a subclass.
**async def get_session_urls**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> list[[StationURL](common.md#stationurl)]
Handler for method `41`. This method should be overridden by a subclass.
**async def update_session_host**(client: [RMCClient](rmc.md#rmcclient), gid: int, is_migrate_owner: bool) -> None
Handler for method `42`. This method should be overridden by a subclass.
**async def update_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, participants_only: bool) -> bool
Handler for method `43`. This method should be overridden by a subclass.
**async def migrate_gathering_ownership**(client: [RMCClient](rmc.md#rmcclient), gid: int, potential_owners: list[int], participants_only: bool) -> None
Handler for method `44`. This method should be overridden by a subclass.
## MatchMakingServerExt
**def _\_init__**()
Creates a new [`MatchMakingServerExt`](#matchmakingserverext).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def end_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def get_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[int]
Handler for method `2`. This method should be overridden by a subclass.
**async def get_detailed_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, only_active: bool) -> list[[ParticipantDetails](#participantdetails)]
Handler for method `3`. This method should be overridden by a subclass.
**async def get_participants_urls**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[GatheringURLs](#gatheringurls)]
Handler for method `4`. This method should be overridden by a subclass.
**async def get_gathering_relations**(client: [RMCClient](rmc.md#rmcclient), id: int, descr: str) -> str
Handler for method `5`. This method should be overridden by a subclass.
**async def delete_from_deletions**(client: [RMCClient](rmc.md#rmcclient), deletions: list[int], pid: int) -> None
Handler for method `6`. This method should be overridden by a subclass.
## MatchmakeRefereeServer
**def _\_init__**()
Creates a new [`MatchmakeRefereeServer`](#matchmakerefereeserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def start_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def get_start_round_param**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> [MatchmakeRefereeStartRoundParam](#matchmakerefereestartroundparam)
Handler for method `2`. This method should be overridden by a subclass.
**async def end_round**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeEndRoundParam](#matchmakerefereeendroundparam)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def end_round_without_report**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_round_participants**(client: [RMCClient](rmc.md#rmcclient), round_id: int) -> list[int]
Handler for method `5`. This method should be overridden by a subclass.
**async def get_not_summarized_round**(client: [RMCClient](rmc.md#rmcclient)) -> list[[MatchmakeRefereeRound](#matchmakerefereeround)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_round**(client: [RMCClient](rmc.md#rmcclient), round: int) -> [MatchmakeRefereeRound](#matchmakerefereeround)
Handler for method `7`. This method should be overridden by a subclass.
**async def get_stats_primary**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_stats_primaries**(client: [RMCClient](rmc.md#rmcclient), targets: list[[MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)]) -> [RMCResponse](common.md)
Handler for method `9`. This method should be overridden by a subclass. The RMC response must have the following attributes:
stats: list[[MatchmakeRefereeStats](#matchmakerefereestats)]
results: list[[Result](common.md#result)]
**async def get_stats_all**(client: [RMCClient](rmc.md#rmcclient), target: [MatchmakeRefereeStatsTarget](#matchmakerefereestatstarget)) -> list[[MatchmakeRefereeStats](#matchmakerefereestats)]
Handler for method `10`. This method should be overridden by a subclass.
**async def create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_or_create_stats**(client: [RMCClient](rmc.md#rmcclient), param: [MatchmakeRefereeStatsInitParam](#matchmakerefereestatsinitparam)) -> [MatchmakeRefereeStats](#matchmakerefereestats)
Handler for method `12`. This method should be overridden by a subclass.
**async def reset_stats**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `13`. This method should be overridden by a subclass.
## MatchmakeExtensionServerMK8D
**def _\_init__**()
Creates a new [`MatchmakeExtensionServerMK8D`](#matchmakeextensionservermk8d).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def close_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def open_participation**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def auto_matchmake_postpone**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `3`. This method should be overridden by a subclass.
**async def browse_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[Gathering](#gathering)]
Handler for method `4`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `5`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gatherings: list[[Gathering](#gathering)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering), description: str, num_participants: int) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
gid: int
session_key: bytes
**async def join_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str) -> bytes
Handler for method `7`. This method should be overridden by a subclass.
**async def modify_current_game_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attrib: int, value: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def update_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int, param1: int, param2: int, param3: str) -> None
Handler for method `9`. This method should be overridden by a subclass.
**async def get_friend_notification_data**(client: [RMCClient](rmc.md#rmcclient), type: int) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `10`. This method should be overridden by a subclass.
**async def update_application_buffer**(client: [RMCClient](rmc.md#rmcclient), gid: int, buffer: bytes) -> None
Handler for method `11`. This method should be overridden by a subclass.
**async def update_matchmake_session_attribute**(client: [RMCClient](rmc.md#rmcclient), gid: int, attribs: list[int]) -> None
Handler for method `12`. This method should be overridden by a subclass.
**async def get_friend_notification_data_list**(client: [RMCClient](rmc.md#rmcclient), types: list[int]) -> list[[NotificationEvent](notification.md#notificationevent)]
Handler for method `13`. This method should be overridden by a subclass.
**async def update_matchmake_session**(client: [RMCClient](rmc.md#rmcclient), gathering: [Gathering](#gathering)) -> None
Handler for method `14`. This method should be overridden by a subclass.
**async def auto_matchmake_with_search_criteria_postpone**(client: [RMCClient](rmc.md#rmcclient), search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `15`. This method should be overridden by a subclass.
**async def get_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> list[[PlayingSession](#playingsession)]
Handler for method `16`. This method should be overridden by a subclass.
**async def create_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering), message: str) -> int
Handler for method `17`. This method should be overridden by a subclass.
**async def update_community**(client: [RMCClient](rmc.md#rmcclient), community: [PersistentGathering](#persistentgathering)) -> None
Handler for method `18`. This method should be overridden by a subclass.
**async def join_community**(client: [RMCClient](rmc.md#rmcclient), gid: int, message: str, password: str) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def find_community_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `20`. This method should be overridden by a subclass.
**async def find_official_community**(client: [RMCClient](rmc.md#rmcclient), available_only: bool, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `21`. This method should be overridden by a subclass.
**async def find_community_by_participant**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[PersistentGathering](#persistentgathering)]
Handler for method `22`. This method should be overridden by a subclass.
**async def update_privacy_setting**(client: [RMCClient](rmc.md#rmcclient), online_status: bool, community_participation: bool) -> None
Handler for method `23`. This method should be overridden by a subclass.
**async def get_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> list[int]
Handler for method `24`. This method should be overridden by a subclass.
**async def add_to_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `25`. This method should be overridden by a subclass.
**async def remove_from_block_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> None
Handler for method `26`. This method should be overridden by a subclass.
**async def clear_my_block_list**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `27`. This method should be overridden by a subclass.
**async def report_violation**(client: [RMCClient](rmc.md#rmcclient), pid: int, username: str, violation_code: int) -> None
Handler for method `28`. This method should be overridden by a subclass.
**async def is_violation_user**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `29`. This method should be overridden by a subclass. The RMC response must have the following attributes:
flag: bool
score: int
**async def join_matchmake_session_ex**(client: [RMCClient](rmc.md#rmcclient), gid: int, gmessage: str, ignore_block_list: bool, num_participants: int) -> bytes
Handler for method `30`. This method should be overridden by a subclass.
**async def get_simple_playing_session**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], include_login_user: bool) -> list[[SimplePlayingSession](#simpleplayingsession)]
Handler for method `31`. This method should be overridden by a subclass.
**async def get_simple_community**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[SimpleCommunity](#simplecommunity)]
Handler for method `32`. This method should be overridden by a subclass.
**async def auto_matchmake_with_gathering_id_postpone**(client: [RMCClient](rmc.md#rmcclient), gids: list[int], gathering: [Gathering](#gathering), message: str) -> [Gathering](#gathering)
Handler for method `33`. This method should be overridden by a subclass.
**async def update_progress_score**(client: [RMCClient](rmc.md#rmcclient), gid: int, score: int) -> None
Handler for method `34`. This method should be overridden by a subclass.
**async def debug_notify_event**(client: [RMCClient](rmc.md#rmcclient), pid: int, main_type: int, sub_type: int, param1: int, param2: int, param3: str) -> None
Handler for method `35`. This method should be overridden by a subclass.
**async def generate_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> str
Handler for method `36`. This method should be overridden by a subclass.
**async def clear_matchmake_session_system_password**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> None
Handler for method `37`. This method should be overridden by a subclass.
**async def create_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [CreateMatchmakeSessionParam](#creatematchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `38`. This method should be overridden by a subclass.
**async def join_matchmake_session_with_param**(client: [RMCClient](rmc.md#rmcclient), param: [JoinMatchmakeSessionParam](#joinmatchmakesessionparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `39`. This method should be overridden by a subclass.
**async def auto_matchmake_with_param_postpone**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> [MatchmakeSession](#matchmakesession)
Handler for method `40`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id_detail**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `41`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `42`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria), range: [ResultRange](common.md#resultrange)) -> [RMCResponse](common.md)
Handler for method `43`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def update_matchmake_session_part**(client: [RMCClient](rmc.md#rmcclient), param: [UpdateMatchmakeSessionParam](#updatematchmakesessionparam)) -> None
Handler for method `44`. This method should be overridden by a subclass.
**async def request_matchmaking**(client: [RMCClient](rmc.md#rmcclient), param: [AutoMatchmakeParam](#automatchmakeparam)) -> int
Handler for method `45`. This method should be overridden by a subclass.
**async def withdraw_matchmaking**(client: [RMCClient](rmc.md#rmcclient), request_id: int) -> None
Handler for method `46`. This method should be overridden by a subclass.
**async def withdraw_matchmaking_all**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `47`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gids: list[int]) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `48`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_single_gathering_id**(client: [RMCClient](rmc.md#rmcclient), gid: int) -> [MatchmakeSession](#matchmakesession)
Handler for method `49`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_owner**(client: [RMCClient](rmc.md#rmcclient), pid: int, range: [ResultRange](common.md#resultrange)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `50`. This method should be overridden by a subclass.
**async def find_matchmake_session_by_participant**(client: [RMCClient](rmc.md#rmcclient), param: [FindMatchmakeSessionByParticipantParam](#findmatchmakesessionbyparticipantparam)) -> list[[FindMatchmakeSessionByParticipantResult](#findmatchmakesessionbyparticipantresult)]
Handler for method `51`. This method should be overridden by a subclass.
**async def browse_matchmake_session_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> list[[MatchmakeSession](#matchmakesession)]
Handler for method `52`. This method should be overridden by a subclass.
**async def browse_matchmake_session_with_host_urls_no_holder_no_result_range**(client: [RMCClient](rmc.md#rmcclient), search_criteria: [MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)) -> [RMCResponse](common.md)
Handler for method `53`. This method should be overridden by a subclass. The RMC response must have the following attributes:
sessions: list[[MatchmakeSession](#matchmakesession)]
urls: list[[GatheringURLs](#gatheringurls)]
**async def create_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), object: [SimpleSearchObject](#simplesearchobject)) -> int
Handler for method `54`. This method should be overridden by a subclass.
**async def update_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), id: int, object: [SimpleSearchObject](#simplesearchobject)) -> None
Handler for method `55`. This method should be overridden by a subclass.
**async def delete_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `56`. This method should be overridden by a subclass.
**async def search_simple_search_object**(client: [RMCClient](rmc.md#rmcclient), param: [SimpleSearchParam](#simplesearchparam)) -> list[[SimpleSearchObject](#simplesearchobject)]
Handler for method `57`. This method should be overridden by a subclass.
**async def search_simple_search_object_by_object_ids**(client: [RMCClient](rmc.md#rmcclient), ids: list[int]) -> list[[SimpleSearchObject](#simplesearchobject)]
Handler for method `58`. This method should be overridden by a subclass.
**async def join_matchmake_session_with_extra_participants**(client: [RMCClient](rmc.md#rmcclient), gid: int, join_message: str, ignore_blacklist: bool, participation_count: int, extra_participants: int) -> bytes
Handler for method `59`. This method should be overridden by a subclass.
**async def create_competition**(client: [RMCClient](rmc.md#rmcclient), competition: [SimpleSearchObject](#simplesearchobject)) -> [SimpleSearchObject](#simplesearchobject)
Handler for method `61`. This method should be overridden by a subclass.
**async def delete_competition**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `62`. This method should be overridden by a subclass.
**async def register_favorite_competition**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `63`. This method should be overridden by a subclass.
**async def unregister_favorite_competition**(client: [RMCClient](rmc.md#rmcclient), id: int) -> None
Handler for method `64`. This method should be overridden by a subclass.
**async def get_favorite_competition**(client: [RMCClient](rmc.md#rmcclient)) -> list[[SimpleSearchObject](#simplesearchobject)]
Handler for method `65`. This method should be overridden by a subclass.
## MatchmakeSystem
This class defines the following constants:
`GLOBAL = 1`
`FRIENDS = 2`
## SimpleSearchConditionOperator
This class defines the following constants:
`ANY = 0`
`EQUAL = 1`
`GREATER_THAN = 2`
`LESS_THAN = 3`
`GREATER_THAN_OR_EQUAL = 4`
`LESS_THAN_OR_EQUAL = 5`
## AutoMatchmakeParam
**def _\_init__**()
Creates a new `AutoMatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
search_criteria: list[[MatchmakeSessionSearchCriteria](#matchmakesessionsearchcriteria)]
target_gids: list[int]
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## CreateMatchmakeSessionParam
**def _\_init__**()
Creates a new `CreateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
additional_participants: list[int]
gid_for_participation_check: int
options: int
join_message: str
num_participants: int
## DeletionEntry
**def _\_init__**()
Creates a new `DeletionEntry` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
pid: int
reason: int
## FindMatchmakeSessionByParticipantParam
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pids: list[int]
options: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## FindMatchmakeSessionByParticipantResult
**def _\_init__**()
Creates a new `FindMatchmakeSessionByParticipantResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
session: [MatchmakeSession](#matchmakesession) = [MatchmakeSession](#matchmakesession)()
## Gathering
**def _\_init__**()
Creates a new `Gathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int = 0
owner: int = 0
host: int = 0
min_participants: int = 0
max_participants: int = 0
participation_policy: int = 1
policy_argument: int = 0
flags: int = 512
state: int = 0
description: str = ""
## GatheringStats
**def _\_init__**()
Creates a new `GatheringStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
flags: int
values: list[float]
## GatheringURLs
**def _\_init__**()
Creates a new `GatheringURLs` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
urls: list[[StationURL](common.md#stationurl)]
## Invitation
**def _\_init__**()
Creates a new `Invitation` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
guest: int
message: str
## JoinMatchmakeSessionParam
**def _\_init__**()
Creates a new `JoinMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
participants: list[int]
gid_for_participation_check: int
options: int
behavior: int
user_password: str
system_password: str
join_message: str
num_participants: int
extra_participants: int
block_list: [MatchmakeBlockListParam](#matchmakeblocklistparam) = [MatchmakeBlockListParam](#matchmakeblocklistparam)()
## MatchmakeBlockListParam
**def _\_init__**()
Creates a new `MatchmakeBlockListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
options: int = 0
## MatchmakeParam
**def _\_init__**()
Creates a new `MatchmakeParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
param: dict[str, object] = {}
## MatchmakeRefereeEndRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeEndRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
round_id: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereePersonalRoundResult
**def _\_init__**()
Creates a new `MatchmakeRefereePersonalRoundResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
personal_round_result_flag: int
round_win_loss: int
rating_change: int
buffer: bytes
## MatchmakeRefereeRound
**def _\_init__**()
Creates a new `MatchmakeRefereeRound` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
gid: int
state: int
personal_data_category: int
results: list[[MatchmakeRefereePersonalRoundResult](#matchmakerefereepersonalroundresult)]
## MatchmakeRefereeStartRoundParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStartRoundParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
personal_data_category: int
gid: int
pids: list[int]
## MatchmakeRefereeStats
**def _\_init__**()
Creates a new `MatchmakeRefereeStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int
category: int
pid: int
recent_disconnection: int
recent_violation: int
recent_mismatch: int
recent_win: int
recent_loss: int
recent_draw: int
total_disconnect: int
total_violation: int
total_mismatch: int
total_win: int
total_loss: int
total_draw: int
rating_value: int
## MatchmakeRefereeStatsInitParam
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsInitParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
initial_rating: int
## MatchmakeRefereeStatsTarget
**def _\_init__**()
Creates a new `MatchmakeRefereeStatsTarget` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
category: int
## MatchmakeSession
**def _\_init__**()
Creates a new `MatchmakeSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
game_mode: int = 0
attribs: list[int] = [0, 0, 0, 0, 0, 0]
open_participation: bool = True
matchmake_system: int = 0
application_data: bytes = b""
num_participants: int = 0
If 30000 <= `nex.version` < 40000:
If `nex.version` >= 30500:
progress_score: int = 100
If `nex.version` >= 30000:
session_key: bytes = b""
If `nex.version` >= 30500:
option: int = 0
If `nex.version` >= 30600:
If `revision` >= 1:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
If `nex.version` >= 30700:
If `revision` >= 2:
user_password: str = ""
If `nex.version` >= 30800:
If `revision` >= 3:
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
If `nex.version` >= 40000:
progress_score: int = 100
session_key: bytes = b""
option: int = 0
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
user_password: str = ""
refer_gid: int = 0
user_password_enabled: bool = False
system_password_enabled: bool = False
codeword: str = ""
## MatchmakeSessionSearchCriteria
**def _\_init__**()
Creates a new `MatchmakeSessionSearchCriteria` instance. Required fields must be filled in manually.
The following fields are defined in this class:
attribs: list[str] = ["", "", "", "", "", ""]
game_mode: str = ""
min_participants: str = ""
max_participants: str = ""
matchmake_system: str = ""
vacant_only: bool = True
exclude_locked: bool = True
exclude_non_host_pid: bool = False
selection_method: int = 0
If `nex.version` >= 30500:
vacant_participants: int = 1
If `nex.version` >= 40000:
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
exclude_user_password: bool = False
exclude_system_password: bool = False
refer_gid: int = 0
codeword: str = ""
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## ParticipantDetails
**def _\_init__**()
Creates a new `ParticipantDetails` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
name: str
message: str
participants: int
## PersistentGathering
**def _\_init__**()
Creates a new `PersistentGathering` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
password: str
attribs: list[int]
application_buffer: bytes
participation_start: [DateTime](common.md#datetime)
participation_end: [DateTime](common.md#datetime)
matchmake_session_count: int
num_participants: int
## PlayingSession
**def _\_init__**()
Creates a new `PlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gathering: [Gathering](#gathering)
## SimpleCommunity
**def _\_init__**()
Creates a new `SimpleCommunity` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
matchmake_session_count: int
## SimplePlayingSession
**def _\_init__**()
Creates a new `SimplePlayingSession` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
gid: int
game_mode: int
attribute: int
## SimpleSearchCondition
**def _\_init__**()
Creates a new `SimpleSearchCondition` instance. Required fields must be filled in manually.
The following fields are defined in this class:
value: int
operator: int
## SimpleSearchDateTimeAttribute
**def _\_init__**()
Creates a new `SimpleSearchDateTimeAttribute` instance. Required fields must be filled in manually.
The following fields are defined in this class:
start_daytime: int
end_daytime: int
start_time: int
end_time: int
start_datetime: [DateTime](common.md#datetime)
end_datetime: [DateTime](common.md#datetime)
## SimpleSearchObject
**def _\_init__**()
Creates a new `SimpleSearchObject` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
owner: int
attributes: list[int]
metadata: bytes
community_id: int
community_code: str
datetime: [SimpleSearchDateTimeAttribute](#simplesearchdatetimeattribute) = [SimpleSearchDateTimeAttribute](#simplesearchdatetimeattribute)()
If `nex.version` >= 40000:
If `revision` >= 1:
liveliness_rate: int
liveliness_update_time: [DateTime](common.md#datetime)
## SimpleSearchParam
**def _\_init__**()
Creates a new `SimpleSearchParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int = 0
owner: int = 0
conditions: list[[SimpleSearchCondition](#simplesearchcondition)] = []
community_code: str = ""
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
datetime: [DateTime](common.md#datetime) = [DateTime](common.md#datetime).never()
## UpdateMatchmakeSessionParam
**def _\_init__**()
Creates a new `UpdateMatchmakeSessionParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
gid: int
modification_flags: int
attributes: list[int]
open_participation: bool
application_buffer: bytes
progress_score: int
param: [MatchmakeParam](#matchmakeparam) = [MatchmakeParam](#matchmakeparam)()
started_time: [DateTime](common.md#datetime)
user_password: str
game_mode: int
description: str
min_participants: int
max_participants: int
matchmake_system: int
participation_policy: int
policy_argument: int
codeword: str
================================================
FILE: docs/reference/nex/messaging.md
================================================
# Module: nintendo.nex.messaging
Provides a client and server for the `MessagingProtocol` and `MessageDeliveryProtocol`. This page was generated automatically from `messaging.proto`.
**class** [MessagingClient](#messagingclient)
The client for the `MessagingProtocol`.
**class** [MessageDeliveryClient](#messagedeliveryclient)
The client for the `MessageDeliveryProtocol`.
**class** [MessagingServer](#messagingserver)
The server for the `MessagingProtocol`.
**class** [MessageDeliveryServer](#messagedeliveryserver)
The server for the `MessageDeliveryProtocol`.
**class** [RecipientType](#recipienttype)
**class** [BinaryMessage](#binarymessage)([UserMessage](#usermessage))
**class** [MessageRecipient](#messagerecipient)([Structure](common.md))
**class** [TextMessage](#textmessage)([UserMessage](#usermessage))
**class** [UserMessage](#usermessage)([Data](common.md))
## MessagingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MessagingClient`](#messagingclient).
**async def deliver_message**(message: [Data](common.md)) -> [RMCResponse](common.md)
Calls method `1` on the server. The RMC response has the following attributes:
modified_message: [Data](common.md)
sandbox_node_ids: list[int]
participants: list[int]
**async def get_number_of_messages**(recipient: [MessageRecipient](#messagerecipient)) -> int
Calls method `2` on the server.
**async def get_message_headers**(recipient: [MessageRecipient](#messagerecipient), range: [ResultRange](common.md#resultrange)) -> list[[UserMessage](#usermessage)]
Calls method `3` on the server.
**async def retrieve_all_messages_within_range**(recipient: [MessageRecipient](#messagerecipient), range: [ResultRange](common.md#resultrange)) -> list[[Data](common.md)]
Calls method `4` on the server.
**async def retrieve_messages**(recipient: [MessageRecipient](#messagerecipient), message_ids: list[int], leave_on_server: bool) -> list[[Data](common.md)]
Calls method `5` on the server.
**async def delete_messages**(recipient: [MessageRecipient](#messagerecipient), message_ids: list[int]) -> None
Calls method `6` on the server.
**async def delete_all_messages**(recipient: [MessageRecipient](#messagerecipient)) -> int
Calls method `7` on the server.
## MessageDeliveryClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MessageDeliveryClient`](#messagedeliveryclient).
**async def deliver_message**(message: [Data](common.md)) -> None
Calls method `1` on the server.
## MessagingServer
**def _\_init__**()
Creates a new [`MessagingServer`](#messagingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def deliver_message**(client: [RMCClient](rmc.md#rmcclient), message: [Data](common.md)) -> [RMCResponse](common.md)
Handler for method `1`. This method should be overridden by a subclass. The RMC response must have the following attributes:
modified_message: [Data](common.md)
sandbox_node_ids: list[int]
participants: list[int]
**async def get_number_of_messages**(client: [RMCClient](rmc.md#rmcclient), recipient: [MessageRecipient](#messagerecipient)) -> int
Handler for method `2`. This method should be overridden by a subclass.
**async def get_message_headers**(client: [RMCClient](rmc.md#rmcclient), recipient: [MessageRecipient](#messagerecipient), range: [ResultRange](common.md#resultrange)) -> list[[UserMessage](#usermessage)]
Handler for method `3`. This method should be overridden by a subclass.
**async def retrieve_all_messages_within_range**(client: [RMCClient](rmc.md#rmcclient), recipient: [MessageRecipient](#messagerecipient), range: [ResultRange](common.md#resultrange)) -> list[[Data](common.md)]
Handler for method `4`. This method should be overridden by a subclass.
**async def retrieve_messages**(client: [RMCClient](rmc.md#rmcclient), recipient: [MessageRecipient](#messagerecipient), message_ids: list[int], leave_on_server: bool) -> list[[Data](common.md)]
Handler for method `5`. This method should be overridden by a subclass.
**async def delete_messages**(client: [RMCClient](rmc.md#rmcclient), recipient: [MessageRecipient](#messagerecipient), message_ids: list[int]) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def delete_all_messages**(client: [RMCClient](rmc.md#rmcclient), recipient: [MessageRecipient](#messagerecipient)) -> int
Handler for method `7`. This method should be overridden by a subclass.
## MessageDeliveryServer
**def _\_init__**()
Creates a new [`MessageDeliveryServer`](#messagedeliveryserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def deliver_message**(client: [RMCClient](rmc.md#rmcclient), message: [Data](common.md)) -> None
Handler for method `1`. This method should be overridden by a subclass.
## RecipientType
This class defines the following constants:
`PRINCIPAL = 1`
`GATHERING = 2`
## BinaryMessage
**def _\_init__**()
Creates a new `BinaryMessage` instance. Required fields must be filled in manually.
The following fields are defined in this class:
body: bytes
## MessageRecipient
**def _\_init__**()
Creates a new `MessageRecipient` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
pid: int
gid: int
## TextMessage
**def _\_init__**()
Creates a new `TextMessage` instance. Required fields must be filled in manually.
The following fields are defined in this class:
body: str
## UserMessage
**def _\_init__**()
Creates a new `UserMessage` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
parent_id: int
sender: int
reception_time: [DateTime](common.md#datetime)
life_time: int
flags: int
subject: str
sender_name: str
recipient: [MessageRecipient](#messagerecipient) = [MessageRecipient](#messagerecipient)()
================================================
FILE: docs/reference/nex/monitoring.md
================================================
# Module: nintendo.nex.monitoring
Provides a client and server for the `MonitoringProtocol`. This page was generated automatically from `monitoring.proto`.
**class** [MonitoringClient](#monitoringclient)
The client for the `MonitoringProtocol`.
**class** [MonitoringServer](#monitoringserver)
The server for the `MonitoringProtocol`.
## MonitoringClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`MonitoringClient`](#monitoringclient).
**async def ping_daemon**() -> bool
Calls method `1` on the server.
**async def get_cluster_members**() -> list[str]
Calls method `2` on the server.
## MonitoringServer
**def _\_init__**()
Creates a new [`MonitoringServer`](#monitoringserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def ping_daemon**(client: [RMCClient](rmc.md#rmcclient)) -> bool
Handler for method `1`. This method should be overridden by a subclass.
**async def get_cluster_members**(client: [RMCClient](rmc.md#rmcclient)) -> list[str]
Handler for method `2`. This method should be overridden by a subclass.
================================================
FILE: docs/reference/nex/natcheck.md
================================================
# Module: nintendo.nex.natcheck
Implements a NAT check client.
**async def detect_external_address**(socket: [UDPSocket](https://anynet.readthedocs.io/en/latest/reference/udp/#udpsocket)) -> (str, int)
Attempts to figure out the external IP address and port of the given socket.
================================================
FILE: docs/reference/nex/nattraversal.md
================================================
# Module: nintendo.nex.nattraversal
Provides a client and server for the `NATTraversalProtocol`. This page was generated automatically from `nattraversal.proto`.
**class** [NATTraversalClient](#nattraversalclient)
The client for the `NATTraversalProtocol`.
**class** [NATTraversalServer](#nattraversalserver)
The server for the `NATTraversalProtocol`.
## NATTraversalClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`NATTraversalClient`](#nattraversalclient).
**async def request_probe_initiation**(target_urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `1` on the server.
**async def initiate_probe**(station_to_probe: [StationURL](common.md#stationurl)) -> None
Calls method `2` on the server.
**async def request_probe_initiation_ext**(target_urls: list[[StationURL](common.md#stationurl)], station_to_probe: [StationURL](common.md#stationurl)) -> None
Calls method `3` on the server.
**async def report_nat_traversal_result**(cid: int, result: bool) -> None
Calls method `4` on the server.
**async def report_nat_properties**(natm: int, natf: int, rtt: int) -> None
Calls method `5` on the server.
**async def get_relay_signature_key**() -> [RMCResponse](common.md)
Calls method `6` on the server. The RMC response has the following attributes:
mode: int
time: [DateTime](common.md#datetime)
address: str
port: int
address_type: int
game_server_id: int
**async def report_nat_traversal_result_detail**(cid: int, result: bool, detail: int, rtt: int) -> None
Calls method `7` on the server.
## NATTraversalServer
**def _\_init__**()
Creates a new [`NATTraversalServer`](#nattraversalserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def request_probe_initiation**(client: [RMCClient](rmc.md#rmcclient), target_urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def initiate_probe**(client: [RMCClient](rmc.md#rmcclient), station_to_probe: [StationURL](common.md#stationurl)) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def request_probe_initiation_ext**(client: [RMCClient](rmc.md#rmcclient), target_urls: list[[StationURL](common.md#stationurl)], station_to_probe: [StationURL](common.md#stationurl)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def report_nat_traversal_result**(client: [RMCClient](rmc.md#rmcclient), cid: int, result: bool) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def report_nat_properties**(client: [RMCClient](rmc.md#rmcclient), natm: int, natf: int, rtt: int) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def get_relay_signature_key**(client: [RMCClient](rmc.md#rmcclient)) -> [RMCResponse](common.md)
Handler for method `6`. This method should be overridden by a subclass. The RMC response must have the following attributes:
mode: int
time: [DateTime](common.md#datetime)
address: str
port: int
address_type: int
game_server_id: int
**async def report_nat_traversal_result_detail**(client: [RMCClient](rmc.md#rmcclient), cid: int, result: bool, detail: int, rtt: int) -> None
Handler for method `7`. This method should be overridden by a subclass.
================================================
FILE: docs/reference/nex/nintendonotification.md
================================================
# Module: nintendo.nex.nintendonotification
Provides a client and server for the `NintendoNotificationProtocol`. This page was generated automatically from `nintendonotification.proto`.
**class** [NintendoNotificationClient](#nintendonotificationclient)
The client for the `NintendoNotificationProtocol`.
**class** [NintendoNotificationServer](#nintendonotificationserver)
The server for the `NintendoNotificationProtocol`.
**class** [NintendoNotificationType](#nintendonotificationtype)
**class** [NintendoNotificationEvent](#nintendonotificationevent)([Structure](common.md))
**class** [NintendoNotificationEventGeneral](#nintendonotificationeventgeneral)([Data](common.md))
**class** [NintendoNotificationEventKeyValue](#nintendonotificationeventkeyvalue)([Data](common.md))
**class** [NintendoNotificationEventProfile](#nintendonotificationeventprofile)([Data](common.md))
**class** [StringKeyValue](#stringkeyvalue)([Data](common.md))
**class** [u32KeyValue](#u32keyvalue)([Data](common.md))
**class** [u64KeyValue](#u64keyvalue)([Data](common.md))
**class** [u8KeyValue](#u8keyvalue)([Data](common.md))
## NintendoNotificationClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`NintendoNotificationClient`](#nintendonotificationclient).
**async def process_nintendo_notification_event**(event: [NintendoNotificationEvent](#nintendonotificationevent)) -> None
Calls method `1` on the server.
**async def process_nintendo_notification_event_alt**(event: [NintendoNotificationEvent](#nintendonotificationevent)) -> None
Calls method `2` on the server.
## NintendoNotificationServer
**def _\_init__**()
Creates a new [`NintendoNotificationServer`](#nintendonotificationserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def process_nintendo_notification_event**(client: [RMCClient](rmc.md#rmcclient), event: [NintendoNotificationEvent](#nintendonotificationevent)) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def process_nintendo_notification_event_alt**(client: [RMCClient](rmc.md#rmcclient), event: [NintendoNotificationEvent](#nintendonotificationevent)) -> None
Handler for method `2`. This method should be overridden by a subclass.
## NintendoNotificationType
This class defines the following constants:
`LOGOUT = 10`
`PRESENCE_CHANGE = 24`
`UNFRIENDED = 26`
`FRIENDED = 30`
`STATUS_CHANGE = 33`
## NintendoNotificationEvent
**def _\_init__**()
Creates a new `NintendoNotificationEvent` instance. Required fields must be filled in manually.
The following fields are defined in this class:
type: int
pid: int
data: [Data](common.md)
## NintendoNotificationEventGeneral
**def _\_init__**()
Creates a new `NintendoNotificationEventGeneral` instance. Required fields must be filled in manually.
The following fields are defined in this class:
param1: int
param2: int
param3: int
text: str
## NintendoNotificationEventKeyValue
**def _\_init__**()
Creates a new `NintendoNotificationEventKeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
u8: list[[u8KeyValue](#u8keyvalue)]
u32: list[[u32KeyValue](#u32keyvalue)]
u64: list[[u64KeyValue](#u64keyvalue)]
string: list[[StringKeyValue](#stringkeyvalue)]
## NintendoNotificationEventProfile
**def _\_init__**()
Creates a new `NintendoNotificationEventProfile` 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
## StringKeyValue
**def _\_init__**()
Creates a new `StringKeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: int
value: str
## u32KeyValue
**def _\_init__**()
Creates a new `u32KeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: int
value: int
## u64KeyValue
**def _\_init__**()
Creates a new `u64KeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: int
value: int
## u8KeyValue
**def _\_init__**()
Creates a new `u8KeyValue` instance. Required fields must be filled in manually.
The following fields are defined in this class:
key: int
value: int
================================================
FILE: docs/reference/nex/notification.md
================================================
# Module: nintendo.nex.notification
Provides a client and server for the `NotificationProtocol`. This page was generated automatically from `notification.proto`.
**class** [NotificationClient](#notificationclient)
The client for the `NotificationProtocol`.
**class** [NotificationServer](#notificationserver)
The server for the `NotificationProtocol`.
**class** [NotificationEvent](#notificationevent)([Structure](common.md))
## NotificationClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`NotificationClient`](#notificationclient).
**async def process_notification_event**(event: [NotificationEvent](notification.md#notificationevent)) -> None
Calls method `1` on the server.
## NotificationServer
**def _\_init__**()
Creates a new [`NotificationServer`](#notificationserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def process_notification_event**(client: [RMCClient](rmc.md#rmcclient), event: [NotificationEvent](notification.md#notificationevent)) -> None
Handler for method `1`. This method should be overridden by a subclass.
## NotificationEvent
**def _\_init__**()
Creates a new `NotificationEvent` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
type: int
param1: int = 0
param2: int = 0
text: str = ""
If `nex.version` >= 30500:
param3: int = 0
If `nex.version` >= 40000:
If `revision` >= 1:
map: dict[str, object] = {}
================================================
FILE: docs/reference/nex/prudp.md
================================================
# Module: nintendo.nex.prudp
Provides a client and server for PRUDP. Originally, PRUDP implemented reliable and secure transmission on top of UDP, but the Nintendo Switch introduced a 'Lite' mode in which PRUDP is implemented on top of TCP or WebSockets instead.
**class** [PRUDPClient](#prudpclient)
A PRUDP client.
**async with connect**(settings: [Settings](settings.md#settings), host: str, port: int, vport: int = 1, type: int = 10, context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext) = None, credentials: [Credentials](kerberos.md#credentials) = None) -> [PRUDPClient](#prudpclient)
Creates a PRUDP client and connects it to the given address. If `context` is provided, and the underlying transport supports this, the connections is secured with TLS. If credentials are provided they are sent to the server in the connection request. Blocks until the connection is ready and handshake has been performed.
**async with serve**(handler: Callable, settings: [Settings](settings.md#settings), host: str = "", port: int = 0, vport: int = 1, type: int = 10, context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext) = None, key: bytes = None) -> None
Creates a PRUDP server and binds it to the given address. If `host` is empty, the local address of the default interface is used. If `port` is 0, it is chosen by the operating system. `handler` must be an `async` function that accepts a [`PRUDPClient`](#prudpclient). The client is closed automatically when `handler` returns. If `context` is provided, and the underlying transport supports this, the server is secured with TLS. If `key` is provided it is used to decrypt the Kerberos tickets in connection requests. If `key` is `None`, the payload of connection requests is ignored an all client connections are accepted.
**async with connect_transport**(settings: [Settings](settings.md#settings), host: str, port: int, context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext) = None) -> [PRUDPClientTransport](#prudpclienttransport)
Creates a transport connection for the PRUDP protocol. This can be used to establish multiple PRUDP connections with a single socket.
**async with serve_transport**(settings: [Settings](settings.md#settings), host: str = "", port: int = 0, [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext) = None) -> [PRUDPServerTransport](#prudpservertransport)
Creates a transport server for the PRUDP protocol. This can be used to host multiple PRUDP servers at a single port.
## PRUDPClient
**async def send**(data: bytes, substream: int = 0) -> None
Sends a reliable data packet to the server through the given substream. Blocks if the send buffer is full. Packets are retransmitted automatically if no acknowledgement is received.
**async def send_unreliable**(data: bytes) -> None
Sends an unreliable data packet to the server. Blocks if the send buffer is full.
**async def recv**(substream: int = 0) -> bytes
Receives a single reliable data packet from the server from the given substream. Blocks if no reliable data is available.
**async def recv_unreliable**() -> bytes
Receives an unreliable data packet from the server. Blocks if no unreliable data is available.
**async def close**() -> None
Closes the connection forcefully by sending an unreliable disconnect packet three times.
**async def disconnect**() -> None
Closes the connection gracefully by sending a reliable disconnect packet.
**def pid**() -> int
Returns the user id of the connected client. Returns `None` if the client is connected without credentials.
**def minor_version**() -> int
Returns the PRUDP minor version that was negotiated during the handshake.
**def local_address**() -> tuple[str, int]
Returns the local address of the client.
**def remote_address**() -> tuple[str, int]
Returns the address that the client is connected to.
**def local_sid**() -> int
Returns the local stream id (PRUDP port).
**def remote_sid**() -> int
Returns the remote stream id (PRUDP port).
## PRUDPClientTransport
**async with connect**(port: int, type: int = 10, credentials: credentials: [Credentials](kerberos.md#credentials) = None) -> [PRUDPClient](#prudpclient)
Establishes a new PRUDP connection with the given PRUDP port.
**def local_address**() -> tuple[str, int]
Returns the local address of the client.
**def remote_address**() -> tuple[str, int]
Returns the address that the client is connected to.
## PRUDPServerTransport
**async with serve**(handler: Callable, port: int, type: int = 10, key: bytes = None) -> None
Creates a new PRUDP server at the given PRUDP port.
================================================
FILE: docs/reference/nex/ranking.md
================================================
# Module: nintendo.nex.ranking
Provides a client and server for the `RankingProtocol`. This page was generated automatically from `ranking.proto`.
**class** [RankingClient](#rankingclient)
The client for the `RankingProtocol`.
**class** [RankingServer](#rankingserver)
The server for the `RankingProtocol`.
**class** [RankingMode](#rankingmode)
**class** [RankingOrderCalc](#rankingordercalc)
**class** [RankingStatFlags](#rankingstatflags)
**class** [RankingCachedResult](#rankingcachedresult)([RankingResult](#rankingresult))
**class** [RankingChangeAttributesParam](#rankingchangeattributesparam)([Structure](common.md))
**class** [RankingOrderParam](#rankingorderparam)([Structure](common.md))
**class** [RankingRankData](#rankingrankdata)([Structure](common.md))
**class** [RankingResult](#rankingresult)([Structure](common.md))
**class** [RankingScoreData](#rankingscoredata)([Structure](common.md))
**class** [RankingStats](#rankingstats)([Structure](common.md))
## RankingClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`RankingClient`](#rankingclient).
**async def upload_score**(score_data: [RankingScoreData](#rankingscoredata), unique_id: int) -> None
Calls method `1` on the server.
**async def delete_score**(category: int, unique_id: int) -> None
Calls method `2` on the server.
**async def delete_all_scores**(unique_id: int) -> None
Calls method `3` on the server.
**async def upload_common_data**(common_data: bytes, unique_id: int) -> None
Calls method `4` on the server.
**async def delete_common_data**(unique_id: int) -> None
Calls method `5` on the server.
**async def get_common_data**(unique_id: int) -> bytes
Calls method `6` on the server.
**async def change_attributes**(category: int, param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Calls method `7` on the server.
**async def change_all_attributes**(param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Calls method `8` on the server.
**async def get_ranking**(mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int, pid: int) -> [RankingResult](#rankingresult)
Calls method `9` on the server.
**async def get_approx_order**(category: int, order: [RankingOrderParam](#rankingorderparam), score: int, unique_id: int, pid: int) -> int
Calls method `10` on the server.
**async def get_stats**(category: int, order: [RankingOrderParam](#rankingorderparam), flags: int) -> [RankingStats](#rankingstats)
Calls method `11` on the server.
**async def get_ranking_by_pid_list**(pids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Calls method `12` on the server.
**async def get_ranking_by_unique_id_list**(ids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Calls method `13` on the server.
**async def get_cached_topx_ranking**(category: int, order: [RankingOrderParam](#rankingorderparam)) -> [RankingCachedResult](#rankingcachedresult)
Calls method `14` on the server.
**async def get_cached_topx_rankings**(categories: list[int], order: list[[RankingOrderParam](#rankingorderparam)]) -> list[[RankingCachedResult](#rankingcachedresult)]
Calls method `15` on the server.
## RankingServer
**def _\_init__**()
Creates a new [`RankingServer`](#rankingserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def upload_score**(client: [RMCClient](rmc.md#rmcclient), score_data: [RankingScoreData](#rankingscoredata), unique_id: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def delete_score**(client: [RMCClient](rmc.md#rmcclient), category: int, unique_id: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def delete_all_scores**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def upload_common_data**(client: [RMCClient](rmc.md#rmcclient), common_data: bytes, unique_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def get_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> bytes
Handler for method `6`. This method should be overridden by a subclass.
**async def change_attributes**(client: [RMCClient](rmc.md#rmcclient), category: int, param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Handler for method `7`. This method should be overridden by a subclass.
**async def change_all_attributes**(client: [RMCClient](rmc.md#rmcclient), param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def get_ranking**(client: [RMCClient](rmc.md#rmcclient), mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int, pid: int) -> [RankingResult](#rankingresult)
Handler for method `9`. This method should be overridden by a subclass.
**async def get_approx_order**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam), score: int, unique_id: int, pid: int) -> int
Handler for method `10`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam), flags: int) -> [RankingStats](#rankingstats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_ranking_by_pid_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_ranking_by_unique_id_list**(client: [RMCClient](rmc.md#rmcclient), ids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Handler for method `13`. This method should be overridden by a subclass.
**async def get_cached_topx_ranking**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam)) -> [RankingCachedResult](#rankingcachedresult)
Handler for method `14`. This method should be overridden by a subclass.
**async def get_cached_topx_rankings**(client: [RMCClient](rmc.md#rmcclient), categories: list[int], order: list[[RankingOrderParam](#rankingorderparam)]) -> list[[RankingCachedResult](#rankingcachedresult)]
Handler for method `15`. This method should be overridden by a subclass.
## RankingMode
This class defines the following constants:
`GLOBAL = 0`
`GLOBAL_AROUND_SELF = 1`
`SELF = 4`
## RankingOrderCalc
This class defines the following constants:
`STANDARD = 0`
`ORDINAL = 1`
## RankingStatFlags
This class defines the following constants:
`RANKING_COUNT = 1`
`TOTAL_SCORE = 2`
`LOWEST_SCORE = 4`
`HIGHEST_SCORE = 8`
`AVERAGE_SCORE = 16`
`ALL = 31`
## RankingCachedResult
**def _\_init__**()
Creates a new `RankingCachedResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
created_time: [DateTime](common.md#datetime)
expired_time: [DateTime](common.md#datetime)
max_length: int
## RankingChangeAttributesParam
**def _\_init__**()
Creates a new `RankingChangeAttributesParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flags: int
groups: list[int]
param: int
## RankingOrderParam
**def _\_init__**()
Creates a new `RankingOrderParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
order_calc: int = 0
group_index: int = 255
group_num: int = 0
time_scope: int = 2
offset: int = 0
count: int = 10
## RankingRankData
**def _\_init__**()
Creates a new `RankingRankData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
unique_id: int
rank: int
category: int
score: int
groups: list[int]
param: int
common_data: bytes
If `nex.version` >= 40000:
update_time: [DateTime](common.md#datetime)
## RankingResult
**def _\_init__**()
Creates a new `RankingResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[[RankingRankData](#rankingrankdata)]
total: int
since_time: [DateTime](common.md#datetime)
## RankingScoreData
**def _\_init__**()
Creates a new `RankingScoreData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
score: int
order: int
update_mode: int
groups: list[int]
param: int
## RankingStats
**def _\_init__**()
Creates a new `RankingStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
stats: list[float]
================================================
FILE: docs/reference/nex/ranking2.md
================================================
# Module: nintendo.nex.ranking2
Provides a client and server for the `Ranking2Protocol`. This page was generated automatically from `ranking2.proto`.
**class** [Ranking2Client](#ranking2client)
The client for the `Ranking2Protocol`.
**class** [Ranking2Server](#ranking2server)
The server for the `Ranking2Protocol`.
**class** [RankingMode](#rankingmode)
**class** [Ranking2CategorySetting](#ranking2categorysetting)([Structure](common.md))
**class** [Ranking2ChartInfo](#ranking2chartinfo)([Structure](common.md))
**class** [Ranking2ChartInfoInput](#ranking2chartinfoinput)([Structure](common.md))
**class** [Ranking2CommonData](#ranking2commondata)([Structure](common.md))
**class** [Ranking2EstimateScoreRankInput](#ranking2estimatescorerankinput)([Structure](common.md))
**class** [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)([Structure](common.md))
**class** [Ranking2GetByListParam](#ranking2getbylistparam)([Structure](common.md))
**class** [Ranking2GetParam](#ranking2getparam)([Structure](common.md))
**class** [Ranking2Info](#ranking2info)([Structure](common.md))
**class** [Ranking2RankData](#ranking2rankdata)([Structure](common.md))
**class** [Ranking2ScoreData](#ranking2scoredata)([Structure](common.md))
## Ranking2Client
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`Ranking2Client`](#ranking2client).
**async def put_score**(socres: list[[Ranking2ScoreData](#ranking2scoredata)], unique_id: int) -> None
Calls method `1` on the server.
**async def get_common_data**(option_flags: int, pid: int, unique_id: int) -> [Ranking2CommonData](#ranking2commondata)
Calls method `2` on the server.
**async def put_common_data**(data: [Ranking2CommonData](#ranking2commondata), unique_id: int) -> None
Calls method `3` on the server.
**async def delete_common_data**(unique_id: int) -> None
Calls method `4` on the server.
**async def get_ranking**(param: [Ranking2GetParam](#ranking2getparam)) -> [Ranking2Info](#ranking2info)
Calls method `5` on the server.
**async def get_ranking_by_principal_id**(param: [Ranking2GetByListParam](#ranking2getbylistparam), pids: list[int]) -> [Ranking2Info](#ranking2info)
Calls method `6` on the server.
**async def get_category_setting**(category: int) -> [Ranking2CategorySetting](#ranking2categorysetting)
Calls method `7` on the server.
**async def get_ranking_chart**(input: [Ranking2ChartInfoInput](#ranking2chartinfoinput)) -> [Ranking2ChartInfo](#ranking2chartinfo)
Calls method `8` on the server.
**async def get_ranking_charts**(inputs: list[[Ranking2ChartInfoInput](#ranking2chartinfoinput)]) -> list[[Ranking2ChartInfo](#ranking2chartinfo)]
Calls method `9` on the server.
**async def get_estimate_score_rank**(input: [Ranking2EstimateScoreRankInput](#ranking2estimatescorerankinput)) -> [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)
Calls method `10` on the server.
## Ranking2Server
**def _\_init__**()
Creates a new [`Ranking2Server`](#ranking2server).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def put_score**(client: [RMCClient](rmc.md#rmcclient), socres: list[[Ranking2ScoreData](#ranking2scoredata)], unique_id: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def get_common_data**(client: [RMCClient](rmc.md#rmcclient), option_flags: int, pid: int, unique_id: int) -> [Ranking2CommonData](#ranking2commondata)
Handler for method `2`. This method should be overridden by a subclass.
**async def put_common_data**(client: [RMCClient](rmc.md#rmcclient), data: [Ranking2CommonData](#ranking2commondata), unique_id: int) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def delete_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_ranking**(client: [RMCClient](rmc.md#rmcclient), param: [Ranking2GetParam](#ranking2getparam)) -> [Ranking2Info](#ranking2info)
Handler for method `5`. This method should be overridden by a subclass.
**async def get_ranking_by_principal_id**(client: [RMCClient](rmc.md#rmcclient), param: [Ranking2GetByListParam](#ranking2getbylistparam), pids: list[int]) -> [Ranking2Info](#ranking2info)
Handler for method `6`. This method should be overridden by a subclass.
**async def get_category_setting**(client: [RMCClient](rmc.md#rmcclient), category: int) -> [Ranking2CategorySetting](#ranking2categorysetting)
Handler for method `7`. This method should be overridden by a subclass.
**async def get_ranking_chart**(client: [RMCClient](rmc.md#rmcclient), input: [Ranking2ChartInfoInput](#ranking2chartinfoinput)) -> [Ranking2ChartInfo](#ranking2chartinfo)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_ranking_charts**(client: [RMCClient](rmc.md#rmcclient), inputs: list[[Ranking2ChartInfoInput](#ranking2chartinfoinput)]) -> list[[Ranking2ChartInfo](#ranking2chartinfo)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_estimate_score_rank**(client: [RMCClient](rmc.md#rmcclient), input: [Ranking2EstimateScoreRankInput](#ranking2estimatescorerankinput)) -> [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)
Handler for method `10`. This method should be overridden by a subclass.
## RankingMode
This class defines the following constants:
`GLOBAL_AROUND_SELF = 1`
`GLOBAL = 2`
`FRIENDS = 3`
## Ranking2CategorySetting
**def _\_init__**()
Creates a new `Ranking2CategorySetting` instance. Required fields must be filled in manually.
The following fields are defined in this class:
min_score: int
max_score: int
lowest_rank: int
reset_month: int
reset_day: int
reset_hour: int
reset_mode: int
max_seasons_to_go_back: int
score_order: bool
## Ranking2ChartInfo
**def _\_init__**()
Creates a new `Ranking2ChartInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
create_time: [DateTime](common.md#datetime)
index: int
category: int
season: int
bins_size: int
sampling_rate: int
score_order: bool
estimate_length: int
estimate_highest_score: int
estimate_lowest_score: int
estimate_median_score: int
estimate_average_score: float
highest_bins_score: int
lowest_bins_score: int
bins_width: int
attribute1: int
attribute2: int
quantities: list[int]
## Ranking2ChartInfoInput
**def _\_init__**()
Creates a new `Ranking2ChartInfoInput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
chart_index: int
seasons_to_go_back: int
## Ranking2CommonData
**def _\_init__**()
Creates a new `Ranking2CommonData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
username: str
mii: bytes
binary_data: bytes
## Ranking2EstimateScoreRankInput
**def _\_init__**()
Creates a new `Ranking2EstimateScoreRankInput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
seasons_to_go_back: int
score: int
## Ranking2EstimateScoreRankOutput
**def _\_init__**()
Creates a new `Ranking2EstimateScoreRankOutput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rank: int
length: int
score: int
category: int
season: int
sampling_rate: int
## Ranking2GetByListParam
**def _\_init__**()
Creates a new `Ranking2GetByListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
offset: int
length: int
sort_flags: int
option_flags: int
seasons_to_go_back: int
## Ranking2GetParam
**def _\_init__**()
Creates a new `Ranking2GetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int = 0
pid: int = 0
category: int
offset: int = 0
count: int = 10
sort_flags: int = 0
option_flags: int = 0
mode: int = 2
seasons_to_go_back: int = 0
## Ranking2Info
**def _\_init__**()
Creates a new `Ranking2Info` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[[Ranking2RankData](#ranking2rankdata)]
lowest_rank: int
num_entries: int
season: int
## Ranking2RankData
**def _\_init__**()
Creates a new `Ranking2RankData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
misc: int
unique_id: int
pid: int
rank: int
score: int
common_data: [Ranking2CommonData](#ranking2commondata) = [Ranking2CommonData](#ranking2commondata)()
## Ranking2ScoreData
**def _\_init__**()
Creates a new `Ranking2ScoreData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
misc: int
category: int
score: int
================================================
FILE: docs/reference/nex/ranking2_eagle.md
================================================
# Module: nintendo.nex.ranking2_eagle
Provides a client and server for the `Ranking2Protocol`. This page was generated automatically from `ranking2_eagle.proto`.
**class** [Ranking2Client](#ranking2client)
The client for the `Ranking2Protocol`.
**class** [Ranking2Server](#ranking2server)
The server for the `Ranking2Protocol`.
**class** [RankingMode](#rankingmode)
**class** [Ranking2CategorySetting](#ranking2categorysetting)([Structure](common.md))
**class** [Ranking2ChartInfo](#ranking2chartinfo)([Structure](common.md))
**class** [Ranking2ChartInfoInput](#ranking2chartinfoinput)([Structure](common.md))
**class** [Ranking2CommonData](#ranking2commondata)([Structure](common.md))
**class** [Ranking2EstimateMyScoreRankInput](#ranking2estimatemyscorerankinput)([Structure](common.md))
**class** [Ranking2EstimateScoreRankInput](#ranking2estimatescorerankinput)([Structure](common.md))
**class** [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)([Structure](common.md))
**class** [Ranking2GetByListParam](#ranking2getbylistparam)([Structure](common.md))
**class** [Ranking2GetParam](#ranking2getparam)([Structure](common.md))
**class** [Ranking2Info](#ranking2info)([Structure](common.md))
**class** [Ranking2RankData](#ranking2rankdata)([Structure](common.md))
**class** [Ranking2ScoreData](#ranking2scoredata)([Structure](common.md))
## Ranking2Client
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`Ranking2Client`](#ranking2client).
**async def put_score**(socres: list[[Ranking2ScoreData](#ranking2scoredata)], unique_id: int) -> None
Calls method `1` on the server.
**async def get_common_data**(option_flags: int, pid: int, unique_id: int) -> [Ranking2CommonData](#ranking2commondata)
Calls method `2` on the server.
**async def put_common_data**(data: [Ranking2CommonData](#ranking2commondata), unique_id: int) -> None
Calls method `3` on the server.
**async def delete_common_data**(unique_id: int) -> None
Calls method `4` on the server.
**async def get_ranking**(param: [Ranking2GetParam](#ranking2getparam)) -> [Ranking2Info](#ranking2info)
Calls method `5` on the server.
**async def get_ranking_by_principal_id**(param: [Ranking2GetByListParam](#ranking2getbylistparam), pids: list[int]) -> [Ranking2Info](#ranking2info)
Calls method `6` on the server.
**async def get_category_setting**(category: int) -> [Ranking2CategorySetting](#ranking2categorysetting)
Calls method `7` on the server.
**async def get_ranking_chart**(input: [Ranking2ChartInfoInput](#ranking2chartinfoinput)) -> [Ranking2ChartInfo](#ranking2chartinfo)
Calls method `8` on the server.
**async def get_ranking_charts**(inputs: list[[Ranking2ChartInfoInput](#ranking2chartinfoinput)]) -> list[[Ranking2ChartInfo](#ranking2chartinfo)]
Calls method `9` on the server.
**async def get_estimate_score_rank**(input: [Ranking2EstimateScoreRankInput](#ranking2estimatescorerankinput)) -> [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)
Calls method `10` on the server.
**async def get_estimate_my_score_rank**(input: [Ranking2EstimateMyScoreRankInput](#ranking2estimatemyscorerankinput)) -> [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)
Calls method `11` on the server.
## Ranking2Server
**def _\_init__**()
Creates a new [`Ranking2Server`](#ranking2server).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def put_score**(client: [RMCClient](rmc.md#rmcclient), socres: list[[Ranking2ScoreData](#ranking2scoredata)], unique_id: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def get_common_data**(client: [RMCClient](rmc.md#rmcclient), option_flags: int, pid: int, unique_id: int) -> [Ranking2CommonData](#ranking2commondata)
Handler for method `2`. This method should be overridden by a subclass.
**async def put_common_data**(client: [RMCClient](rmc.md#rmcclient), data: [Ranking2CommonData](#ranking2commondata), unique_id: int) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def delete_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_ranking**(client: [RMCClient](rmc.md#rmcclient), param: [Ranking2GetParam](#ranking2getparam)) -> [Ranking2Info](#ranking2info)
Handler for method `5`. This method should be overridden by a subclass.
**async def get_ranking_by_principal_id**(client: [RMCClient](rmc.md#rmcclient), param: [Ranking2GetByListParam](#ranking2getbylistparam), pids: list[int]) -> [Ranking2Info](#ranking2info)
Handler for method `6`. This method should be overridden by a subclass.
**async def get_category_setting**(client: [RMCClient](rmc.md#rmcclient), category: int) -> [Ranking2CategorySetting](#ranking2categorysetting)
Handler for method `7`. This method should be overridden by a subclass.
**async def get_ranking_chart**(client: [RMCClient](rmc.md#rmcclient), input: [Ranking2ChartInfoInput](#ranking2chartinfoinput)) -> [Ranking2ChartInfo](#ranking2chartinfo)
Handler for method `8`. This method should be overridden by a subclass.
**async def get_ranking_charts**(client: [RMCClient](rmc.md#rmcclient), inputs: list[[Ranking2ChartInfoInput](#ranking2chartinfoinput)]) -> list[[Ranking2ChartInfo](#ranking2chartinfo)]
Handler for method `9`. This method should be overridden by a subclass.
**async def get_estimate_score_rank**(client: [RMCClient](rmc.md#rmcclient), input: [Ranking2EstimateScoreRankInput](#ranking2estimatescorerankinput)) -> [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)
Handler for method `10`. This method should be overridden by a subclass.
**async def get_estimate_my_score_rank**(client: [RMCClient](rmc.md#rmcclient), input: [Ranking2EstimateMyScoreRankInput](#ranking2estimatemyscorerankinput)) -> [Ranking2EstimateScoreRankOutput](#ranking2estimatescorerankoutput)
Handler for method `11`. This method should be overridden by a subclass.
## RankingMode
This class defines the following constants:
`GLOBAL_AROUND_SELF = 1`
`GLOBAL = 2`
`FRIENDS = 3`
## Ranking2CategorySetting
**def _\_init__**()
Creates a new `Ranking2CategorySetting` instance. Required fields must be filled in manually.
The following fields are defined in this class:
min_score: int
max_score: int
lowest_rank: int
reset_month: int
reset_day: int
reset_hour: int
reset_mode: int
max_seasons_to_go_back: int
score_order: bool
## Ranking2ChartInfo
**def _\_init__**()
Creates a new `Ranking2ChartInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
create_time: [DateTime](common.md#datetime)
index: int
category: int
season: int
bins_size: int
sampling_rate: int
score_order: bool
estimate_length: int
estimate_highest_score: int
estimate_lowest_score: int
estimate_median_score: int
estimate_average_score: float
highest_bins_score: int
lowest_bins_score: int
bins_width: int
attribute1: int
attribute2: int
quantities: list[int]
## Ranking2ChartInfoInput
**def _\_init__**()
Creates a new `Ranking2ChartInfoInput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
chart_index: int
seasons_to_go_back: int
## Ranking2CommonData
**def _\_init__**()
Creates a new `Ranking2CommonData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
username: str
mii: bytes
binary_data: bytes
## Ranking2EstimateMyScoreRankInput
**def _\_init__**()
Creates a new `Ranking2EstimateMyScoreRankInput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
seasons_to_go_back: int
## Ranking2EstimateScoreRankInput
**def _\_init__**()
Creates a new `Ranking2EstimateScoreRankInput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
seasons_to_go_back: int
score: int
## Ranking2EstimateScoreRankOutput
**def _\_init__**()
Creates a new `Ranking2EstimateScoreRankOutput` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rank: int
length: int
score: int
category: int
season: int
sampling_rate: int
## Ranking2GetByListParam
**def _\_init__**()
Creates a new `Ranking2GetByListParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
offset: int
length: int
sort_flags: int
option_flags: int
seasons_to_go_back: int
## Ranking2GetParam
**def _\_init__**()
Creates a new `Ranking2GetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int = 0
pid: int = 0
category: int
offset: int = 0
count: int = 10
sort_flags: int = 0
option_flags: int = 0
mode: int = 2
seasons_to_go_back: int = 0
## Ranking2Info
**def _\_init__**()
Creates a new `Ranking2Info` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[[Ranking2RankData](#ranking2rankdata)]
lowest_rank: int
num_entries: int
season: int
## Ranking2RankData
**def _\_init__**()
Creates a new `Ranking2RankData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
misc: int
unique_id: int
pid: int
rank: int
score: int
common_data: [Ranking2CommonData](#ranking2commondata) = [Ranking2CommonData](#ranking2commondata)()
## Ranking2ScoreData
**def _\_init__**()
Creates a new `Ranking2ScoreData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
misc: int
category: int
score: int
================================================
FILE: docs/reference/nex/ranking_mk8.md
================================================
# Module: nintendo.nex.ranking_mk8
Provides a client and server for the `RankingProtocolMK8`. This page was generated automatically from `ranking_mk8.proto`.
**class** [RankingClientMK8](#rankingclientmk8)
The client for the `RankingProtocolMK8`.
**class** [RankingServerMK8](#rankingservermk8)
The server for the `RankingProtocolMK8`.
**class** [RankingMode](#rankingmode)
**class** [RankingOrderCalc](#rankingordercalc)
**class** [RankingStatFlags](#rankingstatflags)
**class** [CompetitionRankingInfo](#competitionrankinginfo)([Structure](common.md))
**class** [CompetitionRankingInfoGetParam](#competitionrankinginfogetparam)([Structure](common.md))
**class** [CompetitionRankingUploadScoreParam](#competitionrankinguploadscoreparam)([Structure](common.md))
**class** [RankingCachedResult](#rankingcachedresult)([RankingResult](#rankingresult))
**class** [RankingChangeAttributesParam](#rankingchangeattributesparam)([Structure](common.md))
**class** [RankingOrderParam](#rankingorderparam)([Structure](common.md))
**class** [RankingRankData](#rankingrankdata)([Structure](common.md))
**class** [RankingResult](#rankingresult)([Structure](common.md))
**class** [RankingScoreData](#rankingscoredata)([Structure](common.md))
**class** [RankingStats](#rankingstats)([Structure](common.md))
## RankingClientMK8
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`RankingClientMK8`](#rankingclientmk8).
**async def upload_score**(score_data: [RankingScoreData](#rankingscoredata), unique_id: int) -> None
Calls method `1` on the server.
**async def delete_score**(category: int, unique_id: int) -> None
Calls method `2` on the server.
**async def delete_all_scores**(unique_id: int) -> None
Calls method `3` on the server.
**async def upload_common_data**(common_data: bytes, unique_id: int) -> None
Calls method `4` on the server.
**async def delete_common_data**(unique_id: int) -> None
Calls method `5` on the server.
**async def get_common_data**(unique_id: int) -> bytes
Calls method `6` on the server.
**async def change_attributes**(category: int, param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Calls method `7` on the server.
**async def change_all_attributes**(param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Calls method `8` on the server.
**async def get_ranking**(mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int, pid: int) -> [RankingResult](#rankingresult)
Calls method `9` on the server.
**async def get_approx_order**(category: int, order: [RankingOrderParam](#rankingorderparam), score: int, unique_id: int, pid: int) -> int
Calls method `10` on the server.
**async def get_stats**(category: int, order: [RankingOrderParam](#rankingorderparam), flags: int) -> [RankingStats](#rankingstats)
Calls method `11` on the server.
**async def get_ranking_by_pid_list**(pids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Calls method `12` on the server.
**async def get_ranking_by_unique_id_list**(ids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Calls method `13` on the server.
**async def upload_competition_ranking_score**(param: [CompetitionRankingUploadScoreParam](#competitionrankinguploadscoreparam)) -> bool
Calls method `15` on the server.
**async def get_competition_info**(param: [CompetitionRankingInfoGetParam](#competitionrankinginfogetparam)) -> list[[CompetitionRankingInfo](#competitionrankinginfo)]
Calls method `16` on the server.
## RankingServerMK8
**def _\_init__**()
Creates a new [`RankingServerMK8`](#rankingservermk8).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def upload_score**(client: [RMCClient](rmc.md#rmcclient), score_data: [RankingScoreData](#rankingscoredata), unique_id: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def delete_score**(client: [RMCClient](rmc.md#rmcclient), category: int, unique_id: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def delete_all_scores**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def upload_common_data**(client: [RMCClient](rmc.md#rmcclient), common_data: bytes, unique_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def get_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> bytes
Handler for method `6`. This method should be overridden by a subclass.
**async def change_attributes**(client: [RMCClient](rmc.md#rmcclient), category: int, param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Handler for method `7`. This method should be overridden by a subclass.
**async def change_all_attributes**(client: [RMCClient](rmc.md#rmcclient), param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def get_ranking**(client: [RMCClient](rmc.md#rmcclient), mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int, pid: int) -> [RankingResult](#rankingresult)
Handler for method `9`. This method should be overridden by a subclass.
**async def get_approx_order**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam), score: int, unique_id: int, pid: int) -> int
Handler for method `10`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam), flags: int) -> [RankingStats](#rankingstats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_ranking_by_pid_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_ranking_by_unique_id_list**(client: [RMCClient](rmc.md#rmcclient), ids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Handler for method `13`. This method should be overridden by a subclass.
**async def upload_competition_ranking_score**(client: [RMCClient](rmc.md#rmcclient), param: [CompetitionRankingUploadScoreParam](#competitionrankinguploadscoreparam)) -> bool
Handler for method `15`. This method should be overridden by a subclass.
**async def get_competition_info**(client: [RMCClient](rmc.md#rmcclient), param: [CompetitionRankingInfoGetParam](#competitionrankinginfogetparam)) -> list[[CompetitionRankingInfo](#competitionrankinginfo)]
Handler for method `16`. This method should be overridden by a subclass.
## RankingMode
This class defines the following constants:
`GLOBAL = 0`
`GLOBAL_AROUND_SELF = 1`
`SELF = 4`
## RankingOrderCalc
This class defines the following constants:
`STANDARD = 0`
`ORDINAL = 1`
## RankingStatFlags
This class defines the following constants:
`RANKING_COUNT = 1`
`TOTAL_SCORE = 2`
`LOWEST_SCORE = 4`
`HIGHEST_SCORE = 8`
`AVERAGE_SCORE = 16`
`ALL = 31`
## CompetitionRankingInfo
**def _\_init__**()
Creates a new `CompetitionRankingInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
num_participants: int
team_scores: list[int]
## CompetitionRankingInfoGetParam
**def _\_init__**()
Creates a new `CompetitionRankingInfoGetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rank_order: int
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## CompetitionRankingUploadScoreParam
**def _\_init__**()
Creates a new `CompetitionRankingUploadScoreParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
season_id: int
unk3: int
score: int
team_id: int
team_score: int
is_first_upload: bool
metadata: bytes
## RankingCachedResult
**def _\_init__**()
Creates a new `RankingCachedResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
created_time: [DateTime](common.md#datetime)
expired_time: [DateTime](common.md#datetime)
max_length: int
## RankingChangeAttributesParam
**def _\_init__**()
Creates a new `RankingChangeAttributesParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flags: int
groups: list[int]
param: int
## RankingOrderParam
**def _\_init__**()
Creates a new `RankingOrderParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
order_calc: int = 0
group_index: int = 255
group_num: int = 0
time_scope: int = 2
offset: int = 0
count: int = 10
## RankingRankData
**def _\_init__**()
Creates a new `RankingRankData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
unique_id: int
rank: int
category: int
score: int
groups: list[int]
param: int
common_data: bytes
If `nex.version` >= 40000:
update_time: [DateTime](common.md#datetime)
## RankingResult
**def _\_init__**()
Creates a new `RankingResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[[RankingRankData](#rankingrankdata)]
total: int
since_time: [DateTime](common.md#datetime)
## RankingScoreData
**def _\_init__**()
Creates a new `RankingScoreData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
score: int
order: int
update_mode: int
groups: list[int]
param: int
## RankingStats
**def _\_init__**()
Creates a new `RankingStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
stats: list[float]
================================================
FILE: docs/reference/nex/ranking_mk8d.md
================================================
# Module: nintendo.nex.ranking_mk8d
Provides a client and server for the `RankingProtocolMK8D`. This page was generated automatically from `ranking_mk8d.proto`.
**class** [RankingClientMK8D](#rankingclientmk8d)
The client for the `RankingProtocolMK8D`.
**class** [RankingServerMK8D](#rankingservermk8d)
The server for the `RankingProtocolMK8D`.
**class** [RankingMode](#rankingmode)
**class** [RankingOrderCalc](#rankingordercalc)
**class** [RankingStatFlags](#rankingstatflags)
**class** [CommonDataList](#commondatalist)([Structure](common.md))
**class** [CompetitionRankingGetScoreParam](#competitionrankinggetscoreparam)([Structure](common.md))
**class** [CompetitionRankingInfo](#competitionrankinginfo)([Structure](common.md))
**class** [CompetitionRankingInfoGetParam](#competitionrankinginfogetparam)([Structure](common.md))
**class** [CompetitionRankingScoreData](#competitionrankingscoredata)([Structure](common.md))
**class** [CompetitionRankingScoreInfo](#competitionrankingscoreinfo)([Structure](common.md))
**class** [CompetitionRankingUploadScoreParam](#competitionrankinguploadscoreparam)([Structure](common.md))
**class** [RankingCachedResult](#rankingcachedresult)([RankingResult](#rankingresult))
**class** [RankingChangeAttributesParam](#rankingchangeattributesparam)([Structure](common.md))
**class** [RankingOrderParam](#rankingorderparam)([Structure](common.md))
**class** [RankingRankData](#rankingrankdata)([Structure](common.md))
**class** [RankingResult](#rankingresult)([Structure](common.md))
**class** [RankingScoreData](#rankingscoredata)([Structure](common.md))
**class** [RankingStats](#rankingstats)([Structure](common.md))
**class** [ScorePack](#scorepack)([Structure](common.md))
## RankingClientMK8D
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`RankingClientMK8D`](#rankingclientmk8d).
**async def upload_score**(score_data: [RankingScoreData](#rankingscoredata), unique_id: int) -> None
Calls method `1` on the server.
**async def delete_score**(category: int, unique_id: int) -> None
Calls method `2` on the server.
**async def delete_all_scores**(unique_id: int) -> None
Calls method `3` on the server.
**async def upload_common_data**(common_data: bytes, unique_id: int) -> None
Calls method `4` on the server.
**async def delete_common_data**(unique_id: int) -> None
Calls method `5` on the server.
**async def get_common_data**(unique_id: int) -> bytes
Calls method `6` on the server.
**async def change_attributes**(category: int, param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Calls method `7` on the server.
**async def change_all_attributes**(param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Calls method `8` on the server.
**async def get_ranking**(mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int, pid: int) -> [RankingResult](#rankingresult)
Calls method `9` on the server.
**async def get_approx_order**(category: int, order: [RankingOrderParam](#rankingorderparam), score: int, unique_id: int, pid: int) -> int
Calls method `10` on the server.
**async def get_stats**(category: int, order: [RankingOrderParam](#rankingorderparam), flags: int) -> [RankingStats](#rankingstats)
Calls method `11` on the server.
**async def get_ranking_by_pid_list**(pids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Calls method `12` on the server.
**async def get_ranking_by_unique_id_list**(ids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Calls method `13` on the server.
**async def get_cached_topx_ranking**(category: int, order: [RankingOrderParam](#rankingorderparam)) -> [RankingCachedResult](#rankingcachedresult)
Calls method `14` on the server.
**async def get_cached_topx_rankings**(categories: list[int], order: list[[RankingOrderParam](#rankingorderparam)]) -> list[[RankingCachedResult](#rankingcachedresult)]
Calls method `15` on the server.
**async def get_competition_ranking_score**(param: [CompetitionRankingGetScoreParam](#competitionrankinggetscoreparam)) -> list[[CompetitionRankingScoreInfo](#competitionrankingscoreinfo)]
Calls method `16` on the server.
**async def upload_competition_ranking_score**(param: [CompetitionRankingUploadScoreParam](#competitionrankinguploadscoreparam)) -> bool
Calls method `17` on the server.
**async def get_competition_info**(param: [CompetitionRankingInfoGetParam](#competitionrankinginfogetparam)) -> list[[CompetitionRankingInfo](#competitionrankinginfo)]
Calls method `18` on the server.
**async def upload_score_pack**(score_data: [RankingScoreData](#rankingscoredata), metadata: bytes) -> None
Calls method `19` on the server.
**async def get_score_pack**(pids: list[int], category: int) -> [ScorePack](#scorepack)
Calls method `20` on the server.
**async def get_commmon_data_by_pid_list**(pids: list[int]) -> [CommonDataList](#commondatalist)
Calls method `22` on the server.
## RankingServerMK8D
**def _\_init__**()
Creates a new [`RankingServerMK8D`](#rankingservermk8d).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def upload_score**(client: [RMCClient](rmc.md#rmcclient), score_data: [RankingScoreData](#rankingscoredata), unique_id: int) -> None
Handler for method `1`. This method should be overridden by a subclass.
**async def delete_score**(client: [RMCClient](rmc.md#rmcclient), category: int, unique_id: int) -> None
Handler for method `2`. This method should be overridden by a subclass.
**async def delete_all_scores**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def upload_common_data**(client: [RMCClient](rmc.md#rmcclient), common_data: bytes, unique_id: int) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def delete_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def get_common_data**(client: [RMCClient](rmc.md#rmcclient), unique_id: int) -> bytes
Handler for method `6`. This method should be overridden by a subclass.
**async def change_attributes**(client: [RMCClient](rmc.md#rmcclient), category: int, param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Handler for method `7`. This method should be overridden by a subclass.
**async def change_all_attributes**(client: [RMCClient](rmc.md#rmcclient), param: [RankingChangeAttributesParam](#rankingchangeattributesparam), unique_id: int) -> None
Handler for method `8`. This method should be overridden by a subclass.
**async def get_ranking**(client: [RMCClient](rmc.md#rmcclient), mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int, pid: int) -> [RankingResult](#rankingresult)
Handler for method `9`. This method should be overridden by a subclass.
**async def get_approx_order**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam), score: int, unique_id: int, pid: int) -> int
Handler for method `10`. This method should be overridden by a subclass.
**async def get_stats**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam), flags: int) -> [RankingStats](#rankingstats)
Handler for method `11`. This method should be overridden by a subclass.
**async def get_ranking_by_pid_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Handler for method `12`. This method should be overridden by a subclass.
**async def get_ranking_by_unique_id_list**(client: [RMCClient](rmc.md#rmcclient), ids: list[int], mode: int, category: int, order: [RankingOrderParam](#rankingorderparam), unique_id: int) -> [RankingResult](#rankingresult)
Handler for method `13`. This method should be overridden by a subclass.
**async def get_cached_topx_ranking**(client: [RMCClient](rmc.md#rmcclient), category: int, order: [RankingOrderParam](#rankingorderparam)) -> [RankingCachedResult](#rankingcachedresult)
Handler for method `14`. This method should be overridden by a subclass.
**async def get_cached_topx_rankings**(client: [RMCClient](rmc.md#rmcclient), categories: list[int], order: list[[RankingOrderParam](#rankingorderparam)]) -> list[[RankingCachedResult](#rankingcachedresult)]
Handler for method `15`. This method should be overridden by a subclass.
**async def get_competition_ranking_score**(client: [RMCClient](rmc.md#rmcclient), param: [CompetitionRankingGetScoreParam](#competitionrankinggetscoreparam)) -> list[[CompetitionRankingScoreInfo](#competitionrankingscoreinfo)]
Handler for method `16`. This method should be overridden by a subclass.
**async def upload_competition_ranking_score**(client: [RMCClient](rmc.md#rmcclient), param: [CompetitionRankingUploadScoreParam](#competitionrankinguploadscoreparam)) -> bool
Handler for method `17`. This method should be overridden by a subclass.
**async def get_competition_info**(client: [RMCClient](rmc.md#rmcclient), param: [CompetitionRankingInfoGetParam](#competitionrankinginfogetparam)) -> list[[CompetitionRankingInfo](#competitionrankinginfo)]
Handler for method `18`. This method should be overridden by a subclass.
**async def upload_score_pack**(client: [RMCClient](rmc.md#rmcclient), score_data: [RankingScoreData](#rankingscoredata), metadata: bytes) -> None
Handler for method `19`. This method should be overridden by a subclass.
**async def get_score_pack**(client: [RMCClient](rmc.md#rmcclient), pids: list[int], category: int) -> [ScorePack](#scorepack)
Handler for method `20`. This method should be overridden by a subclass.
**async def get_commmon_data_by_pid_list**(client: [RMCClient](rmc.md#rmcclient), pids: list[int]) -> [CommonDataList](#commondatalist)
Handler for method `22`. This method should be overridden by a subclass.
## RankingMode
This class defines the following constants:
`GLOBAL = 0`
`GLOBAL_AROUND_SELF = 1`
`SELF = 4`
## RankingOrderCalc
This class defines the following constants:
`STANDARD = 0`
`ORDINAL = 1`
## RankingStatFlags
This class defines the following constants:
`RANKING_COUNT = 1`
`TOTAL_SCORE = 2`
`LOWEST_SCORE = 4`
`HIGHEST_SCORE = 8`
`AVERAGE_SCORE = 16`
`ALL = 31`
## CommonDataList
**def _\_init__**()
Creates a new `CommonDataList` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[bytes]
## CompetitionRankingGetScoreParam
**def _\_init__**()
Creates a new `CompetitionRankingGetScoreParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## CompetitionRankingInfo
**def _\_init__**()
Creates a new `CompetitionRankingInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
num_participants: int
team_scores: list[int]
## CompetitionRankingInfoGetParam
**def _\_init__**()
Creates a new `CompetitionRankingInfoGetParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rank_order: int
range: [ResultRange](common.md#resultrange) = [ResultRange](common.md#resultrange)()
## CompetitionRankingScoreData
**def _\_init__**()
Creates a new `CompetitionRankingScoreData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
rank: int
pid: int
score: int
last_update: [DateTime](common.md#datetime)
team_id: int = 255
metadata: bytes
## CompetitionRankingScoreInfo
**def _\_init__**()
Creates a new `CompetitionRankingScoreInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
season_id: int
scores: list[[CompetitionRankingScoreData](#competitionrankingscoredata)]
num_participants: int
team_scores: list[int]
## CompetitionRankingUploadScoreParam
**def _\_init__**()
Creates a new `CompetitionRankingUploadScoreParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
id: int
season_id: int
unk3: int
score: int
team_id: int
team_score: int
is_first_upload: bool
metadata: bytes
## RankingCachedResult
**def _\_init__**()
Creates a new `RankingCachedResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
created_time: [DateTime](common.md#datetime)
expired_time: [DateTime](common.md#datetime)
max_length: int
## RankingChangeAttributesParam
**def _\_init__**()
Creates a new `RankingChangeAttributesParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
flags: int
groups: list[int]
param: int
## RankingOrderParam
**def _\_init__**()
Creates a new `RankingOrderParam` instance. Required fields must be filled in manually.
The following fields are defined in this class:
order_calc: int = 0
group_index: int = 255
group_num: int = 0
time_scope: int = 2
offset: int = 0
count: int = 10
## RankingRankData
**def _\_init__**()
Creates a new `RankingRankData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
pid: int
unique_id: int
rank: int
category: int
score: int
groups: list[int]
param: int
common_data: bytes
If `nex.version` >= 40000:
update_time: [DateTime](common.md#datetime)
## RankingResult
**def _\_init__**()
Creates a new `RankingResult` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[[RankingRankData](#rankingrankdata)]
total: int
since_time: [DateTime](common.md#datetime)
## RankingScoreData
**def _\_init__**()
Creates a new `RankingScoreData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
category: int
score: int
order: int
update_mode: int
groups: list[int]
param: int
## RankingStats
**def _\_init__**()
Creates a new `RankingStats` instance. Required fields must be filled in manually.
The following fields are defined in this class:
stats: list[float]
## ScorePack
**def _\_init__**()
Creates a new `ScorePack` instance. Required fields must be filled in manually.
The following fields are defined in this class:
data: list[bytes]
================================================
FILE: docs/reference/nex/remotelog.md
================================================
# Module: nintendo.nex.remotelog
Provides a client and server for the `RemoteLogDeviceProtocol`. This page was generated automatically from `remotelog.proto`.
**class** [RemoteLogDeviceClient](#remotelogdeviceclient)
The client for the `RemoteLogDeviceProtocol`.
**class** [RemoteLogDeviceServer](#remotelogdeviceserver)
The server for the `RemoteLogDeviceProtocol`.
## RemoteLogDeviceClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`RemoteLogDeviceClient`](#remotelogdeviceclient).
**async def log**(message: str) -> None
Calls method `1` on the server.
## RemoteLogDeviceServer
**def _\_init__**()
Creates a new [`RemoteLogDeviceServer`](#remotelogdeviceserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def log**(client: [RMCClient](rmc.md#rmcclient), message: str) -> None
Handler for method `1`. This method should be overridden by a subclass.
================================================
FILE: docs/reference/nex/rmc.md
================================================
# Module: nintendo.nex.rmc
Provides a client and server for the RMC protocol. An alternative client that calls remote methods through HTTP can be found in the [`nintendo.nex.hpp`](hpp.md) module.
**class** RMCResponse
Generic response object that is returned when a remote method returns multiple values. The attributes depend on the method.
**class** [RMCClient](#rmcclient)
RMC client that uses a PRUDP connection.
**async with connect**(settings: [Settings](settings.md#settings), host: str, port: int, vport: int = 1, context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext) = None, credentials: [Credentials](kerberos.md#credentials) = None, servers: list[object] = []) -> [RMCClient](#rmcclient)
Creates an RMC client based on PRUDP and connects it to the given address. If `context` is provided, and the underlying transport supports this, the connections is secured with TLS. If credentials are provided they are sent to the server in the connection request. Blocks until the connection is ready and handshake has been performed. `servers` must be a list of service implementations.
**async with serve**(settings: [Settings](settings.md#settings), servers: list[object], host: str = "", port: int = 0, vport: int = 1, context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext) = None, key: bytes = None) -> None
Creates an RMC server based on PRUDP and binds it to the given address. If `host` is empty, the local address of the default interface is used. If `port` is 0, it is chosen by the operating system. If `context` is provided, and the underlying transport supports this, the server is secured with TLS. If `key` is provided it is used to decrypt the Kerberos tickets in connection requests. If `key` is `None`, the payload of connection requests is ignored and all client connections are accepted. `servers` must be a list of service implementations.
**async with serve_on_transport**(settings: [Settings](settings.md#settings), servers: list[object], transport: [PRUDPServerTransport](prudp.md#prudpservertransport), port: int, key: bytes = None) -> None
Creates an RMC server on top of the given transport server. If `key` is provided it is used to decrypt the Kerberos tickets in connection requests. If `key` is `None`, the payload of connection requests is ignored and all client connections are accepted. `servers` must be a list of service implementations.
## RMCClient
**async def request**(protocol: int, method: int, body: bytes, noresponse: bool = False) -> bytes
Performs a remote method call. Blocks until the RMC is complete. Returns the body of the RMC response on success. Raises [`RMCError`](common.md#rmcerror) if the server returns an error code.
If `noresponse` is `True`, this method does not wait for a response and returns `None` immediately.
**async def close**() -> None
Closes the connection forcefully by sending an unreliable disconnect packet three times.
**async def disconnect**() -> None
Closes the connection gracefully by sending a reliable disconnect packet.
**def pid**() -> int
Returns the user id of the connected client. Returns `None` if the client is connected without credentials.
**def local_address**() -> tuple[str, int]
Returns the local address of the client.
**def remote_address**() -> tuple[str, int]
Returns the address that the client is connected to.
**def local_sid**() -> int
Returns the local stream id (PRUDP port).
**def remote_sid**() -> int
Returns the remote stream id (PRUDP port).
================================================
FILE: docs/reference/nex/screening.md
================================================
# Module: nintendo.nex.screening
Provides a client and server for the `ScreeningProtocol`. This page was generated automatically from `screening.proto`.
**class** [ScreeningClient](#screeningclient)
The client for the `ScreeningProtocol`.
**class** [ScreeningServer](#screeningserver)
The server for the `ScreeningProtocol`.
## ScreeningClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`ScreeningClient`](#screeningclient).
## ScreeningServer
**def _\_init__**()
Creates a new [`ScreeningServer`](#screeningserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
================================================
FILE: docs/reference/nex/secure.md
================================================
# Module: nintendo.nex.secure
Provides a client and server for the `SecureConnectionProtocol`. This page was generated automatically from `secure.proto`.
**class** [SecureConnectionClient](#secureconnectionclient)
The client for the `SecureConnectionProtocol`.
**class** [SecureConnectionServer](#secureconnectionserver)
The server for the `SecureConnectionProtocol`.
**class** [ConnectionData](#connectiondata)([Structure](common.md))
**class** [NintendoLoginData](#nintendologindata)([Structure](common.md))
## SecureConnectionClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`SecureConnectionClient`](#secureconnectionclient).
**async def register**(urls: list[[StationURL](common.md#stationurl)]) -> [RMCResponse](common.md)
Calls method `1` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
connection_id: int
public_station: [StationURL](common.md#stationurl)
**async def request_connection_data**(cid: int, pid: int) -> [RMCResponse](common.md)
Calls method `2` on the server. The RMC response has the following attributes:
result: bool
connection_data: list[[ConnectionData](#connectiondata)]
**async def request_urls**(cid: int, pid: int) -> [RMCResponse](common.md)
Calls method `3` on the server. The RMC response has the following attributes:
result: bool
urls: list[[StationURL](common.md#stationurl)]
**async def register_ex**(urls: list[[StationURL](common.md#stationurl)], login_data: [Data](common.md)) -> [RMCResponse](common.md)
Calls method `4` on the server. The RMC response has the following attributes:
result: [Result](common.md#result)
connection_id: int
public_station: [StationURL](common.md#stationurl)
**async def test_connectivity**() -> None
Calls method `5` on the server.
**async def update_urls**(urls: list[[StationURL](common.md#stationurl)]) -> None
Calls method `6` on the server.
**async def replace_url**(url: [StationURL](common.md#stationurl), new: [StationURL](common.md#stationurl)) -> None
Calls method `7` on the server.
**async def send_report**(report_id: int, data: bytes) -> None
Calls method `8` on the server.
## SecureConnectionServer
**def _\_init__**()
Creates a new [`SecureConnectionServer`](#secureconnectionserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def register**(client: [RMCClient](rmc.md#rmcclient), urls: list[[StationURL](common.md#stationurl)]) -> [RMCResponse](common.md)
Handler for method `1`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
connection_id: int
public_station: [StationURL](common.md#stationurl)
**async def request_connection_data**(client: [RMCClient](rmc.md#rmcclient), cid: int, pid: int) -> [RMCResponse](common.md)
Handler for method `2`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
connection_data: list[[ConnectionData](#connectiondata)]
**async def request_urls**(client: [RMCClient](rmc.md#rmcclient), cid: int, pid: int) -> [RMCResponse](common.md)
Handler for method `3`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: bool
urls: list[[StationURL](common.md#stationurl)]
**async def register_ex**(client: [RMCClient](rmc.md#rmcclient), urls: list[[StationURL](common.md#stationurl)], login_data: [Data](common.md)) -> [RMCResponse](common.md)
Handler for method `4`. This method should be overridden by a subclass. The RMC response must have the following attributes:
result: [Result](common.md#result)
connection_id: int
public_station: [StationURL](common.md#stationurl)
**async def test_connectivity**(client: [RMCClient](rmc.md#rmcclient)) -> None
Handler for method `5`. This method should be overridden by a subclass.
**async def update_urls**(client: [RMCClient](rmc.md#rmcclient), urls: list[[StationURL](common.md#stationurl)]) -> None
Handler for method `6`. This method should be overridden by a subclass.
**async def replace_url**(client: [RMCClient](rmc.md#rmcclient), url: [StationURL](common.md#stationurl), new: [StationURL](common.md#stationurl)) -> None
Handler for method `7`. This method should be overridden by a subclass.
**async def send_report**(client: [RMCClient](rmc.md#rmcclient), report_id: int, data: bytes) -> None
Handler for method `8`. This method should be overridden by a subclass.
## ConnectionData
**def _\_init__**()
Creates a new `ConnectionData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
station: [StationURL](common.md#stationurl)
connection_id: int
## NintendoLoginData
**def _\_init__**()
Creates a new `NintendoLoginData` instance. Required fields must be filled in manually.
The following fields are defined in this class:
token: str
================================================
FILE: docs/reference/nex/settings.md
================================================
# Module: nintendo.nex.settings
Defines settings for `nex` classes.
**class** [Settings](#settings)
Holds the settings.
**def default**() -> [Settings](#settings)
Creates a settings object with default settings.
**def load**(name: str) -> [Settings](#settings)
Loads the settings from the given configuration file. The following files are provided:
`- 3ds`: provides reasonable defaults for 3DS applications.
`- default`: provides reasonable defaults for Wii U applications.
`- friends`: provides reasonable defaults for the 3DS / Wii U friend server.
`- switch`: provides reasonable defaults for Switch applications.
## Settings
TRANSPORT_UDP (0)
TRANSPORT_TCP (1)
TRANSPORT_WEBSOCKET (2)
COMPRESSION_NONE (0)
COMPRESSION_ZLIB (1)
ENCRYPTION_NONE (0)
ENCRYPTION_RC4 (1)
**def _\_getitem__**(name: str) -> object
Returns the value of a specific setting.
**def _\_setitem__**(name: str, value: object) -> None
Changes the value of a specific setting. The value is automatically converted to the appropriate type.
**def configure**(access_key: str, nex_version: int, client_version: int = None) -> None
Configures the `prudp.access_key`, `nex.version` and `nex.client_version` settings.
**def reset**() -> None
Resets all fields back to their defaults.
**def copy**() -> [Settings](#settings)
Returns a copy of the settings object.
**def load**(name: str) -> None
Loads the settings from the given configuration file and applies them on top of the current settings. Only the settings that are defined in the file are replaced.
## Fields
The following fields are currently defined:
nex.version: int = 0
The version of the `nex` library.
nex.client_version: int = 0
The client version sent to the server in `ValidateAndRequestTicketWithParam`.
nex.struct_header: int = 0
Enables structure headers.
nex.pid_size: int = 4
The size of a user id in bytes (`4` or `8`).
prudp.access_key: str = ""
The access key of the game server.
prudp.version: int = 2
The major version of the `prudp` protocol with UDP transport:
`- 0`: both client and server use only `prudp v0`
`- 1`: both client and server use only `prudp v1`
`- 2`: client uses only `prudp v1`, server supports both `v0` and `v1`.
If the transport is different from UDP, the `lite` encoding is always used.
prudp.minor_version: int = 4
The minor version of the `prudp` protocol.
This is only relevant for `prudp v1` and `lite`.
prudp.transport: int = TRANSPORT_UDP
The underlying transport protocol for `prudp`.
prudp.compression: int = COMPRESSION_NONE
The compression algorithm used for data packets.
prudp.encryption: int = ENCRYPTION_RC4
The encryption algorithm used for data packets.
prudp.resend_timeout: float = 1
Time after which a packet is resent if no acknowledgement is received (in seconds).
prudp.resend_limit: int = 2
Number of retransmissions after which the connection is considered dead.
prudp.ping_timeout: float = 5
Time after which a ping packet is sent to keep the connection alive (in seconds).
prudp.fragment_size: int = 1300
The maximum size of a packet payload before it is split up into fragments.
prudp.max_substream_id: int = 0
The maximum substream id in `prudp v1`.
prudp_v0.signature_version: int = 0
The version of the packet signature in the `prudp v0` protocol.
prudp_v0.flags_version: int = 1
The version of the `flags` field in the `prudp v0` protocol.
prudp_v0.checksum_version: int = 1
The version of the checksum algorithm in the `prudp v0` protocol.
kerberos.key_size: int = 32
The size of the session key in bytes.
kerberos.key_derivation: int = 0
The version of the key derivation algorithm for kerberos tickets.
kerberos.ticket_version: int = 1
The version of the internal data in kerberos tickets.
================================================
FILE: docs/reference/nex/streams.md
================================================
# Module: nintendo.nex.streams
Extends [generic memory streams](https://anynet.readthedocs.io/en/latest/reference/streams) with useful `nex` related methods.
**class** StreamOut([anynet.StreamOut](https://anynet.readthedocs.io/en/latest/reference/streams/#streamout))
An output stream that supports various `nex` structures.
**class** StreamIn([anynet.StreamIn](https://anynet.readthedocs.io/en/latest/reference/streams/#streamin))
An input stream that supports various `nex` structures.
## StreamOut
**def _\_init__**(settings: [Settings](settings.md#settings))
Creates a new output stream.
**def pid**(value: int) -> None
Writes a user id into the stream.
**def result**(value: [Result](common.md#result)) -> None
Writes a result into the stream.
**def list**(value: list, func: Callable) -> None
Writes a list into the stream. For example: `stream.list([1, 2, 3], stream.u8)`.
**def map**(value: dict, keyfunc: Callable, valuefunc: Callable) -> None
Writes a map into the stream. For example: `stream.map({"a": 1, "b": 2}, stream.string, stream.u8)`.
**def string**(value: str) -> None
Writes an UTF-8 string into the stream. Automatically adds a null terminator.
**def stationurl**(value: [StationURL](common.md#stationurl)) -> None
Writes a [StationURL](common.md#stationurl) into the stream.
**def datetime**(value: [DateTime](common.md#datetime)) -> None
Writes a [DateTime](common.md#datetime) object into the stream.
**def buffer**(value: bytes) -> None
Writes a buffer into the stream with a 32-bit length field.
**def qbuffer**(value: bytes) -> None
Writes a buffer into the stream with a 16-bit length field.
**def add**(value: [Structure](common.md)) -> None
Writes a `nex` structure into the stream.
**def anydata**(value: object) -> None
Wraps a structure in a data holder and writes it into the stream.
**def variant**(value: object) -> None
Writes a variant into the stream. `value` must be either `None` or an instance of `int`, `float`, `bool`, `str` or [`DateTime`](common.md#datetime).
## StreamIn
**def _\_init__**(data: bytes, settings: [Settings](settings.md#settings))
Creates a new input stream.
**def pid**() -> int
Reads a user id from the stream.
**def result**() -> [Result](common.md#result)
Reads a result from the stream.
**def repeat**(func: Callable, num: int) -> list
Extracts a fixed number of copies of a given type from the stream. For convenience, `func` may also be a subclass of [`Structure`](common.md) instead of a function. For example: `stream.repeat(stream.u8, 5)` or `stream.repeat(ResultRange, 2)`.
**def list**(func: Callable) -> list
Reads a list from the stream. For convenience, `func` may also be a subclass of [`Structure`](common.md) instead of a function. For example: `stream.list(stream.u8)` or `stream.list(ResultRange)`.
**def map**(keyfunc: Callable, valuefunc: Callable) -> dict
Reads a map from the stream. For convenience, `keyfunc` and `valuefunc` may also be a subclass of [`Structure`](common.md) instead of a function. For example: `stream.map(stream.string, ResultRange)`.
**def string**() -> str
Reads a UTF-8 string from the stream. Automatically removes the null terminator.
**def stationurl**() -> [StationURL](common.md#stationurl)
Reads a station url from the stream.
**def datetime**() -> [DateTime](common.md#datetime)
Reads a [DateTime](common.md#datetime) object from the stream.
**def buffer**() -> bytes
Reads a buffer from the stream with a 32-bit length field.
**def qbuffer**() -> bytes
Reads a buffer from the stream with a 16-bit length field.
**def substream**() -> [StreamIn](#streamin)
Reads a buffer from the stream with a 32-bit length field and returns an input stream.
**def extract**(cls: Type[[Structure](common.md)]) -> [Structure](common.md)
Reads a `nex` structure from the stream.
**def anydata**() -> object
Reads a data holder from the stream and returns its content, which is usually a subclass of [`Data`](common.md).
**def variant**() -> object
Reads a variant from the stream.
================================================
FILE: docs/reference/nex/subscriber.md
================================================
# Module: nintendo.nex.subscriber
Provides a client and server for the `SubscriberProtocol`. This page was generated automatically from `subscriber.proto`.
**class** [SubscriberClient](#subscriberclient)
The client for the `SubscriberProtocol`.
**class** [SubscriberServer](#subscriberserver)
The server for the `SubscriberProtocol`.
## SubscriberClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`SubscriberClient`](#subscriberclient).
## SubscriberServer
**def _\_init__**()
Creates a new [`SubscriberServer`](#subscriberserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
================================================
FILE: docs/reference/nex/utility.md
================================================
# Module: nintendo.nex.utility
Provides a client and server for the `UtilityProtocol`. This page was generated automatically from `utility.proto`.
**class** [UtilityClient](#utilityclient)
The client for the `UtilityProtocol`.
**class** [UtilityServer](#utilityserver)
The server for the `UtilityProtocol`.
**class** [UniqueIdInfo](#uniqueidinfo)([Structure](common.md))
## UtilityClient
**def _\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
Creates a new [`UtilityClient`](#utilityclient).
**async def acquire_nex_unique_id**() -> int
Calls method `1` on the server.
**async def acquire_nex_unique_id_with_password**() -> [UniqueIdInfo](#uniqueidinfo)
Calls method `2` on the server.
**async def associate_nex_unique_id_with_my_principal_id**(info: [UniqueIdInfo](#uniqueidinfo)) -> None
Calls method `3` on the server.
**async def associate_nex_unique_ids_with_my_principal_id**(infos: list[[UniqueIdInfo](#uniqueidinfo)]) -> None
Calls method `4` on the server.
**async def get_associated_nex_unique_id_with_my_principal_id**() -> [UniqueIdInfo](#uniqueidinfo)
Calls method `5` on the server.
**async def get_associated_nex_unique_ids_with_my_principal_id**() -> list[[UniqueIdInfo](#uniqueidinfo)]
Calls method `6` on the server.
**async def get_integer_settings**(index: int) -> dict[int, int]
Calls method `7` on the server.
**async def get_string_settings**(index: int) -> dict[int, str]
Calls method `8` on the server.
## UtilityServer
**def _\_init__**()
Creates a new [`UtilityServer`](#utilityserver).
**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
Called whenever a client is disconnected. May be overridden by a subclass.
**async def acquire_nex_unique_id**(client: [RMCClient](rmc.md#rmcclient)) -> int
Handler for method `1`. This method should be overridden by a subclass.
**async def acquire_nex_unique_id_with_password**(client: [RMCClient](rmc.md#rmcclient)) -> [UniqueIdInfo](#uniqueidinfo)
Handler for method `2`. This method should be overridden by a subclass.
**async def associate_nex_unique_id_with_my_principal_id**(client: [RMCClient](rmc.md#rmcclient), info: [UniqueIdInfo](#uniqueidinfo)) -> None
Handler for method `3`. This method should be overridden by a subclass.
**async def associate_nex_unique_ids_with_my_principal_id**(client: [RMCClient](rmc.md#rmcclient), infos: list[[UniqueIdInfo](#uniqueidinfo)]) -> None
Handler for method `4`. This method should be overridden by a subclass.
**async def get_associated_nex_unique_id_with_my_principal_id**(client: [RMCClient](rmc.md#rmcclient)) -> [UniqueIdInfo](#uniqueidinfo)
Handler for method `5`. This method should be overridden by a subclass.
**async def get_associated_nex_unique_ids_with_my_principal_id**(client: [RMCClient](rmc.md#rmcclient)) -> list[[UniqueIdInfo](#uniqueidinfo)]
Handler for method `6`. This method should be overridden by a subclass.
**async def get_integer_settings**(client: [RMCClient](rmc.md#rmcclient), index: int) -> dict[int, int]
Handler for method `7`. This method should be overridden by a subclass.
**async def get_string_settings**(client: [RMCClient](rmc.md#rmcclient), index: int) -> dict[int, str]
Handler for method `8`. This method should be overridden by a subclass.
## UniqueIdInfo
**def _\_init__**()
Creates a new `UniqueIdInfo` instance. Required fields must be filled in manually.
The following fields are defined in this class:
unique_id: int = 0
password: int = 0
================================================
FILE: docs/reference/nnas.md
================================================
# Module: nintendo.nnas
Provides a client for the 3DS/Wii U [account server](https://github.com/kinnay/nintendo/wiki/Account-Server).
**class** NNASError(Exception)
Raised when the server returns an error code.
**class** [NNASClient](#nnasclient)
The account server client.
**def calc_password_hash**(pid: int, password: str) -> str
Calculates the password hash for hash-based authentication and returns the hexdigest.
## NNASClient
**def _\_init__**()
Creates a new account server client.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo CA - G3`, and `Wii U Common Prod 1` is used as the client certificate.
**def set_url**(url: str) -> None
Changes the server to which requests are sent. The default is `account.nintendo.net`.
**def set_client_id**(client_id: str) -> None
Changes the content of the `X-Nintendo-Client-ID` header. The default is `"a2efa818a34fa16b8afbc8a74eba3eda"`.
**def set_client_secret**(client_secret: str) -> None
Changes the content of the `X-Nintendo-Client-Secret` header. The default is `"c91cdb5658bd4954ade78533a339cf9a"`.
**def set_platform_id**(platform_id: int) -> None
Changes the content of the `X-Nintendo-Platform-ID` header. The default is `1` (Wii U).
**def set_device_type**(device_type: int) -> None
Changes the content of the `X-Nintendo-Device-Type` header. The default is `2` (retail).
**def set_fpd_version**(version: int) -> None
Changes the content of the `X-Nintendo-FPD-Version` header. The default is `0`.
**def set_environment**(environment: str) -> None
Changes the content of the `X-Nintendo-Environment` header. The default is `"L1"` (production).
**def set_device**(device_id: int, serial_number: str, system_version: int, cert: str = None) -> None
Changes the `X-Nintendo-Device-ID`, `X-Nintendo-Serial-Number`, `X-Nintendo-System-Version` and `X-Nintendo-Device-Cert` headers. By default, the system version is set to `0x260` and the other headers are omitted.
**def set_locale**(region: int, country: str, language: str) -> None
Changes the `X-Nintendo-Region`, `X-Nintendo-Country` and `Accept-Language` headers. By default, the region is `4` (Europe), the country is `"NL"` (Netherlands) and the language is `"en"` (English).
**def set_title**(title_id: int, title_version: int) -> None
Changes the `X-Nintendo-Title-ID` and `X-Nintendo-Application-Version` headers. The `X-Nintendo-Unique-ID` header is also derived from the title id. By default, these headers are omitted.
**async def login**(username: str, password: str, password_type: str = None) -> [OAuth20](#oauth20)
Logs in on the account server. This method must be called prior to any method that accesses your account data.
**async def get_nex_token**(access_token: str, game_server_id: int) -> [NexToken](#nextoken)
Requests a `nex` token for the given game server.
**async def get_service_token**(access_token: str, client_id: str) -> str
Requests an independent service token for the given client id.
**async def get_profile**(access_token: str) -> [Profile](#profile)
Requests your profile.
**async def get_miis**(pids: list[int]) -> list[[Mii](#mii)]
Requests the miis for the given user ids.
**async def get_pids**(nnids: list[str]) -> dict[str, int]
Requests the user ids for the given Nintendo Network IDs.
**async def get_nnids**(pids: list[int]) -> dict[int, str]
Requests the Nintendo Network IDs for the given user ids.
**async def get_pid**(nnid: str) -> int
Requests the user id for the given Nintendo Network ID.
**async def get_nnid**(pid: int) -> str
Requests the Nintendo Network ID for the given user id.
## Account
`domain: str`
`type: str`
`username: str`
## DeviceAttribute
`created_date: datetime.datetime`
`name: str`
`value: str`
## Email
`id: int`
`address: str`
`primary: bool`
`parent: bool`
`reachable: bool`
`type: str`
`validated: bool`
`validated_date: datetime.datetime`
## Mii
`data: bytes`
`id: int`
`name: str`
`images: list[MiiImage]`
`primary: bool`
`pid: int`
`nnid: str`
## MiiImage
`id: int`
`type: str`
`url: str`
`cached_url: str`
## NexToken
`host: str`
`port: int`
`pid: int`
`password: str`
`token: str`
## OAuth20
`token: str`
`refresh_token: str`
`expires_in: int`
## Profile
accounts: list[[Account](#account)]
`active_flag: bool`
`birth_date: datetime.datetime`
`country: str`
`create_date: datetime.datetime`
device_attributes: list[[DeviceAttribute](#deviceattribute)]
`forgot_pw_email_sent: datetime.datetime`
`gender: str`
`language: str`
`updated: datetime.datetime`
`marketing_flag: bool`
`off_device_flag: bool`
`pid: int`
email: [Email](#email)
mii: [ProfileMii](#profilemii)
`region: int`
`temporary_password_expiration: datetime.datetime`
`tz_name: str`
`nnid: str`
`utc_offset: int`
## ProfileMii
`id: int`
`name: str`
`data: bytes`
`primary: bool`
`status: str`
`hash: str`
images: list[[MiiImage](#miiimage)]
================================================
FILE: docs/reference/switch/aauth.md
================================================
# Module: nintendo.switch.aauth
Provides a client for the [application authentication server](https://github.com/kinnay/nintendo/wiki/AAuth-Server).
**class** [AAuthError](#aautherror)(Exception)
Raised when the `aauth` server returns an error code.
**class** [AAuthClient](#aauthclient)
The `aauth` client.
## AAuthError
This exception is raised when the `aauth` server returns an error code. The following constants are defined in this class:
`DEVICE_TOKEN_EXPIRED: int = 103`
`ROMID_BANNED: int = 105`
`UNAUTHORIZED_APPLICATION: int = 106`
`SERVICE_CLOSED: int = 109`
`APPLICATION_UPDATE_REQUIRED: int = 111`
`INTERNAL_SERVER_ERROR: int = 112`
`GENERIC: int = 118`
`REGION_MISMATCH: int = 121`
The error can be inspected using the following attributes:
response: [HTTPResponse](https://anynet.readthedocs.io/en/latest/reference/http/#httpresponse)
`code: int`
`message: str`
## AAuthClient
**def _\_init__**()
Creates a new `aauth` client.
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo CA - G3` or `Nintendo Root CA - G4`, depending on the specified system version.
**def set_certificate**(cert: [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscertificate), key: [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls/#tlsprivatekey)) -> None
Changes the client certificate of the current TLS context. When `aauth.hac.lp1.ndas.srv.nintendo.net` is used, which is the case on system version 20.0.0 and later, the server rejects all requests without a valid client certificate.
**def set_host**(url: str) -> None
Changes the server to which the HTTP requests are sent. The default is `aauth-lp1.ndas.srv.nintendo.net` or `aauth.hac.lp1.ndas.srv.nintendo.net`, depending on the specified system version.
**def set_power_state**(state: str) -> None
Changes the content of the `X-Nintendo-PowerState` header. The default is `"FA"`.
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` indicates system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def get_time**() -> tuple[int, str]
Requests the current server time with `/v1/time`. Returns a tuple that contains the current server time and your public IP address.
**async def challenge**(device_token: str) -> dict
Requests a challenge from the `aauth` server. The device token can be obtained from the [`dauth server`](dauth.md). The challenge is used for gamecard authentication.
**async def auth_system**(title_id: int, title_version: int, device_token: str) -> dict
Requests an application token from the `aauth` server for a system title. The device token can be obtained from the [`dauth server`](dauth.md).
**async def auth_digital**(title_id: int, title_version: int, device_token: str, cert: bytes | str) -> dict
Requests an application token from the `aauth` server for a digital title. The device token can be obtained from the [`dauth server`](dauth.md). Prior to system version `15.0.0`, the `cert` parameter must contain the raw ticket (which can be dumped with nxdumptool). In system version `15.0.0` and later, it must contain a contents authorization token instead (which can be obtained from the [`dragons server`](dragons.md)).
**async def auth_gamecard**(title_id: int, title_version: int, device_token: str, cert: bytes, gvt: bytes, challenge: str = None, challenge_src: str = None) -> dict
Requests an application token from the `aauth` server for a gamecard. The device token can be obtained from the [`dauth server`](dauth.md). The certificate can be obtained with nxdumptool. The `gvt` parameter must contain the challenge response. Unless you have the [Lotus](https://switchbrew.org/wiki/Lotus3) encryption keys, the challenge cannot be solved offline, but EpicUsername12 made [a tool](https://github.com/EpicUsername12/nx-netauth-link) that solves the challenge on a real Switch.
The `challenge` and `challenge_src` parameters are required on system version 19.0.1 and later.
**async def auth_nocert**(title_id: int, title_version: int, device_token): str -> dict
Requests an application token from the `aauth` server for a title for which no ticket was found on the Switch.
WARNING: Do not use `auth_nocert` on a production server, because it will immediately ban your Switch.
================================================
FILE: docs/reference/switch/atumn.md
================================================
# Module: nintendo.switch.atumn
Provides a client for the [system update content server](https://github.com/kinnay/nintendo/wiki/Atumn-Server).
**class** [AtumnClient](#atumnclient)
The `atumn` client.
## AtumnClient
**def _\_init__**(device_id: int)
Creates a new atumn client. The device id can be obtained from [PRODINFO](../switch.md).
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo Class 2 CA - G3` and no client certificate is used.
**def set_certificate**(cert: [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscertificate), key: [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls/#tlsprivatekey)) -> None
Changes the client certificate of the current TLS context. The server rejects all requests without a valid client certificate.
**def set_host**(host: str) -> None
Changes the server to which the HTTP requests are sent. The default is: `atumn.hac.lp1.d4c.nintendo.net`.
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` indicates system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def download_content_metadata**(title_id: int, title_version: int, *, system_update: bool = False) -> bytes
Downloads the metadata NCA for the given title id and version. The `system_update` parameter should only be set to `True` for the system update title (`0100000000000816`).
**async def download_content**(content_id: str) -> bytes
Downloads the NCA for the given content id.
================================================
FILE: docs/reference/switch/baas.md
================================================
# Module: nintendo.switch.baas
Provides a client for the [BaaS server](https://github.com/kinnay/nintendo/wiki/BAAS-Server).
**class** [PresenceState](#presencestate)
Provides predefined constants for the presence state.
**class** [BAASError](#baaserror)(Exception)
Raised when the `BaaS` server returns an error code.
**class** [BAASClient](#baasclient)
The `BaaS` client.
## PresenceState
`INACTIVE: str = "INACTIVE"`
`ONLINE: str = "ONLINE"`
`PLAYING: str = "PLAYING"`
## BAASError
response: [HTTPResponse](https://anynet.readthedocs.io/en/latest/reference/http/#httpresponse)
`type: str`
`name: str`
`title: str`
`detail: str`
`status: int`
`instance: str`
## BAASClient
**def _\_init__**()
Creates a new `BaaS` client.
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with default authorities.
**def set_certificate**(cert: [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscertificate), key: [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls/#tlsprivatekey)) -> None
Changes the client certificate of the current TLS context. This is required on system version 21.0.0 and later, when `m-lp1.baas.nintendo.com` is contacted.
**def set_host**(host: str) -> None
Changes the server to which the HTTP requests are sent. By default, requests are sent to `e0d67c509fb203858ebcb2fe3f88c2aa.baas.nintendo.com` or `m-lp1.baas.nintendo.com`, depending on the system version.
**def set_power_state**(state: str) -> None
Changes the content of the `X-Nintendo-PowerState` header. The default is `"FA"`.
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` indicates system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def authenticate**(device_token: str, penne_id: str = None) -> dict
Requests an authorization token with `/1.0.0/application/token`. This method must be called before any other requests can be made. The device token can be obtained from the [`dauth server`](dauth.md).
The `penneId` parameter was added in system version 19.0.0.
**async def login**(id: int, password: str, access_token: str, app_token: str = None, na_country: str = None, skip_verification: bool = False, is_persistent: bool = True) -> dict
Logs in with the given user id and password, using `/1.0.0/login`. If an app token is provided, the server returns an id token that can be used to log in on a game server. App tokens can be obtained from the [`aauth server`](aauth.md). If `skip_verification` is `True` the client asks the server to skip NSO verification.
The `na_country` parameter is required in system version 18.0.0 and later. The `is_persistent` parameter was added in system version 20.0.0.
**async def register**(access_token: str) -> dict
Registers a new device account on the `BaaS` server.
**async def update_presence**(user_id: int, device_account_id: int, access_token: str, state: str, title_id: int, presence_group_id: int, app_fields: dict[str, str] = {}, acd_index: int = 0) -> dict
Updates your presence state by patching `/1.0.0/users//device_accounts/`.
**async def get_friends**(user_id: int, access_token: str, count: int = 300)
Requests your friend list with `/2.0.0/users//friends`.
================================================
FILE: docs/reference/switch/dauth.md
================================================
# Module: nintendo.switch.dauth
Provides a client for the [device authentication server](https://github.com/kinnay/nintendo/wiki/DAuth-Server).
**class** [DAuthError](#dautherror)(Exception)
Raised when the `dauth` server returns an error code.
**class** [DAuthClient](#dauthclient)
The `dauth` client.
**class** [DAuthCache](#dauthcache)
A cache for the dauth client that remembers preloaded tokens.
## Global Constants
`CLIENT_ID_SCSI: int = 0x146C8AC7B8A0DB52`
`CLIENT_ID_ER: int = 0x16E96F76850156D1`
`CLIENT_ID_ATUM: int = 0x3117B250CAB38F45`
`CLIENT_ID_ESHOP: int = 0x41F4A6491028E3C4`
`CLIENT_ID_BCAT: int = 0x67BF9945B45248C6`
`CLIENT_ID_SATA: int = 0x6AC5A6873FE5F68C`
`CLIENT_ID_ACCOUNT_APPLET: int = 0x75FE236362FF5F8B`
`CLIENT_ID_ACCOUNT: int = 0x81333C548B2E876D`
`CLIENT_ID_NPNS: int = 0x83B72B05DC3278D7`
`CLIENT_ID_BAAS: int = 0x8F849B5D34778D8E`
`CLIENT_ID_BEACH: int = 0x93AF0ACB26258DE9`
`CLIENT_ID_SPROFILE: int = 0xBAD8156F44AC935A`
`CLIENT_ID_DRAGONS: int = 0xD5B6CAC2C1514C56`
`CLIENT_ID_SCSI_POLICY: int = 0xD98185ACB55994B4`
`CLIENT_ID_PCTL: int = 0xDC656EA03B63CF68`
`CLIENT_ID_PREPO: int = 0xDF51C436BC01C437`
`CLIENT_ID_PENNE: int = 0xE58171FE439390CE`
## DAuthError
This exception is raised when the `dauth` server returns an error code. The following constants are defined in this class:
`UNAUTHORIZED_DEVICE: int = 4`
`SYSTEM_UPDATE_REQUIRED: int = 7`
`BANNED_DEVICE: int = 8`
`INTERNAL_SERVER_ERROR: int = 9`
`GENERIC: int = 14`
`CHALLENGE_EXPIRED: int = 15`
`WRONG_MAC: int = 16`
`BROKEN_DEVICE: int = 17`
The error can be inspected using the following attributes:
response: [HTTPResponse](https://anynet.readthedocs.io/en/latest/reference/http/#httpresponse)
`code: int`
`message: str`
## DAuthClient
NOTE: On system version 20.0.0 and later, it is recommended to request tokens through a [`DAuthCache`](#dauthcache) instead of using the `DAuthClient` directly. This is because the Switch requests multiple tokens at once on those system versions, and the `DAuthCache` makes it easier to mimic that behavior.
**def _\_init__**(keys: dict[str, bytes])
Creates a new `dauth` client with the given keys. The `dauth` client requires the `aes_kek_generation_source` and `master_key_XX` keys.
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo CA - G3` and no client certificate is used.
**def set_certificate**(cert: [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscertificate), key: [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls/#tlsprivatekey)) -> None
Changes the client certificate of the current TLS context. The server rejects all requests without a valid client certificate.
**def set_power_state**(state: str) -> None
Changes the content of the `X-Nintendo-PowerState` header. The default is `"FA"`.
**def set_platform_region**(region: int) -> None
Changes the platform region. This affects the `ist` parameter in the device authentication request. The default is `1`.
**def set_host**(host: str) -> None
Changes the server to which the HTTP requests are sent. The default is `dauth-lp1.ndas.srv.nintendo.net`.
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` is system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def challenge**() -> dict
Requests a challenge from the `dauth` server.
**async def device_token**(client_id: int) -> dict
Requests a device token from the `dauth` server. The challenge is done automatically. This method is available up to system version 19.0.1.
**async def edge_token**(client_id: int, vendor_id: str = "akamai") -> dict
Requests an edge token from the `dauth` server. The challenge is done automatically. This method is available up to system version 19.0.1.
**async def device_tokens**(client_ids: list[int]) -> dict
Requests a multiple device tokens from the `dauth` server. This method is available on system version 20.0.0 and later.
**async def edge_tokens**(token_requests: list[tuple[int, str]]) -> dict
Requests a multiple edge tokens from the `dauth` server. The `token_requests` parameter should contain a list of `(client_id, vendor_id)` tuples. This method is available on system version 20.0.0 and later.
**async def preload_device_tokens**() -> dict
Requests all device tokens that are preloaded by the Switch at once. This method is available on system version 20.0.0 and later.
**async def preload_edge_tokens**() -> dict
Requests all edge tokens that are preloaded by the Switch at once. This method is available on system version 20.0.0 and later.
## DAuthCache
**def _\_init__**(client: [DAuthClient](#dauthclient), expiration=None)
Creates a new dauth cache for the given client. If `expiration` is provided, tokens are discarded after the given number of seconds. Otherwise, the `expires_in` field that is returned by the server is used.
**async def device_token**(client_id: int) -> dict
Returns a device token from the cache or requests it from the dauth server if it is not present in the cache.
**async def edge_token**(client_id: int, vendor_id: str = "akamai") -> dict
Returns an edge token from the cache or requests it from the dauth server if it is not present in the cache.
================================================
FILE: docs/reference/switch/dragons.md
================================================
# Module: nintendo.switch.dragons
Provides a client for the [dragons servers](https://github.com/kinnay/nintendo/wiki/Dragons-Servers).
**class** [DragonsError](#dragonserror)(Exception)
Raised when the dragons server returns an error code.
**class** [DragonsClient](#dragonsclient)
The dragons client.
## DragonsError
response: [HTTPResponse](https://anynet.readthedocs.io/en/latest/reference/http/#httpresponse)
`type: str`
`name: str`
`title: str`
`detail: str`
`status: int`
`invalid_params: list | None`
If present, the `invalid_params` field contains a list of dictionaries, each of which provides two keys: `name` and `reason`.
## DragonsClient
**def _\_init__**(device_id: int = None)
Creates a new dragons client. The device id is required for all methods except for `contents_authorization_token_for_aauth`.
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo Class 2 CA - G3` and no client certificate is used.
**def set_certificate**(cert: [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscertificate), key: [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls/#tlsprivatekey)) -> None
Changes the client certificate of the current TLS context. The server rejects all requests without a valid client certificate.
**def set_hosts**(dragons: str, dragonst: str, tigers: str) -> None
Changes the servers to which the HTTP requests are sent. The defaults are:
* `dragons.hac.lp1.dragons.nintendo.net`
* `dragonst.hac.lp1.dragons.nintendo.net`
* `tigers.hac.lp1.dragons.nintendo.net`
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` indicates system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def publish_device_linked_elicenses**(device_token: str) -> dict
Requests all elicenses that are linked to the given device. The device token can be obtained from the [`dauth server`](dauth.md).
**async def exercise_elicense**(device_token: str, elicense_ids: list[str], account_ids: list[int], current_account_id: int) -> None
Calls `/v1/elicenses/exercise` with the given parameters.
**async def contents_authorization_token_for_aauth**(device_token: str, elicense_id: str, na_id: int, title_id: int) -> dict
Requests a contents authorization token for [aauth](aauth.md). The device token can be obtained from the [`dauth server`](dauth.md).
================================================
FILE: docs/reference/switch/five.md
================================================
# Module: nintendo.switch.five
Provides a client for the [online play invitation server](https://github.com/kinnay/nintendo/wiki/Online-Play-Invitation-Server).
**class** [FiveError](#fiveerror)(Exception)
Raised when the server returns an error code.
**class** [FiveClient](#fiveclient)
The client.
## FiveError
This exception is raised when the server returns an error code. The following constants are defined in this class:
`INVALID_PARAMETER: int = 2`
`INVALID_REQUEST_URI: int = 3`
`UNAUTHORIZED: int = 6`
`RESOURCE_NOT_FOUND: int = 10`
`APPLICATION_DATA_TOO_LARGE: int = 11`
The error can be inspected using the following attributes:
response: [HTTPResponse](https://anynet.readthedocs.io/en/latest/reference/http/#httpresponse)
`code: int`
`message: str`
## FiveClient
**def _\_init__**()
Creates a new online play invitation client.
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo CA - G3`.
**def set_host**(url: str) -> None
Changes the server to which the HTTP requests are sent. The default is `app.lp1.five.nintendo.net`.
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` indicates system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def get_unread_invitation_count**(access_token: str, user_id: int) -> int
Requests the number of unread invitations with `/v1/users//invitations/inbox?fields=count&read=false`.
**async def get_inbox**(access_token: str, user_id: int) -> dict
Requests the list of received online play invitations.
**async def get_invitation_group**(access_token: str, invitation_group_id: int) -> dict
Requests details about a specific invitation group.
**async def mark_as_read**(access_token: str, ids: list[int]) -> None
Marks the given list of invitations as read.
**async def mark_all_as_read**(access_token: str, user_id: int) -> None
Marks all received invitations as read.
**async def send_invitation**(access_token: str, receivers: list[int], application_id: int, application_group_id: int, application_data: bytes, messages: dict[str, str], application_id_match: bool = False, acd_index: int = 0) -> dict
Sends an online play invitation to at most 16 users. The application group id is usually the same as the application id (title id). The application data is game-specific and may contain at most 1024 bytes.
================================================
FILE: docs/reference/switch/sun.md
================================================
# Module: nintendo.switch.sun
Provides a client for the [system update meta server](https://github.com/kinnay/nintendo/wiki/Sun-Server).
**class** [SunError](#sunerror)(Exception)
Raised when the `sun` server returns an error code.
**class** [SunClient](#sunclient)
The `sun` client.
## SunError
response: [HTTPResponse](https://anynet.readthedocs.io/en/latest/reference/http/#httpresponse)
`code: str`
`message: str`
## SunClient
**def _\_init__**(device_id: int)
Creates a new sun client. The device id can be obtained from [PRODINFO](../switch.md).
**def set_request_callback**(callback: Callable) -> None
By default, requests are performed with [`http.request`](https://anynet.readthedocs.io/en/latest/reference/http). This method lets you provide a custom callback instead.
**def set_context**(context: [TLSContext](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscontext)) -> None
Changes the TLS context. By default, the server certificate is verified with `Nintendo Class 2 CA - G3` and no client certificate is used.
**def set_certificate**(cert: [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls/#tlscertificate), key: [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls/#tlsprivatekey)) -> None
Changes the client certificate of the current TLS context. The server rejects all requests without a valid client certificate.
**def set_host**(host: str) -> None
Changes the server to which the HTTP requests are sent. The default is: `sun.hac.lp1.d4c.nintendo.net`.
**def set_system_version**(version: int) -> None
Changes the system version that is emulated by the client. The system version should be given as a decimal integer. For example, `1002` indicates system version `10.0.2`. All system versions from `9.0.0` up to `22.1.0` are supported.
**async def system_update_meta**() -> dict
Requests the latest system update metadata.
================================================
FILE: docs/reference/switch.md
================================================
# Module: nintendo.switch
Provides useful functions and classes related to Nintendo Switch.
**def load_keys**(filename: str) -> dict[str, bytes]
Loads encryption keys from a file such as `prod.keys`.
**class** [ProdInfo](#prodinfo)
Reads a decrypted `PRODINFO` file.
## ProdInfo
**def _\_init__**(keys: dict[str, bytes], filename: str)
Creates a new [ProdInfo](#prodinfo) object from the given file. The key set should contain at least `ssl_rsa_kek`.
**def get_device_id**() -> int
Extracts the device id.
**def get_tls_cert**() -> [TLSCertificate](https://anynet.readthedocs.io/en/latest/reference/tls#tlscertificate)
Extracts the device certificate.
**def get_tls_key**() -> [TLSPrivateKey](https://anynet.readthedocs.io/en/latest/reference/tls#tlsprivatekey)
Extract the private key that belongs to the device certificate.
================================================
FILE: docs/style.css
================================================
.docs {
margin-left: 25px;
display: inline-block;
}
code, .rst-content code {
background: transparent;
font-size: 100%;
border: none;
padding: 0px;
}
.docs code {
color: #c60;
}
td, th {
padding: 5px;
}
table {
margin-bottom: 20px;
}
================================================
FILE: examples/3ds/friends.py
================================================
from nintendo import nasc
from nintendo.nex import backend, friends, settings
import anyio
import logging
logging.basicConfig(level=logging.INFO)
SERIAL_NUMBER = "..." # Serial number on console minus the last digit
MAC_ADDRESS = "aabbccddeeff" # Console MAC address (see WiFi settings), all lowercase with no colons
DEVICE_CERT = bytes.fromhex("...") # Unique console certificate. Get from sniffing traffic
DEVICE_NAME = "..." # Doesn't matter
# 3DS does NOT send NEX credentials over NASC
# They are generated once when the account is created and stored on the device
# Homebrew like https://github.com/Stary2001/nex-dissector/tree/master/get_3ds_pid_password
# can be used to dump the PID and password
PID = 0
PID_HMAC = "..." # Sniff console traffic or dump from friends title save (bytes 66-84)
NEX_PASSWORD = "..."
REGION = 3 # EUR
LANGUAGE = 2
async def main():
client = nasc.NASCClient()
client.set_title(0x0004013000003202, 20000)
client.set_device(SERIAL_NUMBER, MAC_ADDRESS, DEVICE_CERT, DEVICE_NAME)
client.set_locale(REGION, LANGUAGE)
client.set_user(PID, PID_HMAC)
response = await client.login(0x3200)
s = settings.load("friends")
s.configure("ridfebb9", 20000)
async with backend.connect(s, response.host, response.port) as be:
async with be.login(str(PID), NEX_PASSWORD) as client:
friends_client = friends.FriendsClientV1(client)
await friends_client.update_comment("Hello World")
anyio.run(main)
================================================
FILE: examples/custom/server.py
================================================
from nintendo.nex import rmc, kerberos, friends, \
authentication, common, settings
import collections
import secrets
import aioconsole
import asyncio
import logging
logging.basicConfig(level=logging.INFO)
User = collections.namedtuple("User", "pid name password")
users = [
User(2, "Quazal Rendez-Vous", "password"),
User(100, "guest", "MMQea3n!fsik")
#More accounts here
]
def get_user_by_name(name):
for user in users:
if user.name == name:
return user
def get_user_by_pid(pid):
for user in users:
if user.pid == pid:
return user
def derive_key(user):
deriv = kerberos.KeyDerivationOld(65000, 1024)
return deriv.derive_key(user.password.encode("ascii"), user.pid)
SECURE_SERVER = "Quazal Rendez-Vous"
class AuthenticationServer(authentication.AuthenticationServer):
def __init__(self, settings):
super().__init__()
self.settings = settings
async def login(self, client, username):
print("User trying to log in:", username)
user = get_user_by_name(username)
if not user:
raise common.RMCError("RendezVous::InvalidUsername")
server = get_user_by_name(SECURE_SERVER)
url = common.StationURL(
scheme="prudps", address="127.0.0.1", port=1224,
PID = server.pid, CID = 1, type = 2,
sid = 1, stream = 10
)
conn_data = authentication.RVConnectionData()
conn_data.main_station = url
conn_data.special_protocols = []
conn_data.special_station = common.StationURL()
response = rmc.RMCResponse()
response.result = common.Result.success()
response.pid = user.pid
response.ticket = self.generate_ticket(user, server)
response.connection_data = conn_data
response.server_name = "Example server"
return response
def generate_ticket(self, source, target):
settings = self.settings
user_key = derive_key(source)
server_key = derive_key(target)
session_key = secrets.token_bytes(settings["kerberos.key_size"])
internal = kerberos.ServerTicket()
internal.timestamp = common.DateTime.now()
internal.source = source.pid
internal.session_key = session_key
ticket = kerberos.ClientTicket()
ticket.session_key = session_key
ticket.target = target.pid
ticket.internal = internal.encrypt(server_key, settings)
return ticket.encrypt(user_key, settings)
class FriendsServer(friends.FriendsServerV1):
pass #Implement friend server methods here
async def main():
s = settings.load("friends")
s.configure("ridfebb9", 20000)
auth_servers = [
AuthenticationServer(s)
]
secure_servers = [
FriendsServer()
]
server_key = derive_key(get_user_by_name(SECURE_SERVER))
async with rmc.serve(s, auth_servers, "127.0.0.1", 1223):
async with rmc.serve(s, secure_servers, "127.0.0.1", 1224, key=server_key):
await aioconsole.ainput("Press enter to exit...\n")
asyncio.run(main())
================================================
FILE: examples/custom/server_login.py
================================================
from nintendo.nex import backend, settings
import anyio
import logging
logging.basicConfig(level=logging.INFO)
async def main():
s = settings.load("friends")
s.configure("ridfebb9", 20000)
async with backend.connect(s, "127.0.0.1", 1223) as be:
async with be.login_guest() as client:
pass
anyio.run(main)
================================================
FILE: examples/switch/animalcrossing.py
================================================
from nintendo.switch import dauth, aauth, baas, dragons
from nintendo.nex import backend, authentication, matchmaking, settings
from nintendo import switch
import anyio
import logging
logging.basicConfig(level=logging.INFO)
SYSTEM_VERSION = 2210 # 22.1.0
# You can get your user id and password from
# su/baas/.dat in save folder 8000000000000010.
# Bytes 0x20 - 0x28 contain the user id in reversed
# byte order, and bytes 0x28 - 0x50 contain the
# password in plain text.
# Alternatively, you can set up a mitm on your Switch
# and extract them from the request to /1.0.0/login
BAAS_USER_ID = 0x0123456789abcdef # 16 hex digits
BAAS_PASSWORD = "..." # Should be 40 characters
NA_COUNTRY = "JP" # Country of your Nintendo account
# You can dump prod.keys with Lockpick_RCM and
# PRODINFO from hekate (decrypt it if necessary)
PATH_KEYS = "/path/to/prod.keys"
PATH_PRODINFO = "/path/to/PRODINFO"
# License information is stored encrypted in saved/
# in save folder 80000000000000E4.
# Alternatively, they can be obtained from the dragons server
# by calling publish_device_linked_elicenses (see docs), or with
# a mitm on your Switch.
ELICENSE_ID = "..." # 32 hex digits
NA_ID = 0x0123456789abcdef # 16 hex digits
PENNE_ID = "..."
CODE = "ABCDE" # Dodo code
TITLE_ID = 0x01006F8002326000
TITLE_VERSION = 0x1C0000
GAME_SERVER_ID = 0x2EE2E300
ACCESS_KEY = "v43a10em"
NEX_VERSION = 40604
CLIENT_VERSION = 2
HOST = "g%08x-lp1.s.n.srv.nintendo.net" %GAME_SERVER_ID
PORT = 443
async def main():
keys = switch.load_keys(PATH_KEYS)
info = switch.ProdInfo(keys, PATH_PRODINFO)
cert = info.get_tls_cert()
pkey = info.get_tls_key()
dauth_client = dauth.DAuthClient(keys)
dauth_client.set_certificate(cert, pkey)
dauth_client.set_system_version(SYSTEM_VERSION)
dauth_cache = dauth.DAuthCache(dauth_client)
dragons_client = dragons.DragonsClient()
dragons_client.set_certificate(cert, pkey)
dragons_client.set_system_version(SYSTEM_VERSION)
aauth_client = aauth.AAuthClient()
aauth_client.set_certificate(cert, pkey)
aauth_client.set_system_version(SYSTEM_VERSION)
baas_client = baas.BAASClient()
baas_client.set_certificate(cert, pkey)
baas_client.set_system_version(SYSTEM_VERSION)
# Request a device authentication token for dragons
response = await dauth_cache.device_token(dauth.CLIENT_ID_DRAGONS)
device_token_dragons = response["device_auth_token"]
# Request a device authentication token for aauth and bass
response = await dauth_cache.device_token(dauth.CLIENT_ID_BAAS)
device_token_baas = response["device_auth_token"]
# Request a contents authorization token from dragons
response = await dragons_client.contents_authorization_token_for_aauth(device_token_dragons, ELICENSE_ID, NA_ID, TITLE_ID)
contents_token = response["contents_authorization_token"]
# Request an application authentication token
response = await aauth_client.auth_digital(TITLE_ID, TITLE_VERSION, device_token_baas, contents_token)
app_token = response["application_auth_token"]
# Request an anonymous access token for baas
response = await baas_client.authenticate(device_token_baas, PENNE_ID)
access_token = response["accessToken"]
# Log in on the baas server
response = await baas_client.login(
BAAS_USER_ID, BAAS_PASSWORD, access_token, app_token, NA_COUNTRY
)
user_id = int(response["user"]["id"], 16)
id_token = response["idToken"]
# Set up authentication info for nex server
auth_info = authentication.AuthenticationInfo()
auth_info.token = id_token
auth_info.ngs_version = 4 #Switch
auth_info.token_type = 2
# Establish connection with nex server
s = settings.load("switch")
s.configure(ACCESS_KEY, NEX_VERSION, CLIENT_VERSION)
async with backend.connect(s, HOST, PORT) as be:
async with be.login(str(user_id), auth_info=auth_info) as client:
mm = matchmaking.MatchmakeExtensionClient(client)
param = matchmaking.MatchmakeSessionSearchCriteria()
param.attribs = ["", "", "", "", "", ""]
param.game_mode = "2"
param.min_participants = "1"
param.max_participants = "1,8"
param.matchmake_system = "1"
param.vacant_only = False
param.exclude_locked = True
param.exclude_non_host_pid = True
param.selection_method = 0
param.vacant_participants = 1
param.exclude_user_password = True
param.exclude_system_password = True
param.refer_gid = 0
param.codeword = CODE
sessions = await mm.browse_matchmake_session_no_holder_no_result_range(param)
if not sessions:
print("\nNo island found for '%s'\n" %CODE)
else:
session = sessions[0]
data = session.application_data
print("\nFound island:")
print("\tId:", session.id)
print("\tActive players:", session.num_participants)
print("\tIsland name:", data[12:32].decode("utf16").rstrip("\0"))
print("\tHost name:", data[40:60].decode("utf16").rstrip("\0"))
print()
anyio.run(main)
================================================
FILE: examples/switch/smm2_level.py
================================================
from nintendo.switch import dauth, aauth, baas, dragons
from nintendo.nex import backend, authentication, \
settings, datastore_smm2 as datastore
from nintendo import switch
from anynet import http
import anyio
import logging
logging.basicConfig(level=logging.INFO)
SYSTEM_VERSION = 2210 # 22.1.0
# You can get your user id and password from
# su/baas/.dat in save folder 8000000000000010.
# Bytes 0x20 - 0x28 contain the user id in reversed
# byte order, and bytes 0x28 - 0x50 contain the
# password in plain text.
# Alternatively, you can set up a mitm on your Switch
# and extract them from the request to /1.0.0/login
BAAS_USER_ID = 0x0123456789abcdef # 16 hex digits
BAAS_PASSWORD = "..." # Should be 40 characters
NA_COUNTRY = "JP" # Country of your Nintendo account
# You can dump prod.keys with Lockpick_RCM and
# PRODINFO from hekate (decrypt it if necessary)
PATH_KEYS = "/path/to/prod.keys"
PATH_PRODINFO = "/path/to/PRODINFO"
# License information is stored encrypted in saved/
# in save folder 80000000000000E4.
# Alternatively, they can be obtained from the dragons server
# by calling publish_device_linked_elicenses (see docs), or with
# a mitm on your Switch.
ELICENSE_ID = "..." # 32 hex digits
NA_ID = 0x0123456789abcdef # 16 hex digits
PENNE_ID = "..."
COURSE_ID = "2J53K2Y9G"
TITLE_ID = 0x01009B90006DC000
TITLE_VERSION = 0x70000
GAME_SERVER_ID = 0x22306D00
ACCESS_KEY = "fdf6617f"
NEX_VERSION = 40605
CLIENT_VERSION = 60
HOST = "g%08x-lp1.s.n.srv.nintendo.net" %GAME_SERVER_ID
PORT = 443
GameStyles = ["SMB1", "SMB3", "SMW", "NSMBU", "SM3DW"]
Difficulties = ["Easy", "Normal", "Expert", "Super expert"]
CourseThemes = [
"Overworld", "Underground", "Castle", "Airship",
"Underwater", "Ghost house", "Snow", "Desert",
"Sky", "Forest"
]
TagNames = [
"None", "Standard", "Puzzle solving", "Speedrun",
"Autoscroll", "Auto mario", "Short and sweet",
"Multiplayer versus", "Themed", "Music", "Art",
"Technical", "Shooter", "Boss battle",
"Single player", "Link"
]
def format_time(milliseconds):
seconds = (milliseconds // 1000) % 60
minutes = (milliseconds // 1000) // 60
milliseconds = milliseconds % 1000
return "%02i:%02i.%03i" %(minutes, seconds, milliseconds)
async def download_thumbnail(store, info, filename):
response = await store.get_req_get_info_headers_info(info.data_type)
headers = {h.key: h.value for h in response.headers}
response = await http.get(info.url, headers=headers)
response.raise_if_error()
with open(filename, "wb") as f:
f.write(response.body)
async def main():
keys = switch.load_keys(PATH_KEYS)
info = switch.ProdInfo(keys, PATH_PRODINFO)
cert = info.get_tls_cert()
pkey = info.get_tls_key()
dauth_client = dauth.DAuthClient(keys)
dauth_client.set_certificate(cert, pkey)
dauth_client.set_system_version(SYSTEM_VERSION)
dauth_cache = dauth.DAuthCache(dauth_client)
dragons_client = dragons.DragonsClient()
dragons_client.set_certificate(cert, pkey)
dragons_client.set_system_version(SYSTEM_VERSION)
aauth_client = aauth.AAuthClient()
aauth_client.set_certificate(cert, pkey)
aauth_client.set_system_version(SYSTEM_VERSION)
baas_client = baas.BAASClient()
baas_client.set_certificate(cert, pkey)
baas_client.set_system_version(SYSTEM_VERSION)
# Request a device authentication token for dragons
response = await dauth_cache.device_token(dauth.CLIENT_ID_DRAGONS)
device_token_dragons = response["device_auth_token"]
# Request a device authentication token for aauth and bass
response = await dauth_cache.device_token(dauth.CLIENT_ID_BAAS)
device_token_baas = response["device_auth_token"]
# Request a contents authorization token from dragons
response = await dragons_client.contents_authorization_token_for_aauth(device_token_dragons, ELICENSE_ID, NA_ID, TITLE_ID)
contents_token = response["contents_authorization_token"]
# Request an application authentication token
response = await aauth_client.auth_digital(TITLE_ID, TITLE_VERSION, device_token_baas, contents_token)
app_token = response["application_auth_token"]
# Request an anonymous access token for baas
response = await baas_client.authenticate(device_token_baas, PENNE_ID)
access_token = response["accessToken"]
# Log in on the baas server
response = await baas_client.login(
BAAS_USER_ID, BAAS_PASSWORD, access_token, app_token, NA_COUNTRY
)
user_id = int(response["user"]["id"], 16)
id_token = response["idToken"]
# Set up authentication info for nex server
auth_info = authentication.AuthenticationInfo()
auth_info.token = id_token
auth_info.ngs_version = 4 #Switch
auth_info.token_type = 2
s = settings.load("switch")
s.configure(ACCESS_KEY, NEX_VERSION, CLIENT_VERSION)
async with backend.connect(s, HOST, PORT) as be:
async with be.login(str(user_id), auth_info=auth_info) as client:
store = datastore.DataStoreClientSMM2(client)
param = datastore.GetUserOrCourseParam()
param.code = COURSE_ID
param.course_option = datastore.CourseOption.ALL
response = await store.get_user_or_course(param)
course = response.course
# Print information about the course
print("Level info:")
print("\tName:", course.name)
print("\tDescription:", course.description)
print("\tUploaded at:", course.upload_time)
print("\tGame:", GameStyles[course.game_style])
print("\tTheme:", CourseThemes[course.course_theme])
print("\tDifficulty:", Difficulties[course.difficulty])
print("\tFirst tag:", TagNames[course.tag1])
print("\tSecond tag:", TagNames[course.tag2])
print("\tWorld record:", format_time(course.time_stats.world_record))
print("\tNumber of comments:", course.comment_stats[0])
# Request information about its uploader
param = datastore.GetUsersParam()
param.pids = [course.owner_id]
response = await store.get_users(param)
user = response.users[0]
print("Uploader:")
print("\tCode:", user.code)
print("\tName:", user.name)
print("\tCountry:", user.country)
print("\tLast active:", user.last_active)
# Download thumbnails
await download_thumbnail(store, course.one_screen_thumbnail, "thumbnail_onescreen.jpg")
await download_thumbnail(store, course.entire_thumbnail, "thumbnail_entire.jpg")
# Download level file
param = datastore.DataStorePrepareGetParam()
param.data_id = course.data_id
req_info = await store.prepare_get_object(param)
response = await http.get(req_info.url)
response.raise_if_error()
with open("level.bin", "wb") as f:
f.write(response.body)
anyio.run(main)
================================================
FILE: examples/switch/smm2_ninji.py
================================================
from nintendo.switch import dauth, aauth, baas, dragons
from nintendo.nex import backend, authentication, \
settings, datastore_smm2 as datastore
from nintendo import switch
from anynet import http
import anyio
import zlib
import logging
logging.basicConfig(level=logging.INFO)
SYSTEM_VERSION = 2210 # 22.1.0
# You can get your user id and password from
# su/baas/.dat in save folder 8000000000000010.
# Bytes 0x20 - 0x28 contain the user id in reversed
# byte order, and bytes 0x28 - 0x50 contain the
# password in plain text.
# Alternatively, you can set up a mitm on your Switch
# and extract them from the request to /1.0.0/login
BAAS_USER_ID = 0x0123456789abcdef # 16 hex digits
BAAS_PASSWORD = "..." # Should be 40 characters
NA_COUNTRY = "JP" # Country of your Nintendo account
# You can dump prod.keys with Lockpick_RCM and
# PRODINFO from hekate (decrypt it if necessary)
PATH_KEYS = "/path/to/prod.keys"
PATH_PRODINFO = "/path/to/PRODINFO"
# License information is stored encrypted in saved/
# in save folder 80000000000000E4.
# Alternatively, they can be obtained from the dragons server
# by calling publish_device_linked_elicenses (see docs), or with
# a mitm on your Switch.
ELICENSE_ID = "..." # 32 hex digits
NA_ID = 0x0123456789abcdef # 16 hex digits
PENNE_ID = "..."
TITLE_ID = 0x01009B90006DC000
TITLE_VERSION = 0x70000
GAME_SERVER_ID = 0x22306D00
ACCESS_KEY = "fdf6617f"
NEX_VERSION = 40605
CLIENT_VERSION = 60
HOST = "g%08x-lp1.s.n.srv.nintendo.net" %GAME_SERVER_ID
PORT = 443
async def main():
keys = switch.load_keys(PATH_KEYS)
info = switch.ProdInfo(keys, PATH_PRODINFO)
cert = info.get_tls_cert()
pkey = info.get_tls_key()
dauth_client = dauth.DAuthClient(keys)
dauth_client.set_certificate(cert, pkey)
dauth_client.set_system_version(SYSTEM_VERSION)
dauth_cache = dauth.DAuthCache(dauth_client)
dragons_client = dragons.DragonsClient()
dragons_client.set_certificate(cert, pkey)
dragons_client.set_system_version(SYSTEM_VERSION)
aauth_client = aauth.AAuthClient()
aauth_client.set_certificate(cert, pkey)
aauth_client.set_system_version(SYSTEM_VERSION)
baas_client = baas.BAASClient()
baas_client.set_certificate(cert, pkey)
baas_client.set_system_version(SYSTEM_VERSION)
# Request a device authentication token for dragons
response = await dauth_cache.device_token(dauth.CLIENT_ID_DRAGONS)
device_token_dragons = response["device_auth_token"]
# Request a device authentication token for aauth and bass
response = await dauth_cache.device_token(dauth.CLIENT_ID_BAAS)
device_token_baas = response["device_auth_token"]
# Request a contents authorization token from dragons
response = await dragons_client.contents_authorization_token_for_aauth(device_token_dragons, ELICENSE_ID, NA_ID, TITLE_ID)
contents_token = response["contents_authorization_token"]
# Request an application authentication token
response = await aauth_client.auth_digital(TITLE_ID, TITLE_VERSION, device_token_baas, contents_token)
app_token = response["application_auth_token"]
# Request an anonymous access token for baas
response = await baas_client.authenticate(device_token_baas, PENNE_ID)
access_token = response["accessToken"]
# Log in on the baas server
response = await baas_client.login(
BAAS_USER_ID, BAAS_PASSWORD, access_token, app_token, NA_COUNTRY
)
user_id = int(response["user"]["id"], 16)
id_token = response["idToken"]
# Set up authentication info for nex server
auth_info = authentication.AuthenticationInfo()
auth_info.token = id_token
auth_info.ngs_version = 4 #Switch
auth_info.token_type = 2
s = settings.load("switch")
s.configure(ACCESS_KEY, NEX_VERSION, CLIENT_VERSION)
async with backend.connect(s, HOST, PORT) as be:
async with be.login(str(user_id), auth_info=auth_info) as client:
# Search for ninji courses
store = datastore.DataStoreClientSMM2(client)
param = datastore.SearchCoursesEventParam()
courses = await store.search_courses_event(param)
print("Found %i ninji courses.\n" %len(courses))
# Print information about the oldest ninji course
course = courses[-1]
print("Name:", course.name)
print("Description:", course.description)
print("Start time:", course.upload_time)
print("End time:", course.end_time)
print()
# Request ghost info
param = datastore.GetEventCourseGhostParam()
param.data_id = course.data_id
param.time = 30000 # Request ghosts with a time around 30 seconds
param.count = 1 # Only request a single ghost
ghost = (await store.get_event_course_ghost(param))[0]
# Request info about the ghost player
param = datastore.GetUsersParam()
param.pids = [ghost.pid]
user = (await store.get_users(param)).users[0]
print("Player:", user.name)
print("Time: %i.%03i" %(ghost.time // 1000, ghost.time % 1000))
print()
# Download replay file
header_info = await store.get_req_get_info_headers_info(ghost.replay_file.data_type)
headers = {h.key: h.value for h in header_info.headers}
response = await http.get(ghost.replay_file.url, headers=headers)
response.raise_if_error()
# Decompress and save replay file
data = zlib.decompress(response.body)
with open("replay.bin", "wb") as f:
f.write(data)
anyio.run(main)
================================================
FILE: examples/switch/system_update.py
================================================
from nintendo.switch import sun, atumn
from nintendo import switch
import anyio
import os
import re
import struct
import subprocess
SYSTEM_VERSION = 2210 # 22.1.0
# You can dump prod.keys with Lockpick_RCM and
# PRODINFO from hekate (decrypt it if necessary)
PATH_KEYS = "/path/to/prod.keys"
PATH_PRODINFO = "/path/to/PRODINFO"
# This script uses hactool to parse NCA files
PATH_HACTOOL = "/path/to/hactool"
# Name of folder where files will be stored
OUTPUT_PATH = "/path/to/folder"
async def retry(worker, n=3):
# If the download / connection fails, retry just in case
for i in range(n):
try:
return await worker
except anyio.BrokenResourceError:
print("Retrying...")
raise Exception("Download failed!")
async def download_content_metadata(atumn_client, title_id, title_version, *, system_update=False):
# Download NCA
print("Downloading metadata NCA for title %016x..." %title_id)
data = await retry(atumn_client.download_content_metadata(title_id, title_version, system_update=system_update))
# Save data to file
nca_path = OUTPUT_PATH + "/metadata_nca/%016x.nca" %title_id
with open(nca_path, "wb") as f:
f.write(data)
# Extract CNMT from NCA
section0dir = OUTPUT_PATH + "/cnmt"
output = subprocess.check_output([PATH_HACTOOL, nca_path, "--section0dir", section0dir, "--disablekeywarns"])
return re.search("\nSaving .* to (.*)\\.\\.\\.\n", output.decode())[1] # Return the filename
async def download_content(atumn_client, title_id, metadata_path):
# Parse the CNMT
with open(metadata_path, "rb") as f:
data = f.read()
content_count = struct.unpack_from(" 1:
raise ValueError("We currently assume that each title has no more than one NCA")
# Download content NCA
content_id = data[0x40:0x50].hex()
content_size = struct.unpack_from("> 1) / 60
time = "%i:%02i.%02i" %(seconds / 60, seconds % 60, (seconds * 100) % 100)
damage = " Damaged " if rankdata.score & 1 else "No damage"
kong = ["No Kong", "Diddy", "Dixie", "Cranky"][rankdata.groups[1]]
name = rankdata.common_data.decode("ascii")[:-1]
print("\t%2i %20s %s (%s) %s" %(rankdata.rank, name, time, damage, kong))
#Now download the world record replay file if available
world_record = rankings.data[0]
if world_record.param: #If world record has a replay file
store = datastore.DataStoreClient(client)
get_param = datastore.DataStorePrepareGetParam()
get_param.data_id = world_record.param
req_info = await store.prepare_get_object(get_param)
headers = {header.key: header.value for header in req_info.headers}
response = await http.get(req_info.url, headers=headers)
response.raise_if_error()
with open("replay.bin", "wb") as f:
f.write(response.body)
anyio.run(main)
================================================
FILE: examples/wiiu/friends.py
================================================
from nintendo.nex import backend, friends, common, settings
from nintendo import nnas
import anyio
import logging
logging.basicConfig(level=logging.INFO)
DEVICE_ID = 12345678 #From MCP_GetDeviceId
SERIAL_NUMBER = "..."
SYSTEM_VERSION = 0x270
REGION = 4 #EUR
COUNTRY = "NL"
LANGUAGE = "en"
USERNAME = "..." #Nintendo network id
PASSWORD = "..." #Nintendo network password
BIRTHDAY = common.DateTime.make(2000, 12, 31)
TITLE_ID = 0x10001C00
TITLE_VERSION = 0
GAME_SERVER_ID = 0x3200
ACCESS_KEY = "ridfebb9"
NEX_VERSION = 20000
def print_requests(requests):
for request in requests:
principal_info = request.principal_info
message = request.message
print("\tWho: %s (%s)" %(principal_info.nnid, principal_info.mii.name))
print("\tMessage:", message.message)
if message.game_key.title_id:
print("\tGame: %016X (v%i)" %(message.game_key.title_id, message.game_key.title_version))
print("\tSent:", request.sent)
print("\tExpires:", message.expires)
print("\t" + "-" * 40)
print()
async def main():
nas = nnas.NNASClient()
nas.set_device(DEVICE_ID, SERIAL_NUMBER, SYSTEM_VERSION)
nas.set_title(TITLE_ID, TITLE_VERSION)
nas.set_locale(REGION, COUNTRY, LANGUAGE)
access_token = await nas.login(USERNAME, PASSWORD)
nex_token = await nas.get_nex_token(access_token.token, GAME_SERVER_ID)
pid = await nas.get_pid(USERNAME)
mii = await nas.get_mii(pid)
s = settings.load("friends")
s.configure(ACCESS_KEY, NEX_VERSION)
async with backend.connect(s, nex_token.host, nex_token.port) as be:
async with be.login(str(nex_token.pid), nex_token.password) as client:
nna_info = friends.NNAInfo()
nna_info.principal_info.pid = pid
nna_info.principal_info.nnid = USERNAME
nna_info.principal_info.mii.name = mii.name
nna_info.principal_info.mii.data = mii.data
#NintendoPresenceV2 tells the server about your online status, which
#game you're currently playing, etc. This will be shown to your friends
#in their friend list (unless you disabled this feature).
presence = friends.NintendoPresenceV2()
friends_client = friends.FriendsClientV2(client)
response = await friends_client.update_and_get_all_information(
nna_info, presence, BIRTHDAY
)
if response.comment.text:
print("Your status message: %s (last changed on %s)" %(response.comment.text, response.comment.changed))
else:
print("You don't have a status message")
if response.friends:
print("Friends:")
for friend in response.friends:
principal_info = friend.nna_info.principal_info
print("\tNNID:", principal_info.nnid)
print("\tName:", principal_info.mii.name)
presence = friend.presence
print("\tOnline:", ["No", "Yes"][presence.is_online])
if presence.game_key.title_id:
print("\tPlaying: %016X (v%i)" %(presence.game_key.title_id, presence.game_key.title_version))
if friend.comment.text:
print("\tStatus: %s (last changed on %s)" %(friend.comment.text, friend.comment.changed))
print("\tFriend since:", friend.befriended)
print("\tLast online:", friend.last_online)
print("\t" + "-" * 40)
print()
else:
print("You don't have any friends")
if response.sent_requests:
print("Friend requests sent:")
print_requests(response.sent_requests)
else:
print("You haven't sent any friend requests")
if response.received_requests:
print("Friend requests received:")
print_requests(response.received_requests)
else:
print("You haven't received any friend requests")
if response.blacklist:
print("Blacklist:")
for item in response.blacklist:
principal_info = item.principal_info
print("\tWho: %s (%s)" %(principal_info.nnid, principal_info.mii.name))
if item.game_key.title_id:
print("\tGame: %016X (%i)" %(item.game_key.title_id, item.game_key.title_version))
print("\tSince:", item.since)
print("\t" + "-" * 40)
else:
print("You haven't blacklisted any users")
anyio.run(main)
================================================
FILE: examples/wiiu/mariokart.py
================================================
from nintendo.nex import backend, ranking, datastore, settings
from nintendo import nnas
from anynet import http
import anyio
import logging
logging.basicConfig(level=logging.INFO)
DEVICE_ID = 12345678 #From MCP_GetDeviceId
SERIAL_NUMBER = "..."
SYSTEM_VERSION = 0x270
REGION_ID = 4 #EU
COUNTRY_ID = 94 #NL
REGION_NAME = "EUR"
COUNTRY_NAME = "NL"
LANGUAGE = "en"
USERNAME = "..." #Nintendo network id
PASSWORD = "..." #Nintendo network password
TRACK_ID = 27 #Mario Kart Stadium
TITLE_ID = 0x000500001010ED00
TITLE_VERSION = 64
GAME_SERVER_ID = 0x1010EB00
ACCESS_KEY = "25dbf96a"
NEX_VERSION = 30504
def format_time(score):
millisec = score % 1000
seconds = score // 1000 % 60
minutes = score // 1000 // 60
return "%i:%02i.%03i" %(minutes, seconds, millisec)
async def main():
nas = nnas.NNASClient()
nas.set_device(DEVICE_ID, SERIAL_NUMBER, SYSTEM_VERSION)
nas.set_title(TITLE_ID, TITLE_VERSION)
nas.set_locale(REGION_ID, COUNTRY_NAME, LANGUAGE)
access_token = await nas.login(USERNAME, PASSWORD)
nex_token = await nas.get_nex_token(access_token.token, GAME_SERVER_ID)
s = settings.default()
s.configure(ACCESS_KEY, NEX_VERSION)
async with backend.connect(s, nex_token.host, nex_token.port) as be:
async with be.login(str(nex_token.pid), nex_token.password) as client:
ranking_client = ranking.RankingClient(client)
order_param = ranking.RankingOrderParam()
order_param.order_calc = ranking.RankingOrderCalc.ORDINAL
order_param.offset = 499 #Start at 500th place
order_param.count = 20 #Download 20 highscores
rankings = await ranking_client.get_ranking(
ranking.RankingMode.GLOBAL, TRACK_ID,
order_param, 0, 0
)
ranking_stats = await ranking_client.get_stats(
TRACK_ID, order_param, ranking.RankingStatFlags.ALL
)
names = await nas.get_nnids([data.pid for data in rankings.data])
#Print some interesting stats
stats = ranking_stats.stats
print("Total:", int(stats[0]))
print("Total time:", format_time(stats[1]))
print("Lowest time:", format_time(stats[2]))
print("Highest time:", format_time(stats[3]))
print("Average time:", format_time(stats[4]))
print("Rankings:")
for rankdata in rankings.data:
time = format_time(rankdata.score)
print("\t%5i %20s %s" %(rankdata.rank, names[rankdata.pid], time))
#Let's download the replay file of whoever is in 500th place
store = datastore.DataStoreClient(client)
rankdata = rankings.data[0]
get_param = datastore.DataStorePrepareGetParam()
get_param.persistence_target.owner_id = rankdata.pid
get_param.persistence_target.persistence_id = TRACK_ID - 16
get_param.extra_data = ["WUP", str(REGION_ID), REGION_NAME, str(COUNTRY_ID), COUNTRY_NAME, ""]
req_info = await store.prepare_get_object(get_param)
headers = {header.key: header.value for header in req_info.headers}
response = await http.get(req_info.url, headers=headers)
response.raise_if_error()
with open("replay.bin", "wb") as f:
f.write(response.body)
anyio.run(main)
================================================
FILE: examples/wiiu/miis.py
================================================
from nintendo import nnas, miis
import anyio
async def main():
nas = nnas.NNASClient()
pid = await nas.get_pid("Kinnay-WiiU")
mii = await nas.get_mii(pid)
print("NNID:", mii.nnid)
print("PID:", mii.pid)
print("Name:", mii.name)
info = miis.MiiData.parse(mii.data)
print("Mii:")
print("\tBirthday: %i-%i" %(info.birth_day, info.birth_month))
print("\tCreator name:", info.creator_name)
print("\tMii color:", info.color)
print("\tMii size: %i%%" %(info.size / 128 * 100))
print("\tMii weight: %i%%" %(info.fatness / 128 * 100))
print("\tGender:", ["Male", "Female"][info.gender])
print("\t----------")
print("\tBlush style:", info.blush_type)
print("\tFace style:", info.face_style)
print("\tFace color:", info.face_color)
print("\tFace shape:", info.face_type)
print("\t----------")
print("\tHair style:", info.hair_type)
print("\tHair color:", info.hair_color)
print("\tHair mirrored:", ["No", "Yes"][info.hair_mirrored])
print("\t----------")
print("\tEye style:", info.eye_type)
print("\tEye color:", info.eye_color)
print("\tEye size:", info.eye_scale)
print("\tEye thickness:", info.eye_thickness)
print("\tEye height:", info.eye_height)
print("\tEye distance:", info.eye_distance)
print("\tEye rotation:", info.eye_rotation)
print("\t----------")
print("\tEyebrow style:", info.eyebrow_type)
print("\tEyebrow color:", info.eyebrow_color)
print("\tEyebrow size:", info.eyebrow_scale)
print("\tEyebrow thickness:", info.eyebrow_thickness)
print("\tEyebrow height:", info.eyebrow_height)
print("\tEyebrow distance:", info.eyebrow_distance)
print("\tEyebrow rotation:", info.eyebrow_rotation)
print("\t----------")
print("\tNose style:", info.nose_type)
print("\tNose size:", info.nose_scale)
print("\tNose height:", info.nose_height)
print("\t----------")
print("\tMouth style:", info.mouth_type)
print("\tMouth color:", info.mouth_color)
print("\tMouth size:", info.mouth_scale)
print("\tMouth thickness:", info.mouth_thickness)
print("\tMouth height:", info.mouth_height)
print("\t----------")
print("\tMustache style:", info.mustache_type)
if info.mustache_type:
print("\tMustache height:", info.mustache_height)
print("\tMustache size:", info.mustache_scale)
print("\tBeard style:", info.beard_type)
if info.beard_type:
print("\tBeard color:", info.beard_color)
print("\t----------")
print("\tGlasses style:", info.glass_type)
if info.glass_type:
print("\tGlasses color:", info.glass_color)
print("\tGlasses size:", info.glass_scale)
print("\tGlasses height:", info.glass_height)
print("\t----------")
print("\tMole:", ["No", "Yes"][info.mole_enabled])
if info.mole_enabled:
print("\tMole size:", info.mole_scale)
print("\tMole X:", info.mole_xpos)
print("\tMole Y:", info.mole_ypos)
print("Images:")
for image in mii.images:
print("\t%s" %image.url)
anyio.run(main)
================================================
FILE: generate_protocols.py
================================================
import string
import os
TYPE_NAME = 0
TYPE_RESERVED = 1
TYPE_SYMBOL = 2
TYPE_NUMBER = 3
TYPE_STRING = 4
TYPE_EOF = 5
class Token:
def __init__(self, type, value, row, col):
self.type = type
self.value = value
self.row = row
self.col = col
NAME_HEAD_CHARS = string.ascii_letters + "_"
NAME_CHARS = NAME_HEAD_CHARS + string.digits
NUMBER_CHARS = string.digits + string.ascii_lowercase
SPECIAL_CHARS = "{}()[]<>:;,.-=!#"
RESERVED_WORDS = [
"import", "protocol", "method", "struct", "enum",
"nex", "revision", "set"
]
CHAR_EOF = "EOF"
class Tokenizer:
def process(self, data):
self.tokens = []
self.state = self.state_next
self.row = 1
self.col = 1
for char in data:
self.state(char)
if char == "\n":
self.row += 1
self.col = 1
else:
self.col += 1
self.state(CHAR_EOF)
self.add(TYPE_EOF, None)
return self.tokens
def error(self, char):
raise ValueError("Unexpected character at %i:%i in %s: %s" %(self.row, self.col, self.state.__name__, char))
def add(self, type, value):
token = Token(type, value, self.token_row, self.token_col)
self.tokens.append(token)
def state_next(self, char):
self.token_row = self.row
self.token_col = self.col
if char == '"':
self.string = ""
self.state = self.state_string
elif char == "/":
self.state = self.state_comment_start
elif char == "0":
self.number = ""
self.state = self.state_number_prefix
elif char in NUMBER_CHARS[:10]:
self.base = 10
self.number = char
self.state = self.state_number
elif char in NAME_HEAD_CHARS:
self.name = char
self.state = self.state_name
elif char in SPECIAL_CHARS:
self.add(TYPE_SYMBOL, char)
elif char in string.whitespace or char == CHAR_EOF:
pass
else:
self.error(char)
def state_comment_start(self, char):
if char == "/":
self.state = self.state_comment_line
elif char == "*":
self.state = self.state_comment_block
else:
self.error(char)
def state_comment_line(self, char):
if char == "\n" or char == CHAR_EOF:
self.state = self.state_next
def state_comment_block(self, char):
if char == CHAR_EOF:
self.error(char)
elif char == "*":
self.state = self.state_comment_end
def state_comment_end(self, char):
if char == "/":
self.state = self.state_next
else:
self.state = self.state_comment_block
self.state(char)
def state_name(self, char):
if char in NAME_CHARS:
self.name += char
else:
if self.name in RESERVED_WORDS:
self.add(TYPE_RESERVED, self.name)
else:
self.add(TYPE_NAME, self.name)
self.state = self.state_next
self.state(char)
def state_string(self, char):
if char == CHAR_EOF:
self.error(char)
elif char == '"':
self.add(TYPE_STRING, self.string)
self.state = self.state_next
else:
self.string += char
def state_number(self, char):
if char.lower() in NUMBER_CHARS[:self.base]:
self.number += char
else:
self.add(TYPE_NUMBER, int(self.number, self.base))
self.state = self.state_next
self.state(char)
def state_number_prefix(self, char):
if char == "x":
self.base = 16
self.state = self.state_number
else:
self.base = 10
self.number = "0"
self.state = self.state_number
self.state(char)
class TokenStream:
def __init__(self, tokens):
self.tokens = tokens
self.index = 0
def read(self):
token = self.tokens[self.index]
self.index += 1
return token
def peek(self):
return self.tokens[self.index]
def rewind(self):
self.index -= 1
def error(self, token):
if token.type == TYPE_EOF:
message = "Unexpected end of file"
else:
message = "Unexpected token at %i:%i: %s" %(token.row, token.col, token.value)
raise ValueError(message)
def read_token(self, type):
token = self.read()
if token.type != type:
self.error(token)
return token
def parse_token(self, type):
return self.read_token(type).value
def skip_token(self, type, value):
token = self.read()
if token.type != type or token.value != value:
self.error(token)
def check_token(self, type, value):
token = self.peek()
if token.type == type and token.value == value:
self.index += 1
return True
return False
def read_reserved(self): return self.read_token(TYPE_RESERVED)
def read_name(self): return self.read_token(TYPE_NAME)
def read_symbol(self): return self.read_token(TYPE_SYMBOL)
def parse_name(self): return self.parse_token(TYPE_NAME)
def parse_number(self): return self.parse_token(TYPE_NUMBER)
def parse_string(self): return self.parse_token(TYPE_STRING)
def check_reserved(self, value): return self.check_token(TYPE_RESERVED, value)
def check_symbol(self, value): return self.check_token(TYPE_SYMBOL, value)
def check_eof(self): return self.check_token(TYPE_EOF, None)
def skip_name(self, value): self.skip_token(TYPE_NAME, value)
def skip_reserved(self, value): self.skip_token(TYPE_RESERVED, value)
def skip_symbol(self, value): self.skip_token(TYPE_SYMBOL, value)
class Scope:
def __init__(self):
self.names = []
def __contains__(self, name):
return name in self.names
def add(self, name):
if name in self.names:
return True
self.names.append(name)
return False
class File:
def __init__(self):
self.protocols = {}
self.structs = {}
self.enums = []
self.scope = Scope()
def check_protocols(self):
for proto in self.protocols.values():
proto.check()
def sort_protocols(self):
for proto in self.protocols.values():
proto.sort()
def sort_types(self):
self.structs = {k: v for k, v in sorted(self.structs.items())}
self.enums = sorted(self.enums, key=lambda e: e.name)
def add_file(self, file):
for proto in file.protocols.values():
self.add_protocol(proto)
for struct in file.structs.values():
self.add_struct(struct)
for enum in file.enums:
self.add_enum(enum)
def add_protocol(self, proto):
if self.scope.add(proto.name):
item = self.protocols.get(proto.name)
if not item or item.file == self or proto.file != self:
raise ValueError("%s is already defined" %proto.name)
self.protocols[proto.name] = proto
def add_struct(self, struct):
if self.scope.add(struct.name):
item = self.structs.get(struct.name)
if not item or item.file == self or struct.file != self:
raise ValueError("%s is already defined" %struct.name)
self.structs[struct.name] = struct
def add_enum(self, enum):
if self.scope.add(enum.name):
raise ValueError("%s is already defined" %enum.name)
self.enums.append(enum)
class Protocol:
id = None
name = None
overridden = False
noresponse = False
def __init__(self):
self.methods = {}
self.scope = Scope()
def sort(self):
self.methods = {k: v for k, v in sorted(self.methods.items())}
def check(self):
if self.noresponse and any(method.response.vars for method in self.methods.values()):
raise ValueError("%s is marked noresponse but at least one method returns a non-empty response" %self.name)
def add_method(self, method):
if self.scope.add(method.name):
raise ValueError("%s is already defined in %s" %(method.name, self.name))
if method.id in self.methods:
raise ValueError("Method id %i is used twice in %s" %(method.id, self.name))
self.methods[method.id] = method
def set_parent(self, parent):
parent.overridden = True
self.id = parent.id
for method in parent.methods.values():
if method.id not in self.methods:
self.add_method(method)
class Method:
id = None
name = None
request = None
response = None
supported = None
class VariableList:
def __init__(self):
self.vars = []
self.scope = Scope()
def add(self, var):
if self.scope.add(var.name):
raise ValueError("Duplicate variable name: %s" %var.name)
self.vars.append(var)
class Variable:
type = None
name = None
default = None
class Type:
name = None
template = None
class Struct:
name = None
parent = None
body = None
class Condition:
VERSION = 0
REVISION = 1
type = None
minimum = None
maximum = None
body = None
class StructBody:
def __init__(self):
self.fields = []
def has_revision(self):
for field in self.fields:
if isinstance(field, Condition):
if field.type == Condition.REVISION:
return True
if field.body.has_revision():
return True
return False
def add(self, field):
self.fields.append(field)
class Enum:
name = None
def __init__(self):
self.values = []
self.scope = Scope()
def add(self, name, value):
if self.scope.add(name):
raise ValueError("Name %s used twice in enum %s" %(name, self.name))
self.values.append((name, value))
TEMPLATE_TYPES = {
"list": 1,
"map": 2
}
NUMERIC_TYPES = [
"uint8", "uint16", "uint32", "uint64",
"sint8", "sint16", "sint32", "sint64",
"pid"
]
STRING_TYPES = [
"string", "buffer", "qbuffer", "stationurl"
]
class Parser:
def process(self, tokens):
stream = TokenStream(tokens)
return self.parse_file(stream)
def parse_file(self, stream):
self.file = File()
while True:
token = stream.peek()
if token.type == TYPE_EOF:
return self.file
elif token.type == TYPE_RESERVED and token.value == "import":
self.parse_import(stream)
elif token.type == TYPE_RESERVED and token.value == "protocol":
self.file.add_protocol(self.parse_protocol(stream))
elif token.type == TYPE_RESERVED and token.value == "struct":
self.file.add_struct(self.parse_struct(stream))
elif token.type == TYPE_RESERVED and token.value == "enum":
self.file.add_enum(self.parse_enum(stream))
else:
stream.error(token)
def parse_import(self, stream):
stream.skip_reserved("import")
name = stream.parse_name()
stream.skip_symbol(";")
print("Importing %s.proto" %name)
path = "nintendo/files/proto/%s.proto" %name
with open(path) as f:
text = f.read()
tokens = Tokenizer().process(text)
file = Parser().process(tokens)
self.file.add_file(file)
def parse_protocol(self, stream):
stream.skip_reserved("protocol")
protocol = Protocol()
protocol.file = self.file
protocol.name = stream.parse_name()
stream.skip_symbol(":")
parent = None
token = stream.read()
if token.type == TYPE_NUMBER:
protocol.id = token.value
elif token.type == TYPE_NAME:
parent = token.value
else:
stream.error(token)
stream.skip_symbol("{")
self.prev_method = 0
while True:
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "}":
stream.skip_symbol("}")
break
elif token.type == TYPE_RESERVED:
if token.value == "method": protocol.add_method(self.parse_method(stream))
elif token.value == "set":
stream.skip_reserved("set")
stream.skip_name("noresponse")
stream.skip_symbol(";")
protocol.noresponse = True
else:
stream.error(token)
else:
stream.error(token)
if parent:
protocol.set_parent(self.file.protocols[parent])
return protocol
def parse_method(self, stream):
stream.skip_reserved("method")
method = Method()
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "(":
stream.skip_symbol("(")
method.id = stream.parse_number()
stream.skip_symbol(")")
else:
method.id = self.prev_method + 1
self.prev_method = method.id
method.name = stream.parse_name()
token = stream.read_symbol()
if token.value == "(":
method.request = self.parse_parameter_list(stream)
stream.skip_symbol("{")
method.response = self.parse_variable_list(stream)
method.supported = True
elif token.value == ";":
method.supported = False
else:
stream.error(token)
return method
def parse_parameter_list(self, stream):
list = VariableList()
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == ")":
stream.skip_symbol(")")
return list
while True:
list.add(self.parse_variable(stream))
token = stream.read_symbol()
if token.value == ")":
return list
elif token.value != ",":
stream.error(token)
def parse_variable_list(self, stream):
list = VariableList()
while True:
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "}":
stream.skip_symbol("}")
return list
list.add(self.parse_variable(stream))
stream.skip_symbol(";")
def parse_variable(self, stream):
var = Variable()
var.type = self.parse_type(stream)
var.name = stream.parse_name()
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "=":
stream.skip_symbol("=")
var.default = self.parse_constant(stream, var.type)
return var
def parse_type(self, stream):
type = Type()
type.name = stream.parse_name()
if type.name in TEMPLATE_TYPES:
type.template = self.parse_template(stream, TEMPLATE_TYPES[type.name])
elif type.name == "anydata":
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "<":
type.template = self.parse_template(stream, 1)
return type
def parse_template(self, stream, num):
template = []
stream.skip_symbol("<")
for i in range(num):
template.append(self.parse_type(stream))
if i < num - 1:
stream.skip_symbol(",")
stream.skip_symbol(">")
return template
def parse_constant(self, stream, type):
if type.name in NUMERIC_TYPES: return stream.parse_number()
elif type.name in STRING_TYPES: return stream.parse_string()
elif type.name == "bool":
token = stream.read_name()
if token.value not in ["false", "true"]:
stream.error(token)
return token.value == "true"
elif type.name == "datetime":
token = stream.read()
if token.type == TYPE_NUMBER: return token.value
elif token.type == TYPE_NAME:
if token.value == "never": return 0
if token.value == "future": return 671076024059
stream.error(token)
elif type.name == "list":
list = []
stream.skip_symbol("[")
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "]":
stream.skip_symbol("]")
return list
subtype = type.template[0]
while True:
list.append(self.parse_constant(stream, subtype))
token = stream.read_symbol()
if token.value == "]":
return list
elif token.value != ",":
stream.error(token)
elif type.name == "map":
map = {}
stream.skip_symbol("{")
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "}":
stream.skip_symbol("}")
return map
keytype = type.template[0]
valuetype = type.template[1]
while True:
key = self.parse_constant(stream, keytype)
stream.skip_symbol(":")
value = self.parse_constant(stream, valuetype)
map[key] = value
token = stream.read_symbol()
if token.value == "}":
return map
elif token.value != ",":
stream.error(token)
else:
raise ValueError("Don't know how to parse constant for %s" %type.name)
def parse_struct(self, stream):
stream.skip_reserved("struct")
struct = Struct()
struct.file = self.file
struct.name = stream.parse_name()
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == ":":
stream.skip_symbol(":")
struct.parent = stream.parse_name()
struct.body = self.parse_struct_body(stream)
return struct
def parse_struct_body(self, stream):
body = StructBody()
stream.skip_symbol("{")
while True:
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "}":
stream.skip_symbol("}")
return body
body.add(self.parse_struct_item(stream))
def parse_struct_item(self, stream):
token = stream.peek()
if token.type == TYPE_RESERVED:
return self.parse_condition(stream)
var = self.parse_variable(stream)
stream.skip_symbol(";")
return var
def parse_condition(self, stream):
cond = Condition()
token = stream.read_reserved()
if token.value == "nex": cond.type = Condition.VERSION
elif token.value == "revision": cond.type = Condition.REVISION
else:
stream.error(token)
cond.minimum = stream.parse_number()
if stream.check_symbol("-"):
cond.maximum = stream.parse_number()
cond.body = self.parse_struct_body(stream)
return cond
def parse_enum(self, stream):
stream.skip_reserved("enum")
enum = Enum()
enum.name = stream.parse_name()
stream.skip_symbol("{")
token = stream.peek()
if token.type == TYPE_SYMBOL and token.value == "}":
stream.skip_symbol("}")
return enum
while True:
name = stream.parse_name()
stream.skip_symbol("=")
value = stream.parse_number()
enum.add(name, value)
token = stream.read_symbol()
if token.value == "}":
return enum
elif token.value != ",":
stream.error(token)
class CodeStream:
def __init__(self):
self.code = ""
self.tabs = 0
def get(self): return self.code
def indent(self): self.tabs += 1
def unindent(self): self.tabs -= 1
def write(self, text):
self.code += text
def begin_line(self):
self.write("\t" * self.tabs)
def write_line(self, line=""):
self.begin_line()
self.write(line + "\n")
BASIC_TYPES = [
"float", "double", "bool",
"pid", "result", "datetime",
"string", "stationurl", "buffer",
"qbuffer", "anydata", "variant"
]
MAPPED_TYPES = {
"uint8": "u8",
"uint16": "u16",
"uint32": "u32",
"uint64": "u64",
"sint8": "s8",
"sint16": "s16",
"sint32": "s32",
"sint64": "s64",
}
EXTERNAL_TYPES = [
"ResultRange", "NotificationEvent"
]
def make_class_name(name, type):
if "_" in name:
name, ext = name.rsplit("_", 1)
return "%s%s%s" %(name, type, ext)
return "%s%s" %(name, type)
class CodeGenerator:
def process(self, file):
self.file = file
self.file.check_protocols()
self.file.sort_protocols()
stream = CodeStream()
self.generate_file(stream)
return stream.get()
def generate_file(self, stream):
self.generate_header(stream)
for enum in self.file.enums:
self.generate_enum(stream, enum)
for struct in self.file.structs.values():
self.generate_struct(stream, struct)
for proto in self.file.protocols.values():
if not proto.overridden:
self.generate_protocol(stream, proto)
for proto in self.file.protocols.values():
if not proto.overridden:
self.generate_client(stream, proto)
for proto in self.file.protocols.values():
if not proto.overridden:
self.generate_server(stream, proto)
def generate_header(self, stream):
stream.write_line()
stream.write_line("# This file was generated automatically by generate_protocols.py")
stream.write_line()
stream.write_line("from nintendo.nex import notification, rmc, common, streams")
stream.write_line()
stream.write_line("import logging")
stream.write_line("logger = logging.getLogger(__name__)")
stream.write_line()
def generate_enum(self, stream, enum):
stream.write_line()
stream.write_line("class %s:" %enum.name)
stream.indent()
if enum.values:
for name, value in enum.values:
stream.write_line("%s = %i" %(name, value))
else:
stream.write_line("pass")
stream.unindent()
stream.write_line()
def generate_struct(self, stream, struct):
stream.write_line()
parent = struct.parent
if parent is None:
parent = "common.Structure"
elif parent == "Data":
parent = "common.Data"
stream.write_line("class %s(%s):" %(struct.name, parent))
stream.indent()
self.generate_struct_init(stream, struct)
self.generate_struct_version(stream, struct)
self.generate_struct_check(stream, struct)
self.generate_struct_load(stream, struct)
self.generate_struct_save(stream, struct)
stream.unindent()
if struct.parent:
stream.write_line('common.DataHolder.register(%s, "%s")' %(struct.name, struct.name))
stream.write_line()
def generate_struct_init(self, stream, struct):
stream.write_line("def __init__(self):")
stream.indent()
stream.write_line("super().__init__()")
self.generate_struct_init_body(stream, struct.body, {})
stream.unindent()
stream.write_line()
def generate_struct_init_body(self, stream, body, defaults):
for field in body.fields:
if isinstance(field, Variable):
if field.name in defaults:
if defaults[field.name] != field.default:
raise ValueError("Duplicate variable name in struct with incompatible defaults: %s" %field.name)
else:
defaults[field.name] = field.default
stream.write_line("self.%s = %s" %(field.name, self.make_constant(field.type, field.default)))
elif isinstance(field, Condition):
self.generate_struct_init_body(stream, field.body, defaults)
def generate_if_statement(self, stream, cond, prefix=""):
field = f'{prefix}settings["nex.version"]' if cond.type == Condition.VERSION else "version"
if cond.maximum is None:
stream.write_line(f"if {field} >= {cond.minimum}:")
else:
stream.write_line(f"if {cond.minimum} <= {field} < {cond.maximum}:")
def generate_struct_version(self, stream, struct):
if struct.body.has_revision():
stream.write_line("def max_version(self, settings):")
stream.indent()
stream.write_line("version = 0")
self.generate_struct_version_body(stream, struct.body)
stream.write_line("return version")
stream.unindent()
stream.write_line()
def generate_struct_version_body(self, stream, body):
for field in body.fields:
if isinstance(field, Condition):
if field.type == Condition.REVISION:
stream.write_line("version = %i" %field.minimum)
elif field.type == Condition.VERSION:
if field.body.has_revision():
self.generate_if_statement(stream, field)
stream.indent()
self.generate_struct_version_body(stream, field.body)
stream.unindent()
def generate_struct_check(self, stream, struct):
stream.write_line("def check_required(self, settings, version):")
stream.indent()
self.generate_struct_check_body(stream, struct.body)
stream.unindent()
stream.write_line()
def generate_struct_check_body(self, stream, body):
required = []
for field in body.fields:
if isinstance(field, Variable):
if field.type.name not in self.file.structs and \
field.type.name not in EXTERNAL_TYPES and \
field.default is None:
required.append(field.name)
if required:
stream.write_line("for field in %s:" %required)
stream.write_line("\tif getattr(self, field) is None:")
stream.write_line('\t\traise ValueError("No value assigned to required field: %s" %field)')
conditions = [f for f in body.fields if isinstance(f, Condition)]
for cond in conditions:
self.generate_if_statement(stream, cond)
stream.indent()
self.generate_struct_check_body(stream, cond.body)
stream.unindent()
if not required and not conditions:
stream.write_line("pass")
def generate_struct_load(self, stream, struct):
stream.write_line("def load(self, stream, version):")
stream.indent()
self.generate_struct_load_body(stream, struct.body)
stream.unindent()
stream.write_line()
def generate_struct_load_body(self, stream, body):
if not body.fields:
stream.write_line("pass")
for field in body.fields:
if isinstance(field, Variable):
stream.write_line("self.%s = %s" %(field.name, self.make_extract(field.type)))
elif isinstance(field, Condition):
self.generate_if_statement(stream, field, "stream.")
stream.indent()
self.generate_struct_load_body(stream, field.body)
stream.unindent()
def generate_struct_save(self, stream, struct):
stream.write_line("def save(self, stream, version):")
stream.indent()
stream.write_line("self.check_required(stream.settings, version)")
self.generate_struct_save_body(stream, struct.body)
stream.unindent()
def generate_struct_save_body(self, stream, body):
for field in body.fields:
if isinstance(field, Variable):
stream.write_line(self.make_encode(field.type, "self.%s" %field.name))
elif isinstance(field, Condition):
self.generate_if_statement(stream, field, "stream.")
stream.indent()
self.generate_struct_save_body(stream, field.body)
stream.unindent()
def generate_protocol(self, stream, proto):
name = make_class_name(proto.name, "Protocol")
stream.write_line()
stream.write_line("class %s:" %name)
stream.indent()
if proto.noresponse:
stream.write_line("NORESPONSE = True")
stream.write_line()
for method in proto.methods.values():
stream.write_line("METHOD_%s = %i" %(method.name.upper(), method.id))
stream.write_line()
stream.write_line("PROTOCOL_ID = 0x%X" %proto.id)
stream.unindent()
stream.write_line()
def generate_client(self, stream, proto):
proto_name = make_class_name(proto.name, "Protocol")
client_name = make_class_name(proto.name, "Client")
stream.write_line()
stream.write_line("class %s(%s):" %(client_name, proto_name))
stream.indent()
stream.write_line("def __init__(self, client):")
stream.write_line("\tself.settings = client.settings")
stream.write_line("\tself.client = client")
stream.write_line()
first = True
for method in proto.methods.values():
if method.supported:
if not first:
stream.write_line()
else:
first = False
self.generate_client_method(stream, proto, method)
stream.unindent()
stream.write_line()
def generate_client_method(self, stream, proto, method):
class_name = make_class_name(proto.name, "Client")
param = ", ".join(["self"] + [param.name for param in method.request.vars])
stream.write_line("async def %s(%s):" %(method.name, param))
stream.indent()
stream.write_line('logger.info("%s.%s()")' %(class_name, method.name))
stream.write_line("#--- request ---")
stream.write_line("stream = streams.StreamOut(self.settings)")
for param in method.request.vars:
stream.write_line(self.make_encode(param.type, param.name))
if proto.noresponse:
stream.write_line("await self.client.request(self.PROTOCOL_ID, self.METHOD_%s, stream.get(), True)" %method.name.upper())
else:
stream.write_line("data = await self.client.request(self.PROTOCOL_ID, self.METHOD_%s, stream.get())" %method.name.upper())
stream.write_line()
stream.write_line("#--- response ---")
stream.write_line("stream = streams.StreamIn(data, self.settings)")
if len(method.response.vars) > 1:
stream.write_line("obj = rmc.RMCResponse()")
for var in method.response.vars:
stream.write_line("obj.%s = %s" %(var.name, self.make_extract(var.type)))
elif len(method.response.vars) == 1:
value = method.response.vars[0]
stream.write_line("%s = %s" %(value.name, self.make_extract(value.type)))
stream.write_line("if not stream.eof():")
stream.write_line('\traise ValueError("Response is bigger than expected (got %i bytes, but only %i were read)" %(stream.size(), stream.tell()))')
stream.write_line('logger.info("%s.%s -> done")' %(class_name, method.name))
if len(method.response.vars) > 1:
stream.write_line("return obj")
elif len(method.response.vars) == 1:
stream.write_line("return %s" %(method.response.vars[0].name))
stream.unindent()
def generate_server(self, stream, proto):
server_name = make_class_name(proto.name, "Server")
proto_name = make_class_name(proto.name, "Protocol")
stream.write_line()
stream.write_line("class %s(%s):" %(server_name, proto_name))
stream.indent()
stream.write_line("def __init__(self):")
stream.indent()
stream.write_line("self.methods = {")
for method in proto.methods.values():
stream.write_line("\tself.METHOD_%s: self.handle_%s," %(method.name.upper(), method.name))
stream.write_line("}")
stream.unindent()
stream.write_line()
stream.write_line("async def logout(self, client):")
stream.write_line("\tpass")
stream.write_line()
stream.write_line("async def handle(self, client, method_id, input, output):")
stream.write_line("\tif method_id in self.methods:")
stream.write_line("\t\tawait self.methods[method_id](client, input, output)")
stream.write_line("\telse:")
stream.write_line('\t\tlogger.warning("Unknown method called on %s: %%i", method_id)' %server_name)
stream.write_line('\t\traise common.RMCError("Core::NotImplemented")')
for method in proto.methods.values():
stream.write_line()
self.generate_server_method(stream, proto, method)
for method in proto.methods.values():
if method.supported:
stream.write_line()
self.generate_server_stub(stream, proto, method)
stream.unindent()
stream.write_line()
def generate_server_method(self, stream, proto, method):
class_name = make_class_name(proto.name, "Server")
stream.write_line("async def handle_%s(self, client, input, output):" %method.name)
if not method.supported:
stream.write_line('\tlogger.warning("%s.%s is not supported")' %(class_name, method.name))
stream.write_line('\traise common.RMCError("Core::NotImplemented")')
return
stream.indent()
stream.write_line('logger.info("%s.%s()")' %(class_name, method.name))
stream.write_line("#--- request ---")
for param in method.request.vars:
stream.write_line("%s = %s" %(param.name, self.make_extract(param.type, "input")))
params = ", ".join(["client"] + [p.name for p in method.request.vars])
if len(method.response.vars) > 1:
names = [var.name for var in method.response.vars]
stream.write_line("response = await self.%s(%s)" %(method.name, params))
stream.write_line()
stream.write_line("#--- response ---")
stream.write_line("if not isinstance(response, rmc.RMCResponse):")
stream.write_line('\traise RuntimeError("Expected RMCResponse, got %s" %response.__class__.__name__)')
stream.write_line("for field in %s:" %names)
stream.write_line("\tif not hasattr(response, field):")
stream.write_line('\t\traise RuntimeError("Missing field in RMCResponse: %s" %field)')
for var in method.response.vars:
stream.write_line(self.make_encode(var.type, "response.%s" %var.name, "output"))
elif len(method.response.vars) == 1:
var = method.response.vars[0]
expected = self.make_python_type(var.type)
stream.write_line("response = await self.%s(%s)" %(method.name, params))
stream.write_line()
stream.write_line("#--- response ---")
stream.write_line("if not isinstance(response, %s):" %expected)
stream.write_line('\traise RuntimeError("Expected %s, got %%s" %%response.__class__.__name__)' %expected)
stream.write_line(self.make_encode(var.type, "response", "output"))
else:
stream.write_line("await self.%s(%s)" %(method.name, params))
stream.unindent()
def generate_server_stub(self, stream, proto, method):
class_name = make_class_name(proto.name, "Server")
stream.write_line("async def %s(self, *args):" %method.name)
stream.write_line('\tlogger.warning("%s.%s not implemented")' %(class_name, method.name))
stream.write_line('\traise common.RMCError("Core::NotImplemented")')
def make_python_type(self, type):
if type.name == "bool": return "bool"
if type.name == "list": return "list"
if type.name == "map": return "dict"
if type.name == "string": return "str"
if type.name == "variant": return "object"
if type.name in ["buffer", "qbuffer"]: return "bytes"
if type.name == "datetime": return "common.DateTime"
if type.name == "stationurl": return "common.StationURL"
if type.name == "result": return "common.Result"
if type.name == "anydata":
if type.template:
return self.make_python_type(type.template[0])
return "common.Data"
if type.name == "ResultRange": return "common.ResultRange"
if type.name == "NotificationEvent": return "notification.NotificationEvent"
if type.name in self.file.structs: return type.name
if type.name in NUMERIC_TYPES: return "int"
raise ValueError("Unknown type: %s" %type.name)
def make_constant(self, type, value):
if type.name in self.file.structs: return "%s()" %type.name
if type.name == "ResultRange": return "common.ResultRange()"
if type.name == "NotificationEvent": return "notification.NotificationEvent()"
if value is None:
return "None"
if type.name == "datetime": return "common.DateTime(%i)" %value
if type.name == "string": return '"%s"' %value
if type.name == "stationurl": return 'common.StationURL.parse("%s")' %value
if type.name in ["buffer", "qbuffer"]: return 'b"%s"' %value
if type.name in NUMERIC_TYPES + ["bool"]: return str(value)
if type.name == "list":
entries = []
for entry in value:
entries.append(self.make_constant(type.template[0], entry))
return "[%s]" %", ".join(entries)
if type.name == "map":
items = []
for key, value in value.items():
key = self.make_constant(type.template[0], key)
value = self.make_constant(type.template[1], value)
items.append("%s: %s" %(key, value))
return "{%s}" %", ".join(items)
raise ValueError("Unknown type: %s" %type.name)
def make_extract(self, type, stream="stream"):
if type.name in BASIC_TYPES: return "%s.%s()" %(stream, type.name)
if type.name in MAPPED_TYPES: return "%s.%s()" %(stream, MAPPED_TYPES[type.name])
if type.name in self.file.structs: return "%s.extract(%s)" %(stream, type.name)
if type.name == "ResultRange": return "%s.extract(common.ResultRange)" %stream
if type.name == "NotificationEvent": return "%s.extract(notification.NotificationEvent)" %stream
if type.name == "list":
func = self.make_extract_func(type.template[0], stream)
return "%s.list(%s)" %(stream, func)
if type.name == "map":
keyfunc = self.make_extract_func(type.template[0], stream)
valuefunc = self.make_extract_func(type.template[1], stream)
return "%s.map(%s, %s)" %(stream, keyfunc, valuefunc)
raise ValueError("Unknown type: %s" %type.name)
def make_extract_func(self, type, stream="stream"):
if type.name in BASIC_TYPES: return "%s.%s" %(stream, type.name)
if type.name in MAPPED_TYPES: return "%s.%s" %(stream, MAPPED_TYPES[type.name])
if type.name in self.file.structs: return type.name
if type.name == "ResultRange": return "common.ResultRange"
if type.name == "NotificationEvent": return "notification.NotificationEvent"
if type.name == "list":
return "lambda: %s.list(%s)" %(stream, self.make_extract_func(type.template[0], stream))
raise ValueError("Unknown type in list: %s" %type.name)
def make_encode(self, type, name, stream="stream"):
if type.name == "list":
func = self.make_encode_func(type.template[0], stream)
return "%s.list(%s, %s)" %(stream, name, func)
if type.name == "map":
keyfunc = self.make_encode_func(type.template[0], stream)
valuefunc = self.make_encode_func(type.template[1], stream)
return "%s.map(%s, %s, %s)" %(stream, name, keyfunc, valuefunc)
return "%s(%s)" %(self.make_encode_func(type, stream), name)
def make_encode_func(self, type, stream="stream"):
if type.name in BASIC_TYPES: return "%s.%s" %(stream, type.name)
if type.name in MAPPED_TYPES: return "%s.%s" %(stream, MAPPED_TYPES[type.name])
if type.name in self.file.structs: return "%s.add" %stream
if type.name in EXTERNAL_TYPES: return "%s.add" %stream
if type.name == "list":
return "lambda x: %s.list(x, %s)" %(stream, self.make_encode_func(type.template[0], stream))
raise ValueError("Unknown type: %s" %type.name)
class DocsGenerator:
def process(self, file, name):
self.file = file
self.file.sort_types()
self.text = ""
self.generate_file(name)
return self.text
def generate_file(self, name):
self.generate_header(name)
for proto in self.file.protocols.values():
if not proto.overridden:
self.generate_client(proto)
for proto in self.file.protocols.values():
if not proto.overridden:
self.generate_server(proto)
for enum in self.file.enums:
self.generate_enum(enum)
for struct in self.file.structs.values():
self.generate_struct(struct)
def generate_header(self, name):
self.text += "\n# Module: nintendo.nex.%s\n\n" %name
self.text += "Provides a client and server for the "
protocols = []
for proto in self.file.protocols.values():
if not proto.overridden:
protocols.append(proto)
for i, proto in enumerate(protocols):
self.text += "`%s`" %make_class_name(proto.name, "Protocol")
if i < len(protocols) - 2:
self.text += ", "
elif i == len(protocols) - 2:
self.text += " and "
self.text += ". This page was generated automatically from `%s.proto`.\n\n" %name
for proto in self.file.protocols.values():
if not proto.overridden:
name = make_class_name(proto.name, "Client")
proto = make_class_name(proto.name, "Protocol")
self.text += "**class** [%s](#%s)
\n" %(name, name.lower())
self.text += 'The client for the `%s`.\n\n' %proto
for proto in self.file.protocols.values():
if not proto.overridden:
name = make_class_name(proto.name, "Server")
proto = make_class_name(proto.name, "Protocol")
self.text += "**class** [%s](#%s)
\n" %(name, name.lower())
self.text += 'The server for the `%s`.\n\n' %proto
for enum in self.file.enums:
self.text += "**class** [%s](#%s)
\n" %(enum.name, enum.name.lower())
if self.file.enums:
self.text += "\n"
for struct in self.file.structs.values():
if not struct.parent:
parent = "[Structure](common.md)"
elif struct.parent == "Data":
parent = "[Data](common.md)"
elif struct.parent in self.file.structs:
parent = "[%s](#%s)" %(struct.parent, struct.parent.lower())
else:
raise ValueError("Unknown struct parent: %s" %struct.parent)
self.text += "**class** [%s](#%s)(%s)
\n" %(struct.name, struct.name.lower(), parent)
if self.file.structs:
self.text += "\n"
def generate_enum(self, enum):
self.text += "## %s\n" %enum.name
self.text += "This class defines the following constants:
\n"
self.text += '\n'
for name, value in enum.values:
self.text += "`%s = %i`
\n" %(name, value)
self.text += "\n\n"
def generate_struct(self, struct):
self.text += "## %s\n" %struct.name
self.text += "**def _\\_init__**()
\n"
self.text += 'Creates a new `%s` instance.' %struct.name
self.text += " Required fields must be filled in manually.\n\n"
self.text += "The following fields are defined in this class:
\n"
self.generate_struct_body(struct.body)
self.text += "\n"
def generate_struct_body(self, body):
self.text += '\n'
for field in body.fields:
if isinstance(field, Variable):
variable = self.format_variable(field, True)
self.text += "%s
\n" %variable
elif isinstance(field, Condition):
type = {
Condition.VERSION: "nex.version",
Condition.REVISION: "revision"
}[field.type]
if field.maximum is None:
self.text += f"If `{type}` >= {field.minimum}:
\n"
else:
self.text += f"If {field.minimum} <= `{type}` < {field.maximum}:
\n"
self.generate_struct_body(field.body)
self.text += "
\n"
def generate_client(self, proto):
name = make_class_name(proto.name, "Client")
self.text += "## %s\n" %name
self.text += "**def _\\_init__**(client: [RMCClient](rmc.md#rmcclient) / [HppClient](hpp.md#hppclient))
\n"
self.text += 'Creates a new [`%s`](#%s).\n\n' %(name, name.lower())
for method in proto.methods.values():
if method.supported:
self.generate_client_method(method)
def generate_client_method(self, method):
param = ", ".join([self.format_variable(param, False) for param in method.request.vars])
rval = self.format_return_value(method)
self.text += "**async def %s**(%s) -> %s
\n" %(method.name, param, rval)
self.text += 'Calls method `%i` on the server.' %method.id
if len(method.response.vars) > 1:
self.text += " The RMC response has the following attributes:
\n"
self.text += '\n'
for var in method.response.vars:
self.text += "%s
\n" %self.format_variable(var, False)
self.text += "\n"
self.text += "\n\n"
def generate_server(self, proto):
name = make_class_name(proto.name, "Server")
self.text += "## %s\n" %name
self.text += "**def _\\_init__**()
\n"
self.text += 'Creates a new [`%s`](#%s).\n\n' %(name, name.lower())
self.text += "**async def logout**(client: [RMCClient](rmc.md#rmcclient)) -> None
\n"
self.text += 'Called whenever a client is disconnected. May be overridden by a subclass.\n\n'
for method in proto.methods.values():
if method.supported:
self.generate_server_method(method)
def generate_server_method(self, method):
param = ["client: [RMCClient](rmc.md#rmcclient)"]
param += [self.format_variable(param, False) for param in method.request.vars]
param = ", ".join(param)
rval = self.format_return_value(method)
self.text += "**async def %s**(%s) -> %s
\n" %(method.name, param, rval)
self.text += 'Handler for method `%i`.' %method.id
self.text += " This method should be overridden by a subclass."
if len(method.response.vars) > 1:
self.text += " The RMC response must have the following attributes:
\n"
self.text += '\n'
for var in method.response.vars:
self.text += "%s
\n" %self.format_variable(var, False)
self.text += "\n"
self.text += "\n\n"
def format_variable(self, var, defaults):
text = "%s: %s" %(var.name, self.format_type(var.type))
if defaults:
if var.default is not None or var.type.name in ["ResultRange", "NotificationEvent"] or var.type.name in self.file.structs:
text += " = %s" %self.format_constant(var.type, var.default)
return text
def format_type(self, type):
if type.name == "bool": return "bool"
if type.name == "string": return "str"
if type.name in ["float", "double"]: return "float"
if type.name in ["buffer", "qbuffer"]: return "bytes"
if type.name == "variant": return "object"
if type.name == "datetime": return "[DateTime](common.md#datetime)"
if type.name == "stationurl": return "[StationURL](common.md#stationurl)"
if type.name == "result": return "[Result](common.md#result)"
if type.name == "anydata":
if type.template:
return self.format_type(type.template[0])
return "[Data](common.md)"
if type.name == "ResultRange": return "[ResultRange](common.md#resultrange)"
if type.name == "NotificationEvent": return "[NotificationEvent](notification.md#notificationevent)"
if type.name in self.file.structs: return "[%s](#%s)" %(type.name, type.name.lower())
if type.name in NUMERIC_TYPES: return "int"
if type.name == "list": return "list[%s]" %self.format_type(type.template[0])
if type.name == "map": return "dict[%s, %s]" %(
self.format_type(type.template[0]), self.format_type(type.template[1])
)
raise ValueError("Unknown type: %s" %type.name)
def format_return_value(self, method):
if len(method.response.vars) > 1:
return "[RMCResponse](common.md)"
if len(method.response.vars) == 1:
return self.format_type(method.response.vars[0].type)
return "None"
def format_constant(self, type, value):
if type.name in self.file.structs: return "[%s](#%s)()" %(type.name, type.name.lower())
if type.name == "ResultRange": return "[ResultRange](common.md#resultrange)()"
if type.name == "NotificationEvent": return "[NotificationEvent](notification.md#notificationevent)()"
if type.name in NUMERIC_TYPES + ["bool"]: return str(value)
if type.name in ["buffer", "qbuffer"]: return 'b"%s"' %value
if type.name in ["string", "stationurl"]: return '"%s"' %value
if type.name == "datetime":
if value == 0:
return "[DateTime](common.md#datetime).never()"
elif value == 671076024059:
return "[DateTime](common.md#datetime).future()"
return "[DateTime](common.md#datetime)(%i)" %value
if type.name == "list":
entries = []
for entry in value:
entries.append(self.format_constant(type.template[0], entry))
return "[%s]" %", ".join(entries)
if type.name == "map":
items = []
for key, value in value.items():
key = self.format_constant(type.template[0], key)
value = self.format_constant(type.template[1], value)
items.append("%s: %s" %(key, value))
return "{%s}" %", ".join(items)
raise ValueError("Unknown type: %s" %type.name)
def process(filename):
filepath = os.path.join("nintendo/files/proto", filename)
name = os.path.splitext(filename)[0]
print("Parsing %s" %filename)
with open(filepath) as f:
text = f.read()
tokens = Tokenizer().process(text)
file = Parser().process(tokens)
code = CodeGenerator().process(file)
docs = DocsGenerator().process(file, name)
with open("nintendo/nex/%s.py" %name, "wb") as f:
f.write(code.encode())
with open("docs/reference/nex/%s.md" %name, "wb") as f:
f.write(docs.encode())
for name in os.listdir("nintendo/files/proto"):
process(name)
================================================
FILE: mkdocs.yml
================================================
site_name: NintendoClients
theme: readthedocs
extra_css: [style.css]
================================================
FILE: nintendo/__init__.py
================================================
================================================
FILE: nintendo/files/config/3ds.cfg
================================================
prudp.version = 0
prudp.fragment_size = 962
================================================
FILE: nintendo/files/config/default.cfg
================================================
nex.version = 0
nex.client_version = 0
nex.struct_header = 0
nex.pid_size = 4
prudp.access_key =
prudp.version = 2
prudp.minor_version = 4
prudp.supported_functions = 0
prudp.transport = 0
prudp.compression = 0
prudp.encryption = 1
prudp.resend_timeout = 1
prudp.resend_limit = 2
prudp.ping_timeout = 5
prudp.fragment_size = 1300
prudp.max_substream_id = 0
prudp_v0.signature_version = 0
prudp_v0.flags_version = 1
prudp_v0.checksum_version = 1
kerberos.key_size = 32
kerberos.key_derivation = 0
kerberos.ticket_version = 1
================================================
FILE: nintendo/files/config/friends.cfg
================================================
prudp.version = 0
prudp.fragment_size = 962
prudp_v0.signature_version = 1
kerberos.key_size = 16
================================================
FILE: nintendo/files/config/switch.cfg
================================================
prudp.minor_version = 5
prudp.transport = 2
prudp.encryption = 0
prudp.resend_timeout = 5
prudp.resend_limit = 0
kerberos.key_derivation = 1
nex.pid_size = 8
nex.struct_header = 1
================================================
FILE: nintendo/files/proto/aauser.proto
================================================
struct ApplicationInfo {
uint64 title_id;
uint16 title_version;
}
protocol AAUser : 123 {
method register_application(uint64 title_id) {}
method unregister_application(uint64 title_id) {}
method set_application_info(list application_info) {}
method get_application_info() {
list info;
}
}
================================================
FILE: nintendo/files/proto/account.proto
================================================
struct AccountData {
pid pid;
string name;
uint32 groups;
string email;
datetime creation_date;
datetime effective_date;
string not_effective_message;
datetime expiry_date;
string expired_message;
}
struct BasicAccountInfo {
pid pid;
string name;
}
protocol Account : 25 {
method create_account(string name, string key, uint32 groups, string email) {
result result;
}
method delete_account(pid pid) {}
method disable_account(pid pid, datetime until, string message) {
result result;
}
method change_password(string new_key) { bool result; }
method test_capability(uint32 capability) { bool result; }
method get_name(pid pid) { string name; }
method get_account_data() {
result result;
AccountData data;
}
method get_private_data() {
bool result;
anydata data;
}
method get_public_data(pid pid) {
bool result;
anydata data;
}
method get_multiple_public_data(list pids) {
bool result;
list data;
}
method update_account_name(string name) { result result; }
method update_account_email(string email) { result result; }
method update_custom_data(anydata public_data, anydata private_data) {
result result;
}
method find_by_name_regex(uint32 groups, string regex, ResultRange range) {
list accounts;
}
method update_account_expiry_date(pid pid, datetime expiry, string message) {}
method update_account_effective_date(pid pid, datetime effective_from, string message) {}
method update_status(string status) {}
method get_status(pid pid) {
string status;
}
method get_last_connection_stats(pid pid) {
datetime last_session_login;
datetime last_session_logout;
datetime current_session_login;
}
method reset_password() { bool result; }
method create_account_with_custom_data(
string name, string key, uint32 groups, string email,
anydata public_data, anydata private_data
) {}
method retrieve_account() {
AccountData account_data;
anydata public_data;
anydata private_data;
}
method update_account(
string key, string email, anydata public_data,
anydata private_data
) {}
method change_password_by_guest(string name, string email, string key) {}
method find_by_name_like(uint32 groups, string like, ResultRange range) {
list accounts;
}
method custom_create_account(string name, string key, uint32 groups, string email, anydata auth_data) {
pid pid;
}
method nintendo_create_account(string name, string key, uint32 groups, string email, anydata auth_data) {
pid pid;
string pid_hmac;
}
method lookup_or_create_account(string name, string key, uint32 groups, string email, anydata auth_data) {
pid pid;
}
method disconnect_principal(pid pid) { bool result; }
method disconnect_all_principals() { bool result; }
}
================================================
FILE: nintendo/files/proto/authentication.proto
================================================
// Defines protocol 10
struct AuthenticationInfo : Data {
string token;
uint32 ngs_version = 3;
uint8 token_type = 1;
uint32 server_version = 0;
}
struct RVConnectionData {
stationurl main_station = "prudp:/";
list special_protocols = [];
stationurl special_station = "prudp:/";
nex 30500 {
revision 1 {
datetime server_time = 0;
}
}
}
struct ValidateAndRequestTicketParam {
uint32 platform = 3;
string username;
anydata data;
bool skip_version_check = false;
uint32 nex_version;
uint32 client_version;
}
struct ValidateAndRequestTicketResult {
pid pid;
buffer ticket;
stationurl server_url;
datetime server_time;
string server_name;
string source_key;
}
protocol Authentication : 10 {
method login(string username) {
result result;
pid pid;
buffer ticket;
RVConnectionData connection_data;
string server_name;
}
method login_ex(string username, anydata extra_data) {
result result;
pid pid;
buffer ticket;
RVConnectionData connection_data;
string server_name;
}
method request_ticket(pid source, pid target) {
result result;
buffer ticket;
}
method get_pid(string username) {
pid pid;
}
method get_name(pid pid) {
string name;
}
method login_with_context(anydata login_data) {
result result;
pid pid;
buffer ticket;
RVConnectionData connection_data;
}
}
protocol Authentication_NX : 10 {
method validate_and_request_ticket(string username) {
result result;
pid pid;
buffer ticket;
RVConnectionData connection_data;
string server_name;
}
method validate_and_request_ticket_with_custom_data(string username, anydata extra_data) {
result result;
pid pid;
buffer ticket;
RVConnectionData connection_data;
string server_name;
string source_key;
}
method request_ticket(pid source, pid target) {
result result;
buffer ticket;
string key;
}
method get_pid(string username) {
pid pid;
}
method get_name(pid pid) {
string name;
}
method validate_and_request_ticket_with_param(ValidateAndRequestTicketParam param) {
ValidateAndRequestTicketResult result;
}
}
================================================
FILE: nintendo/files/proto/datastore.proto
================================================
struct DataStoreChangeMetaCompareParam {
uint32 comparison_flag;
string name;
DataStorePermission permission;
DataStorePermission delete_permission;
uint16 period;
qbuffer meta_binary;
list tags;
uint32 referred_count;
uint16 data_type;
uint8 status;
}
struct DataStoreChangeMetaParam {
uint64 data_id;
uint32 modifies_flag;
string name;
DataStorePermission permission;
DataStorePermission delete_permission;
uint16 period;
qbuffer meta_binary;
list tags;
uint64 update_password;
uint32 referred_count;
uint16 data_type;
uint8 status;
DataStoreChangeMetaCompareParam compare_param;
DataStorePersistenceTarget persistence_target;
}
struct DataStoreChangeMetaParamV1 {
uint64 data_id;
uint32 modifies_flag;
string name;
DataStorePermission permission;
DataStorePermission delete_permission;
uint16 period;
qbuffer meta_binary;
list tags;
uint64 update_password;
}
struct DataStoreCompletePostParam {
uint64 data_id;
bool success;
}
struct DataStoreCompletePostParamV1 {
uint32 data_id;
bool success;
}
struct DataStoreCompleteUpdateParam {
uint64 data_id;
uint32 version;
bool success;
}
struct DataStoreDeleteParam {
uint64 data_id;
uint64 update_password;
}
struct DataStoreGetMetaParam {
uint64 data_id = 0;
DataStorePersistenceTarget persistence_target;
uint8 result_option = 0;
uint64 access_password = 0;
}
struct DataStoreGetNewArrivedNotificationsParam {
uint64 last_notification_id;
uint16 limit;
}
struct DataStoreGetNotificationUrlParam {
string previous_url;
}
struct DataStoreGetSpecificMetaParam {
list data_ids;
}
struct DataStoreGetSpecificMetaParamV1 {
list data_ids;
}
struct DataStoreKeyValue {
string key;
string value;
}
struct DataStoreMetaInfo {
uint64 data_id;
pid owner_id;
uint32 size;
string name;
uint16 data_type;
qbuffer meta_binary;
DataStorePermission permission;
DataStorePermission delete_permission;
datetime create_time;
datetime update_time;
uint16 period;
uint8 status;
uint32 referred_count;
uint32 refer_data_id;
uint32 flag;
datetime referred_time;
datetime expire_time;
list tags;
list ratings;
}
struct DataStoreNotification {
uint64 notification_id;
uint64 data_id;
}
struct DataStoreNotificationV1 {
uint64 notification_id;
uint32 data_id;
}
struct DataStorePasswordInfo {
uint64 data_id;
uint64 access_password;
uint64 update_password;
}
struct DataStorePermission {
uint8 permission = 3;
list recipients = [];
}
struct DataStorePersistenceInfo {
pid owner_id;
uint16 slot_id;
uint64 data_id;
}
struct DataStorePersistenceInitParam {
uint16 persistence_id = 65535;
bool delete_last_object = true;
}
struct DataStorePersistenceTarget {
pid owner_id = 0;
uint16 persistence_id = 65535;
}
struct DataStorePrepareGetParam {
uint64 data_id = 0;
uint32 lock_id = 0;
DataStorePersistenceTarget persistence_target;
uint64 access_password = 0;
nex 30500 {
list extra_data = [];
}
}
struct DataStorePrepareGetParamV1 {
uint32 data_id;
uint32 lock_id = 0;
}
struct DataStorePreparePostParam {
uint32 size;
string name;
uint16 data_type;
qbuffer meta_binary;
DataStorePermission permission;
DataStorePermission delete_permission;
uint32 flag;
uint16 period;
uint32 refer_data_id = 0;
list tags = [];
list rating_init_param = [];
DataStorePersistenceInitParam persistence_init_param;
nex 30500 {
list extra_data;
}
}
struct DataStorePreparePostParamV1 {
uint32 size;
string name;
uint16 data_type = 0;
qbuffer meta_binary = "";
DataStorePermission permission;
DataStorePermission delete_permission;
uint32 flag;
uint16 period;
uint32 refer_data_id = 0;
list tags;
list rating_init_param;
}
struct DataStorePrepareUpdateParam {
uint64 data_id;
uint32 size;
uint64 update_password;
list extra_data;
}
struct DataStoreRateObjectParam {
sint32 rating_value;
uint64 access_password;
}
struct DataStoreRatingInfo {
sint64 total_value;
uint32 count;
sint64 initial_value;
}
struct DataStoreRatingInfoWithSlot {
uint8 slot;
DataStoreRatingInfo info;
}
struct DataStoreRatingInitParam {
uint8 flag;
uint8 internal_flag;
uint8 lock_type;
sint64 initial_value;
sint32 range_min;
sint32 range_max;
sint8 period_hour;
sint16 period_duration;
}
struct DataStoreRatingInitParamWithSlot {
sint8 slot;
DataStoreRatingInitParam param;
}
struct DataStoreRatingLog {
bool is_rated;
pid pid;
sint32 rating_value;
datetime lock_expiration_time;
}
struct DataStoreRatingTarget {
uint64 data_id;
sint8 slot;
}
struct DataStoreReqGetAdditionalMeta {
pid owner_id;
uint16 data_type;
uint16 version;
qbuffer meta_binary;
}
struct DataStoreReqGetInfo {
string url;
list headers;
uint32 size;
buffer root_ca_cert;
nex 30500 {
uint64 data_id;
}
}
struct DataStoreReqGetInfoV1 {
string url;
list headers;
uint32 size;
buffer root_ca_cert;
}
struct DataStoreReqGetNotificationUrlInfo {
string url;
string key;
string query;
buffer root_ca_cert;
}
struct DataStoreReqPostInfo {
uint64 data_id;
string url;
list headers;
list form;
buffer root_ca_cert;
}
struct DataStoreReqPostInfoV1 {
uint32 data_id;
string url;
list headers;
list form;
buffer root_ca_cert;
}
struct DataStoreReqUpdateInfo {
uint32 version;
string url;
list headers;
list form;
buffer root_ca_cert;
}
struct DataStoreSearchParam {
uint8 search_target = 1;
list owner_ids = [];
uint8 owner_type = 0;
list destination_ids = [];
uint16 data_type = 65535;
datetime created_after = future;
datetime created_before = future;
datetime updated_after = future;
datetime updated_before = future;
uint32 refer_data_id = 0;
list tags = [];
uint8 result_order_column = 0;
uint8 result_order = 0;
ResultRange result_range;
uint8 result_option = 0;
uint32 minimal_rating_frequency = 0;
bool use_cache = false;
bool total_count_enabled = true;
list data_types = [];
}
struct DataStoreSearchResult {
uint32 total_count;
list result;
uint8 total_count_type;
}
struct DataStoreSpecificMetaInfo {
uint64 data_id;
pid owner_id;
uint32 size;
uint16 data_type;
uint32 version;
}
struct DataStoreSpecificMetaInfoV1 {
uint32 data_id;
pid owner_id;
uint32 size;
uint16 data_type;
uint16 version;
}
struct DataStoreTouchObjectParam {
uint64 data_id;
uint32 lock_id;
uint64 access_password;
}
protocol DataStore : 115 {
method prepare_get_object_v1(DataStorePrepareGetParamV1 param) {
DataStoreReqGetInfoV1 info;
}
method prepare_post_object_v1(DataStorePreparePostParamV1 param) {
DataStoreReqPostInfoV1 info;
}
method complete_post_object_v1(DataStoreCompletePostParamV1 param) {}
method delete_object(DataStoreDeleteParam param) {}
method delete_objects(list param, bool transactional) {
list results;
}
method change_meta_v1(DataStoreChangeMetaParamV1 param) {}
method change_metas_v1(list data_ids, list param, bool transactional) {
list results;
}
method get_meta(DataStoreGetMetaParam param) {
DataStoreMetaInfo info;
}
method get_metas(list data_ids, DataStoreGetMetaParam param) {
list info;
list results;
}
method prepare_update_object(DataStorePrepareUpdateParam param) {
DataStoreReqUpdateInfo info;
}
method complete_update_object(DataStoreCompleteUpdateParam param) {}
method search_object(DataStoreSearchParam param) {
DataStoreSearchResult result;
}
method get_notification_url(DataStoreGetNotificationUrlParam param) {
DataStoreReqGetNotificationUrlInfo info;
}
method get_new_arrived_notifications_v1(DataStoreGetNewArrivedNotificationsParam param) {
list result;
bool has_next;
}
method rate_object(DataStoreRatingTarget target, DataStoreRateObjectParam param, bool fetch_ratings) {
DataStoreRatingInfo info;
}
method get_rating(DataStoreRatingTarget target, uint64 access_password) {
DataStoreRatingInfo rating;
}
method get_ratings(list data_ids, uint64 access_password) {
list> ratings;
list results;
}
method reset_rating(DataStoreRatingTarget target, uint64 update_password) {}
method reset_ratings(list data_ids, bool transactional) {
list results;
}
method get_specific_meta_v1(DataStoreGetSpecificMetaParamV1 param) {
list infos;
}
method post_meta_binary(DataStorePreparePostParam param) {
uint64 data_id;
}
method touch_object(DataStoreTouchObjectParam param) {}
method get_rating_with_log(DataStoreRatingTarget target, uint64 access_password) {
DataStoreRatingInfo rating;
DataStoreRatingLog log;
}
method prepare_post_object(DataStorePreparePostParam param) {
DataStoreReqPostInfo info;
}
method prepare_get_object(DataStorePrepareGetParam param) {
DataStoreReqGetInfo info;
}
method complete_post_object(DataStoreCompletePostParam param) {}
method get_new_arrived_notifications(DataStoreGetNewArrivedNotificationsParam param) {
list result;
bool has_next;
}
method get_specific_meta(DataStoreGetSpecificMetaParam param) {
list infos;
}
method get_persistence_info(pid owner_id, uint16 slot_id) {
DataStorePersistenceInfo info;
}
method get_persistence_infos(pid owner_id, list slot_ids) {
list infos;
list results;
}
method perpetuate_object(uint16 persistence_slot_id, uint64 data_id, bool delete_last_object) {}
method unperpetuate_object(uint16 persistence_slot_id, bool delete_last_object) {}
method prepare_get_object_or_meta_binary(DataStorePrepareGetParam param) {
DataStoreReqGetInfo get_info;
DataStoreReqGetAdditionalMeta additional_meta;
}
method get_password_info(uint64 data_id) {
DataStorePasswordInfo info;
}
method get_password_infos(list data_ids) {
list infos;
list results;
}
method get_metas_multiple_param(list params) {
list infos;
list results;
}
method complete_post_objects(list data_ids) {}
method change_meta(DataStoreChangeMetaParam param) {}
method change_metas(list data_ids, list param, bool transactional) {
list results;
}
method rate_objects(list targets, list param, bool transactional, bool fetch_ratings) {
list infos;
list results;
}
method post_meta_binary_with_data_id(uint64 data_id, DataStorePreparePostParam param) {}
method post_meta_binaries_with_data_id(list data_ids, list param, bool transactional) {
list results;
}
method rate_object_with_posting(
DataStoreRatingTarget target, DataStoreRateObjectParam rate_param,
DataStorePreparePostParam post_param, bool fetch_ratings
) {
DataStoreRatingInfo info;
}
method rate_objects_with_posting(
list targets, list rate_param,
list post_param, bool transactional, bool fetch_ratings
) {
list ratings;
list results;
}
method get_object_infos(list data_ids) {
list infos;
list results;
}
method search_object_light(DataStoreSearchParam param) {
DataStoreSearchResult result;
}
}
================================================
FILE: nintendo/files/proto/datastore_miitopia_3ds.proto
================================================
import datastore;
/*** Enums ***/
enum Gender {
MALE = 0,
FEMALE = 1,
ANY = 2
}
enum Category {
SINGING = 0,
SPORT = 1,
ACTING = 2,
COMEDY = 3,
MUSIC = 4,
MARTIAL_ARTS = 5,
DANCING = 6,
ADVENTURING = 7,
FILM_DIRECTING = 8,
COOKING = 9,
CHATTING = 10,
PUBLIC_SPEAKING = 11,
CRAFTWORK = 12,
DRAWING = 13,
STUDYING = 14,
WRITING = 15,
FASHION = 16,
DINING = 17,
NOT_TELLING = 18,
ANY = 0xFF
}
/*** Method parameters ***/
struct MiiTubeSearchParam {
string name;
uint32 page = 0;
uint8 category = 0xFF;
uint8 gender = 2;
uint8 country;
uint8 search_type = 0;
uint8 result_option = 0;
}
struct MiiTubeMiiInfo {
DataStoreMetaInfo meta_info;
uint8 category;
uint8 ranking_type;
}
struct MiiTubeSearchResult {
list result;
uint32 count;
uint32 page;
bool has_next;
}
protocol DataStore_Miitopia3DS : DataStore {
method(47) search_mii(MiiTubeSearchParam param) {
MiiTubeSearchResult search_result;
}
}
================================================
FILE: nintendo/files/proto/datastore_smm.proto
================================================
import datastore;
protocol DataStore_SMM : DataStore {
method(61) get_application_config(uint32 id) {
list config;
}
method(74) get_application_config_string(uint32 id) {
list config;
}
}
================================================
FILE: nintendo/files/proto/datastore_smm2.proto
================================================
import datastore;
/*** Enums ***/
enum ClearCondition {
NORMAL = 0,
COLLECT_COINS = 4116396131,
KILL_SKIPSQUEAKS = 4042480826
}
enum CourseDifficulty {
EASY = 0,
STANDARD = 1,
EXPERT = 2,
SUPER_EXPERT = 3
}
enum CourseTag {
NONE = 0,
STANDARD = 1,
PUZZLE_SOLVING = 2,
SPEEDRUN = 3,
AUTOSCROLL = 4,
AUTO_MARIO = 5,
SHORT_AND_SWEET = 6,
MULTIPLAYER_VS = 7,
THEMED = 8,
MUSIC = 9
}
enum CourseTheme {
GROUND = 0,
UNDERGROUND = 1,
CASTLE = 2,
AIRSHIP = 3,
UNDERWATER = 4,
GHOST_HOUSE = 5,
SNOW = 6,
DESERT = 7,
SKY = 8,
FOREST = 9
}
enum GameStyle {
SMB1 = 0,
SMB3 = 1,
SMW = 2,
NSMBU = 3,
SM3DW = 4
}
enum MultiplayerStatsKeys {
MULTIPLAYER_SCORE = 0,
VERSUS_PLAYS = 2,
VERSUS_WINS = 3,
COOP_PLAYS = 10,
COOP_WINS = 11
}
enum PlayStatsKeys {
PLAYS = 0,
CLEARS = 1,
ATTEMPTS = 2,
DEATHS = 3
}
/*** Option flags ***/
enum CourseOption {
PLAY_STATS = 1,
RATINGS = 2,
TIME_STATS = 4,
COMMENT_STATS = 8,
UNK9 = 0x10,
UNK10 = 0x20,
UNK8 = 0x40,
ONE_SCREEN_THUMBNAIL = 0x80,
ENTIRE_THUMBNAIL = 0x100,
ALL = 0x1FF
}
enum EventCourseOption {
UNK3 = 1,
GET_INFO = 2,
BEST_TIME = 8,
ONE_SCREEN_THUMBNAIL = 0x10,
ENTIRE_THUMBNAIL = 0x20,
UNK1 = 0x40,
MEDAL_TIME = 0x100,
GHOST = 0x200,
ALL = 0x3FF
}
enum UserOption {
PLAY_STATS = 1,
MAKER_STATS = 2,
UNK2 = 4,
ENDLESS_MODE = 8,
MULTIPLAYER_STATS = 0x10,
BADGE_INFO = 0x20,
UNK8 = 0x40,
UNK9 = 0x80,
UNK1 = 0x200,
UNK7 = 0x400,
UNK11 = 0x1000,
UNK13 = 0x2000,
UNK15 = 0x8000,
ALL = 0xFFFF
}
/*** Method parameters ***/
struct GetCoursesParam {
list data_ids;
uint32 option = 0;
}
struct GetCoursesEventParam {}
struct SearchCommentsInOrderParam {
uint64 data_id;
ResultRange range;
}
struct GetEventCourseGhostParam {
uint64 data_id;
uint32 time;
uint8 count;
}
struct GetEventCourseHistogramParam {
uint64 data_id;
}
struct GetUserOrCourseParam {
string code;
uint32 user_option = 0;
uint32 course_option = 0;
}
struct GetUsersParam {
list pids;
uint32 option = 0;
}
struct RegisterUserParam {
string name;
UnknownStruct1 unk1;
qbuffer unk2;
uint8 language;
string country;
string device_id;
}
struct SearchCoursesPostedByParam {
uint32 option = 0;
ResultRange range;
list pids;
}
struct SearchCoursesPositiveRatedByParam {
uint32 option = 0;
uint32 count;
uint64 pid;
}
struct SearchCoursesPlayedByParam {
uint32 option = 0;
uint32 count;
uint64 pid;
}
struct SearchCoursesEndlessModeParam {
uint32 option = 0;
uint32 count;
uint8 difficulty;
}
struct SearchCoursesFirstClearParam {
uint64 pid;
uint32 option = 0;
ResultRange range;
}
struct SearchCoursesBestTimeParam {
uint64 pid;
uint32 option = 0;
ResultRange range;
}
struct SearchCoursesEventParam {
uint32 option = 0;
}
struct SearchCoursesLatestParam {
uint32 option = 0;
ResultRange range;
}
struct SearchUsersPlayedCourseParam {
uint64 data_id;
uint32 option = 0;
uint32 count;
}
struct SearchUsersClearedCourseParam {
uint64 data_id;
uint32 option = 0;
uint32 count;
}
struct SearchUsersPositiveRatedCourseParam {
uint64 data_id;
uint32 option = 0;
uint32 count;
}
struct SearchCoursesPointRankingParam {
uint32 option = 0;
ResultRange range;
uint8 difficulty;
list reject_regions = [];
}
struct SearchUsersUserPointParam {
uint32 option = 0;
buffer buffer;
ResultRange range;
}
struct SyncUserProfileParam {
string username;
UnknownStruct1 unk1;
qbuffer unk2;
uint8 unk3;
string country;
bool unk4;
bool unk5;
string unk_guid;
uint32 unk6;
}
struct GetWorldMapParam {
list ids;
uint32 option = 0;
}
struct SearchWorldMapPickUpParam {
uint32 count;
}
struct SearchWorldMapPlayedByParam {
uint32 unk1;
uint32 unk2;
}
/*** Other structures ***/
struct BadgeInfo {
uint16 unk1;
uint8 unk2;
}
struct CommentInfo {
uint64 unk1;
string unk2;
uint8 unk3;
uint8 unk4;
uint64 unk5;
uint16 unk6;
uint16 unk7;
uint8 unk8;
uint8 unk9;
uint16 unk10;
bool unk11;
bool unk12;
datetime unk13;
qbuffer unk14;
string unk15;
CommentPictureReqGetInfoWithoutHeaders picture;
uint16 unk16;
uint8 unk17;
}
struct DeathPositionInfo {
uint64 data_id;
uint16 x;
uint16 y;
bool is_subworld;
}
struct CommentPictureReqGetInfoWithoutHeaders {
string url;
uint8 data_type;
uint32 unk1;
buffer unk2;
string filename;
}
struct CourseInfo {
uint64 data_id;
string code;
pid owner_id;
string name;
string description;
uint8 game_style;
uint8 course_theme;
datetime upload_time;
uint8 difficulty;
uint8 tag1;
uint8 tag2;
uint8 unk1;
uint32 clear_condition;
uint16 clear_condition_magnitude;
uint16 unk2;
qbuffer unk3;
map play_stats;
map ratings;
map unk4;
CourseTimeStats time_stats;
map comment_stats;
uint8 unk9;
uint8 unk10;
uint8 unk11;
uint8 unk12;
RelationObjectReqGetInfo one_screen_thumbnail;
RelationObjectReqGetInfo entire_thumbnail;
}
struct WorldMapInfo {
string id;
pid owner_id;
qbuffer unk1;
RelationObjectReqGetInfo thumbnail;
uint8 worlds;
uint8 levels;
uint8 unk2;
datetime unk3;
list data_ids;
map unk4;
uint32 unk5;
uint8 unk6;
uint8 unk7;
}
struct CourseTimeStats {
pid first_completion;
pid world_record_holder;
uint32 world_record;
uint32 upload_time;
}
struct EventCourseGhostInfo {
RelationObjectReqGetInfo replay_file;
uint32 time;
pid pid;
}
struct EventCourseHistogram {
uint64 data_id;
uint32 unk1;
uint32 unk2;
uint32 unk3;
list values;
map medals;
uint32 unk4;
}
struct EventCourseInfo {
uint64 data_id;
string name;
string description;
uint8 game_style;
uint8 course_theme;
bool unk1;
bool unk2;
datetime upload_time;
DataStoreReqGetInfo get_info;
map unk3;
UnknownStruct6 unk4;
uint8 unk5;
EventCourseThumbnail one_screen_thumbnail;
EventCourseThumbnail entire_thumbnail;
revision 1 {
datetime end_time;
uint8 unk6;
uint32 unk7;
uint16 unk8;
uint16 unk9;
uint32 best_time;
uint32 unk10;
uint32 medal_time;
RelationObjectReqGetInfo personal_ghost;
}
}
struct EventCourseStatusInfo {
uint64 unk1;
bool unk2;
datetime unk3;
}
struct EventCourseThumbnail {
string url;
list headers;
uint32 filesize;
buffer root_ca_cert;
string filename;
}
struct RelationObjectReqGetInfo {
string url;
uint8 data_type;
uint32 size;
buffer unk;
string filename;
}
struct ReqGetInfoHeadersInfo {
list headers;
uint32 expiration;
}
struct SyncUserProfileResult {
uint64 pid;
string username;
UnknownStruct1 unk1;
qbuffer unk2;
uint8 unk3;
string country;
uint8 unk4;
bool unk5;
bool unk6;
}
struct UserInfo {
pid pid;
string code;
string name;
UnknownStruct1 unk1;
qbuffer unk2;
string country;
uint8 region;
datetime last_active;
bool unk3;
bool unk4;
bool unk5;
map play_stats;
map maker_stats;
map endless_challenge_high_scores;
map multiplayer_stats;
map unk7;
list badges;
map unk8;
map unk9;
revision 1 {
bool unk10;
datetime unk11;
bool unk12;
}
revision 2 {
UnknownStruct3 unk13;
}
revision 3 {
string unk14;
map unk15;
bool unk16;
}
}
/*** Unknown structures ***/
struct UnknownStruct1 {
uint16 unk1;
uint16 unk2;
uint16 unk3;
uint16 unk4;
}
struct UnknownStruct3 {
bool unk1;
datetime unk2;
}
struct UnknownStruct6 {
uint64 unk1;
uint32 unk2;
}
protocol DataStore_SMM2 : DataStore {
method(47) register_user(RegisterUserParam param) {}
method(48) get_users(GetUsersParam param) {
list users;
list results;
}
method(49) sync_user_profile(SyncUserProfileParam param) {
SyncUserProfileResult result;
}
method(50) search_users_user_point(SearchUsersUserPointParam param) {
list users;
list ranks;
bool result;
}
method(53) search_users_played_course(SearchUsersPlayedCourseParam param) {
list users;
}
method(54) search_users_cleared_course(SearchUsersClearedCourseParam param) {
list users;
}
method(55) search_users_positive_rated_course(SearchUsersPositiveRatedCourseParam param) {
list users;
}
method(59) update_last_login_time() {}
method(65) get_username_ng_type() {
uint8 unk;
}
method(70) get_courses(GetCoursesParam param) {
list courses;
list results;
}
method(71) search_courses_point_ranking(SearchCoursesPointRankingParam param) {
list courses;
list ranks;
bool result;
}
method(73) search_courses_latest(SearchCoursesLatestParam param) {
list courses;
bool result;
}
method(74) search_courses_posted_by(SearchCoursesPostedByParam param) {
list courses;
bool result;
}
method(75) search_courses_positive_rated_by(SearchCoursesPositiveRatedByParam param) {
list courses;
}
method(76) search_courses_played_by(SearchCoursesPlayedByParam param) {
list courses;
}
method(79) search_courses_endless_mode(SearchCoursesEndlessModeParam param) {
list courses;
}
method(80) search_courses_first_clear(SearchCoursesFirstClearParam param) {
list courses;
bool result;
}
method(81) search_courses_best_time(SearchCoursesBestTimeParam param) {
list courses;
bool result;
}
method(85) get_courses_event(GetCoursesParam param, GetCoursesEventParam dummy) {
list courses;
list results;
}
method(86) search_courses_event(SearchCoursesEventParam param) {
list courses;
}
method(94) search_comments_in_order(SearchCommentsInOrderParam param) {
list comments;
bool result;
}
method(95) search_comments(uint64 data_id) {
list comments;
}
method(103) get_death_positions(uint64 data_id) {
list positions;
}
method(131) get_user_or_course(GetUserOrCourseParam param) {
UserInfo user;
CourseInfo course;
}
method(134) get_req_get_info_headers_info(uint8 type) {
ReqGetInfoHeadersInfo result;
}
method(153) get_event_course_stamp() {
uint32 stamps;
}
method(154) get_event_course_status() {
EventCourseStatusInfo info;
}
method(156) get_event_course_histogram(GetEventCourseHistogramParam param) {
EventCourseHistogram histogram;
}
method(157) get_event_course_ghost(GetEventCourseGhostParam param) {
list ghosts;
}
method(160) get_world_map(GetWorldMapParam param) {
list maps;
list results;
}
method(162) search_world_map_pick_up(SearchWorldMapPickUpParam param) {
list maps;
}
}
================================================
FILE: nintendo/files/proto/debug.proto
================================================
struct ApiCall {
string name;
datetime time;
pid pid;
}
struct ApiCallSummary {
string name;
uint32 limit_exceeded;
uint32 duration;
uint32 limit;
datetime start;
uint32 limit_exceeded_count;
uint32 total_count;
}
protocol Debug : 116 {
method enable_api_recorder() {}
method disable_api_recorder() {}
method is_api_recorder_enabled() {
bool enabled;
}
method get_api_calls(list pids, datetime start, datetime end) {
list calls;
}
method set_exclude_joined_matchmake_session;
method get_exclude_joined_matchmake_session;
method get_api_call_summary(pid pid, datetime start, datetime end, bool only_limit_exceeded) {
list summaries;
}
}
================================================
FILE: nintendo/files/proto/friends.proto
================================================
// 3DS structures
struct AccountExtraInfo {
uint64 local_friend_code;
uint32 move_count;
string token;
}
struct FriendComment : Data {
uint32 pid;
string comment;
datetime modified_at;
}
struct FriendKey {
uint32 unk1;
datetime unk2;
}
struct FriendMii : Data {
pid pid;
Mii mii;
datetime modified_at;
}
struct FriendMiiList : Data {
uint32 unk1;
MiiList mii;
datetime unk2;
}
struct FriendPersistentInfo : Data {
pid pid;
uint8 region;
uint8 country;
uint8 area;
uint8 language;
uint8 platform;
GameKey game_key;
string message;
datetime message_updated;
datetime friended;
datetime last_online;
}
struct FriendPicture : Data {
uint32 unk;
buffer data;
datetime datetime;
}
struct FriendPresence : Data {
pid pid;
NintendoPresence presence;
}
struct FriendRelationship : Data {
pid pid;
uint64 friend_code;
uint8 is_complete;
}
struct GameKey : Data {
uint64 title_id = 0;
uint16 title_version = 0;
}
struct Mii : Data {
string name;
bool unk1;
uint8 unk2;
buffer mii_data;
}
struct MiiList : Data {
string unk1;
bool unk2;
uint8 unk3;
list mii_datas;
}
struct MyProfile : Data {
uint8 region;
uint8 country;
uint8 area;
uint8 language;
uint8 platform;
uint64 local_friend_code_seed;
string mac_address;
string serial_number;
}
struct NintendoPresence : Data {
uint32 changed_bit_flag;
GameKey game_key;
string game_mode_description;
uint32 join_availability_flag;
uint8 matchmake_system_type;
uint32 join_game_id;
uint32 join_game_mode;
pid owner_pid;
uint32 join_group_id;
buffer application_data;
}
struct PlayedGame : Data {
GameKey game_key;
datetime datetime;
}
// Wii U structures
struct BlacklistedPrincipal : Data {
PrincipalBasicInfo principal_info;
GameKey game_key;
datetime since;
}
struct Comment : Data {
uint8 unk;
string text;
datetime changed;
}
struct FriendInfo : Data {
NNAInfo nna_info;
NintendoPresenceV2 presence;
Comment comment;
datetime befriended;
datetime last_online;
uint64 unk;
}
struct FriendRequest : Data {
PrincipalBasicInfo principal_info;
FriendRequestMessage message;
datetime sent;
}
struct FriendRequestMessage : Data {
uint64 friend_request_id;
uint8 unk1;
uint8 unk2;
string message;
uint8 unk3;
string string;
GameKey game_key;
datetime datetime;
datetime expires;
}
struct MiiV2 : Data {
string name;
uint8 unk1 = 0;
uint8 unk2 = 0;
buffer data;
datetime datetime = 0;
}
struct NNAInfo : Data {
PrincipalBasicInfo principal_info;
uint8 unk1 = 94;
uint8 unk2 = 11;
}
struct NintendoCreateAccountData : Data {
NNAInfo info;
string token;
datetime birthday;
uint64 unk;
}
struct NintendoPresenceV2 : Data {
uint32 flags = 0;
bool is_online = false;
GameKey game_key;
uint8 unk1 = 0;
string message = "";
uint32 unk2 = 0;
uint8 unk3 = 0;
uint32 game_server_id = 0;
uint32 unk4 = 0;
uint32 pid = 0;
uint32 gathering_id = 0;
buffer application_data = "";
uint8 unk5 = 3;
uint8 unk6 = 3;
uint8 unk7 = 3;
}
struct PersistentNotification : Data {
uint64 unk1;
uint32 unk2;
uint32 unk3;
uint32 unk4;
string string;
}
struct PrincipalBasicInfo : Data {
pid pid;
string nnid;
MiiV2 mii;
uint8 unk = 2;
}
struct PrincipalPreference : Data {
bool show_online_status;
bool show_current_title;
bool block_friend_requests;
}
struct PrincipalRequestBlockSetting : Data {
uint32 pid;
bool blocked;
}
protocol Friends_V1 : 101 {
method update_profile(MyProfile profile_data) {}
method update_mii(Mii mii) {}
method update_mii_list(MiiList mii_list) {}
method update_played_games(list played_games) {}
method update_preference(bool show_online_status, bool show_current_title, bool block_friend_requests) {}
method get_friend_mii(list friends) {
list miis;
}
method get_friend_mii_list(list friends) {
list mii_lists;
}
method is_active_game(list unk1, GameKey game_key) {
list unk;
}
method get_principal_id_by_local_friend_code(uint64 unk1, list unk2) {
list friend_relationships;
}
method get_friend_relationships(list principal_ids) {
list friend_relationships;
}
method add_friend_by_principal_id(uint64 friend_seed, pid pid) {
FriendRelationship friend_relationship;
}
method add_friend_by_principal_ids(uint64 unk, list pids) {
list friend_relationships;
}
method remove_friend_by_local_friend_code(uint64 friend_code) {}
method remove_friend_by_principal_id(pid pid) {}
method get_all_friends() {
list friend_relationships;
}
method update_black_list(list unk) {}
method sync_friend(uint64 friend_seed, list principal_ids, list unk) {
list friend_list;
}
method update_presence(NintendoPresence presence_info, bool unk) {}
method update_favorite_game_key(GameKey game_key) {}
method update_comment(string comment) {}
method update_picture(uint32 unk, buffer picture) {}
method get_friend_presence(list principal_ids) {
list friend_presence_list;
}
method get_friend_comment(list friends) {
list comments;
}
method get_friend_picture(list principal_ids) {
list friend_pictures;
}
method get_friend_persistent_info(list principal_ids) {
list persistent_infos;
}
method send_invitation(list unk) {}
}
protocol Friends_V2 : 102 {
method update_and_get_all_information(NNAInfo nna_info, NintendoPresenceV2 presence, datetime birthday) {
PrincipalPreference principal_preference;
Comment comment;
list friends;
list sent_requests;
list received_requests;
list blacklist;
bool unk1;
list notifications;
bool unk2;
}
method add_friend(pid pid) {
FriendRequest request;
FriendInfo info;
}
method add_friend_by_name(string name) {
FriendRequest request;
FriendInfo info;
}
method remove_friend(pid pid) {}
method add_friend_request(
uint32 unk1, uint8 unk2, string unk3, uint8 unk4,
string unk5, GameKey game_key, datetime unk6
) {
FriendRequest request;
FriendInfo info;
}
method cancel_friend_request(uint64 id) {}
method accept_friend_request(uint64 id) {
FriendInfo info;
}
method delete_friend_request(uint64 id) {}
method deny_friend_request(uint64 id) {
BlacklistedPrincipal blacklist;
}
method mark_friend_requests_as_received(list ids) {}
method add_black_list(BlacklistedPrincipal principal) {
BlacklistedPrincipal principal;
}
method remove_black_list(pid pid) {}
method update_presence(NintendoPresenceV2 presence) {}
method update_mii(MiiV2 mii) {
datetime unk;
}
method update_comment(Comment comment) {
datetime unk;
}
method update_preference(PrincipalPreference preference) {}
method get_basic_info(list pids) {
list info;
}
method delete_persistent_notification(list notifications) {}
method check_setting_status() {
uint8 unk;
}
method get_request_block_settings(list unk) {
list settings;
}
}
================================================
FILE: nintendo/files/proto/health.proto
================================================
protocol Health : 18 {
method ping_daemon() { bool result; }
method ping_database() { bool result; }
method run_sanity_check() { bool result; }
method fix_sanity_errors() { bool result; }
}
================================================
FILE: nintendo/files/proto/matchmaking.proto
================================================
enum MatchmakeSystem {
GLOBAL = 1,
FRIENDS = 2
}
struct Gathering {
uint32 id = 0;
pid owner = 0;
pid host = 0;
uint16 min_participants = 0;
uint16 max_participants = 0;
uint32 participation_policy = 1;
uint32 policy_argument = 0;
uint32 flags = 512;
uint32 state = 0;
string description = "";
}
struct GatheringURLs {
uint32 gid;
list urls;
}
struct GatheringStats {
pid pid;
uint32 flags;
list values;
}
struct Invitation {
uint32 gid;
uint32 guest;
string message;
}
struct ParticipantDetails {
pid pid;
string name;
string message;
uint16 participants;
}
struct DeletionEntry {
uint32 gid;
pid pid;
uint32 reason;
}
struct MatchmakeParam {
map param = {};
}
struct MatchmakeSessionSearchCriteria {
list attribs = ["", "", "", "", "", ""];
string game_mode = "";
string min_participants = "";
string max_participants = "";
string matchmake_system = "";
bool vacant_only = true;
bool exclude_locked = true;
bool exclude_non_host_pid = false;
uint32 selection_method = 0;
nex 30500 {
uint16 vacant_participants = 1;
}
nex 40000 {
MatchmakeParam param;
bool exclude_user_password = false;
bool exclude_system_password = false;
uint32 refer_gid = 0;
string codeword = "";
ResultRange range;
}
}
struct MatchmakeSession : Gathering {
uint32 game_mode = 0;
list attribs = [0, 0, 0, 0, 0, 0];
bool open_participation = true;
uint32 matchmake_system = 0;
buffer application_data = "";
uint32 num_participants = 0;
nex 30000 - 40000 {
nex 30500 {
uint8 progress_score = 100;
}
nex 30000 {
buffer session_key = "";
}
nex 30500 {
uint32 option = 0;
}
nex 30600 {
revision 1 {
MatchmakeParam param;
datetime started_time = 0;
}
}
nex 30700 {
revision 2 {
string user_password = "";
}
}
nex 30800 {
revision 3 {
uint32 refer_gid = 0;
bool user_password_enabled = false;
bool system_password_enabled = false;
}
}
}
nex 40000 {
uint8 progress_score = 100;
buffer session_key = "";
uint32 option = 0;
MatchmakeParam param;
datetime started_time = 0;
string user_password = "";
uint32 refer_gid = 0;
bool user_password_enabled = false;
bool system_password_enabled = false;
string codeword = "";
}
}
struct MatchmakeBlockListParam {
uint32 options = 0;
}
struct CreateMatchmakeSessionParam {
MatchmakeSession session;
list additional_participants;
uint32 gid_for_participation_check;
uint32 options;
string join_message;
uint16 num_participants;
}
struct JoinMatchmakeSessionParam {
uint32 gid;
list participants;
uint32 gid_for_participation_check;
uint32 options;
uint8 behavior;
string user_password;
string system_password;
string join_message;
uint16 num_participants;
uint16 extra_participants;
MatchmakeBlockListParam block_list;
}
struct UpdateMatchmakeSessionParam {
uint32 gid;
uint32 modification_flags;
list attributes;
bool open_participation;
buffer application_buffer;
uint8 progress_score;
MatchmakeParam param;
datetime started_time;
string user_password;
uint32 game_mode;
string description;
uint16 min_participants;
uint16 max_participants;
uint32 matchmake_system;
uint32 participation_policy;
uint32 policy_argument;
string codeword;
}
struct AutoMatchmakeParam {
MatchmakeSession session;
list participants;
uint32 gid_for_participation_check;
uint32 options;
string join_message;
uint16 num_participants;
list search_criteria;
list target_gids;
MatchmakeBlockListParam block_list;
}
struct FindMatchmakeSessionByParticipantParam {
list pids;
uint32 options;
MatchmakeBlockListParam block_list;
}
struct FindMatchmakeSessionByParticipantResult {
pid pid;
MatchmakeSession session;
}
struct PersistentGathering : Gathering {
uint32 type;
string password;
list attribs;
buffer application_buffer;
datetime participation_start;
datetime participation_end;
uint32 matchmake_session_count;
uint32 num_participants;
}
struct SimpleCommunity {
uint32 gid;
uint32 matchmake_session_count;
}
struct PlayingSession {
pid pid;
anydata gathering;
}
struct SimplePlayingSession {
pid pid;
uint32 gid;
uint32 game_mode;
uint32 attribute;
}
/*** MatchmakeReferee structures ***/
struct MatchmakeRefereeRound {
uint64 id;
uint32 gid;
uint32 state;
uint32 personal_data_category;
list results;
}
struct MatchmakeRefereeStartRoundParam {
uint32 personal_data_category;
uint32 gid;
list pids;
}
struct MatchmakeRefereeEndRoundParam {
uint64 round_id;
list results;
}
struct MatchmakeRefereePersonalRoundResult {
pid pid;
uint32 personal_round_result_flag;
uint32 round_win_loss;
sint32 rating_change;
qbuffer buffer;
}
struct MatchmakeRefereeStats {
uint64 unique_id;
uint32 category;
pid pid;
uint32 recent_disconnection;
uint32 recent_violation;
uint32 recent_mismatch;
uint32 recent_win;
uint32 recent_loss;
uint32 recent_draw;
uint32 total_disconnect;
uint32 total_violation;
uint32 total_mismatch;
uint32 total_win;
uint32 total_loss;
uint32 total_draw;
uint32 rating_value;
}
struct MatchmakeRefereeStatsTarget {
pid pid;
uint32 category;
}
struct MatchmakeRefereeStatsInitParam {
uint32 category;
uint32 initial_rating;
}
protocol MatchMaking : 21 {
method register_gathering(anydata gathering) {
uint32 gid;
}
method unregister_gathering(uint32 gid) {
bool result;
}
method unregister_gatherings(list gids) {
bool result;
}
method update_gathering(anydata gathering) {
bool result;
}
method invite(uint32 gid, list pids, string message) {
bool result;
}
method accept_invitation(uint32 gid, string message) {
bool result;
}
method decline_invitation(uint32 gid, string message) {
bool result;
}
method cancel_invitation(uint32 gid, list pids, string message) {
bool result;
}
method get_invitations_sent(uint32 gid) {
list invitations;
}
method get_invitations_received() {
list invitations;
}
method participate(uint32 gid, string message) {
bool result;
}
method cancel_participation(uint32 gid, string message) {
bool result;
}
method get_participants(uint32 gid) {
list participants;
}
method add_participants(uint32 gid, list pids, string message) {
bool result;
}
method get_detailed_participants(uint32 gid) {
list details;
}
method get_participants_urls(uint32 gid) {
list urls;
}
method find_by_type(string type, ResultRange range) {
list> gatherings;
}
method find_by_description(string description, ResultRange range) {
list> gatherings;
}
method find_by_description_regex(string regex, ResultRange range) {
list> gatherings;
}
method find_by_id(list ids) {
list> gatherings;
}
method find_by_single_id(uint32 gid) {
bool result;
anydata gathering;
}
method find_by_owner(pid owner, ResultRange range) {
list> gatherings;
}
method find_by_participants(list pids) {
list> gatherings;
}
method find_invitations(ResultRange range) {
list> gatherings;
}
method find_by_sql_query(string query, ResultRange range) {
list> gatherings;
}
method launch_session(uint32 gid, string url) {
bool result;
}
method update_session_url(uint32 gid, string url) {
bool result;
}
method get_session_url(uint32 gid) {
bool result;
string url;
}
method get_state(uint32 gid) {
bool result;
uint32 state;
}
method set_state(uint32 gid, uint32 state) {
bool result;
}
method report_stats(uint32 gid, list stats) {
bool result;
}
method get_stats(uint32 gid, list pids, list columns) {
bool result;
list stats;
}
method delete_gathering(uint32 gid) {
bool result;
}
method get_pending_deletions(uint32 reason, ResultRange range) {
bool result;
list deletions;
}
method delete_from_deletions(list deletions) {
bool result;
}
method migrate_gathering_ownership_v1(uint32 gid, list potential_owners) {
bool result;
}
method find_by_description_like(string description, ResultRange range) {
list> gatherings;
}
method register_local_url(uint32 gid, stationurl url) {}
method register_local_urls(uint32 gid, list urls) {}
method update_session_host_v1(uint32 gid) {}
method get_session_urls(uint32 gid) {
list urls;
}
method update_session_host(uint32 gid, bool is_migrate_owner) {}
method update_gathering_ownership(uint32 gid, bool participants_only) {
bool result;
}
method migrate_gathering_ownership(uint32 gid, list potential_owners, bool participants_only) {}
}
protocol MatchMaking_Ext : 50 {
method end_participation(uint32 gid, string message) {
bool result;
}
method get_participants(uint32 gid, bool only_active) {
list participants;
}
method get_detailed_participants(uint32 gid, bool only_active) {
list details;
}
method get_participants_urls(list gids) {
list urls;
}
method get_gathering_relations(uint32 id, string descr) {
string result;
}
method delete_from_deletions(list deletions, pid pid) {}
}
protocol MatchmakeExtension : 109 {
method close_participation(uint32 gid) {}
method open_participation(uint32 gid) {}
method auto_matchmake_postpone(anydata gathering, string message) {
anydata gathering;
}
method browse_matchmake_session(MatchmakeSessionSearchCriteria search_criteria, ResultRange range) {
list> gatherings;
}
method browse_matchmake_session_with_host_urls(MatchmakeSessionSearchCriteria search_criteria, ResultRange range) {
list> gatherings;
list urls;
}
method create_matchmake_session(anydata