NINTENDO SWITCH ONLINE API BRIDGE
Project description
Nintendo Switch Online API Bridge
NINTENDO SWITCH ONLINE API BRIDGE
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 = "2.1.1"
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.getSelf(), 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 = "2.1.1"
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))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nso_bridge-0.1.1.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for nso_bridge-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb331a2de194025014018bf8143141a22b7d0f768139ca65451d57c930e7433a |
|
MD5 | 602cfbcb3076b6237126ae1ba2eddcd7 |
|
BLAKE2b-256 | 852f00ec7ef13b26f07a797531ecab33f35b65fcaa245da669bb43aea4f7f99c |