Aucune description

Euiseo Cha 852a09137c chore: update dependency il y a 1 an
.github afa6c23782 Update codeql-analysis.yml il y a 2 ans
nso_bridge 93cde3fbff chore: refactor code il y a 2 ans
scripts dbf8b89504 chore: add code formatter and lint check il y a 2 ans
tests 0e66971654 feat(breaking change): add more features and rename functions il y a 2 ans
.flake8 dbf8b89504 chore: add code formatter and lint check il y a 2 ans
.gitignore f1c930c232 chore: update gitignore il y a 2 ans
.isort.cfg dbf8b89504 chore: add code formatter and lint check il y a 2 ans
LICENSE 3c6a3d759f Initial commit il y a 2 ans
README.md 0e66971654 feat(breaking change): add more features and rename functions il y a 2 ans
pyproject.toml 852a09137c chore: update dependency il y a 1 an

README.md

Nintendo Switch Online API Bridge

Nintendo Switch Online API bridge (for Nintendo Switch Online API wrapper)

What is it?

Nintendo Switch Online API Bridge is a simple wrapper. It allows you to easily access the API and get the data you need.

Installation

pip install nso-bridge
pip install git+https://github.com/zeroday0619/Nintendo_Switch_Online_API_Bridge.git

Example Code

GetSelf

Get information of My Nintendo Switch Account.

import json
import keyring

from nso_bridge.nsa import NintendoSwitchAccount
from nso_bridge.nso import NintendoSwitchOnlineAPI

import logging

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

app = NintendoSwitchAccount()

# override the nso_app_version
app.nso_app_version = app.get_nso_app_version()
session_token = keyring.get_password("nso-bridge", "session_token")


nso_res = NintendoSwitchOnlineAPI(
    nso_app_version=app.nso_app_version,
    session_token=session_token,
)
nso_res.sync_login()
print(json.dumps(nso_res.getCurrentUser(), indent=4, ensure_ascii=False))

GetFriends

Get information of friends registered to Nintendo Switch account.

import json
import keyring

from nso_bridge.nsa import NintendoSwitchAccount
from nso_bridge.nso import NintendoSwitchOnlineAPI

import logging

logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

app = NintendoSwitchAccount()

# override the nso_app_version
app.nso_app_version = app.get_nso_app_version()
session_token = keyring.get_password("nso-bridge", "session_token")


nso_res = NintendoSwitchOnlineAPI(
    nso_app_version=app.nso_app_version,
    session_token=session_token,
)
nso_res.sync_login()
print(json.dumps(nso_res.getFriends(), indent=4, ensure_ascii=False))