Metadata-Version: 2.1
Name: nso-bridge
Version: 0.1.7
Summary: Nintendo Switch Online API bridge (for Nintendo Switch Online API wrapper)
Keywords: Nintendo,Nintendo Switch,Nintendo Switch Online,Nintendo Switch Online API
Author-email: zeroday0619 <zeroday0619_dev@outlook.com>
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: requests >= 2.28.1
Requires-Dist: keyring >= 23.9.1
Requires-Dist: beautifulsoup4 >= 4.11.1
Requires-Dist: pydantic>=1.10.2
Requires-Dist: black>=22.3.0 ; extra == "lint"
Requires-Dist: flake8>=4.0.1 ; extra == "lint"
Requires-Dist: isort>=5.10.1 ; extra == "lint"
Requires-Dist: autoflake>=1.5.3 ; extra == "lint"
Requires-Dist: pytest >= 7.1.3 ; extra == "test"
Requires-Dist: pytest-cov >= 3.0.0 ; extra == "test"
Project-URL: Home, https://github.com/zeroday0619/Nintendo_Switch_Online_API_Bridge
Provides-Extra: lint
Provides-Extra: test

# 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

```bash
pip install nso-bridge
```

```bash
pip install git+https://github.com/zeroday0619/Nintendo_Switch_Online_API_Bridge.git
```

## Example Code

### GetSelf

Get information of My Nintendo Switch Account.

```python
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.

```python
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))
```

