Update README.md
74
README.md
|
|
@ -5,7 +5,7 @@ Access the Nintendo Switch Online and Nintendo Switch Parental Controls app APIs
|
|||
|
||||
### Features
|
||||
|
||||
- Command line and menu bar app interfaces
|
||||
- Command line and Electron app interfaces
|
||||
- Interactive Nintendo Account login for the Nintendo Switch Online and Nintendo Switch Parental Controls apps
|
||||
- Automated login to the Nintendo Switch Online app API
|
||||
- This uses splatnet2statink and flapg APIs by default.
|
||||
|
|
@ -20,10 +20,10 @@ Access the Nintendo Switch Online and Nintendo Switch Parental Controls app APIs
|
|||
or other custom Discord features. [See here for Discord title overrides](src/discord/titles) or
|
||||
[create an issue if you'd like another title added](https://github.com/samuelthomas2774/nxapi/issues/new/choose).
|
||||
|
||||

|
||||

|
||||
- Show notifications for friend Nintendo Switch presences
|
||||
|
||||

|
||||

|
||||
- [Electron app] Open game-specific services
|
||||
- Including NookLink, which doesn't work in web browsers as it requires custom JavaScript APIs.
|
||||
- Nintendo Switch Online app API proxy server
|
||||
|
|
@ -39,6 +39,35 @@ Access the Nintendo Switch Online and Nintendo Switch Parental Controls app APIs
|
|||
|
||||
The API library and types are exported for use in JavaScript/TypeScript software. The app/commands properly cache access tokens and try to handle requests to appear as Nintendo's apps - if using nxapi as a library you will need to handle this yourself.
|
||||
|
||||
#### Electron app
|
||||
|
||||
nxapi includes an Electron app, which can be downloaded [here](https://github.com/samuelthomas2774/nxapi/releases). The app can be used to:
|
||||
|
||||
- Login to a Nintendo Account, both for the Nintendo Switch Online app and Parental Controls app.
|
||||
- This will open the Nintendo Account login page in the app, just like signing into Nintendo's own apps.
|
||||
- Accounts are shared with the nxapi command line interface.
|
||||
- Share Nintendo Switch presence to Discord.
|
||||
- Using a custom presence URL or a friend's presence is supported.
|
||||
- Using the authenticated user's presence is not supported, as this is no longer available from the API ([#1](https://github.com/samuelthomas2774/nxapi/issues/1)).
|
||||
- Showing notifications for friend presences.
|
||||
- Multiple users can be selected.
|
||||
- Access game-specific services.
|
||||
- These will be opened in the app.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
The app includes the nxapi command line at `dist/bundle/cli-bundle.js`. Node.js must be installed separately to use this.
|
||||
|
||||
```sh
|
||||
# macOS
|
||||
node Nintendo\ Switch\ Online.app/Contents/Resources/app/dist/bundle/cli-bundle.js ...
|
||||
|
||||
# Windows
|
||||
node 'Nintendo Switch Online/resources/app/dist/bundle/cli-bundle.js' ...
|
||||
```
|
||||
|
||||
#### Do I need a Nintendo Switch Online membership?
|
||||
|
||||
No.
|
||||
|
|
@ -73,33 +102,6 @@ This is really annoying. Initially the Nintendo Switch Online app didn't perform
|
|||
|
||||
The reason Nintendo added this is probably to try and stop people automating access to their app's API. I really hope that's wrong though, as then Nintendo would be prioritising that over account security, as most people seem ok with sharing account credentials to access the API. (And it's not stopping anyone accessing the API outside of the app anyway.)
|
||||
|
||||
### Electron app
|
||||
|
||||
nxapi includes an Electron menu bar app. Currently it can only be used by installing from source (there's no packaged version yet).
|
||||
|
||||
The app can currently be used to:
|
||||
|
||||
- Login to a Nintendo Account, both for the Nintendo Switch Online app and Parental Controls app.
|
||||
- This will open the Nintendo Account login page in the app, just like signing into Nintendo's own apps.
|
||||
- Accounts are shared with the nxapi command line interface.
|
||||
- Share an authenticated Nintendo Account's presence to Discord.
|
||||
- Using a custom presence URL or a friend's presence is not supported.
|
||||
- Only one user can be selected - selecting another user will stop sharing the first user's presence.
|
||||
- Showing notifications for an authenticated user/friend's presence.
|
||||
- Multiple users can be selected, but this doesn't work yet.
|
||||
- Access game-specific services.
|
||||
- These will be opened in the app.
|
||||
|
||||

|
||||
|
||||
After installing nxapi from source the app can be run using this command:
|
||||
|
||||
```sh
|
||||
nxapi app
|
||||
```
|
||||
|
||||
This command has no options, but environment variables can still be used.
|
||||
|
||||
### Install
|
||||
|
||||
#### Install with npm
|
||||
|
|
@ -630,6 +632,16 @@ nxapi users set 0123456789abcdef
|
|||
nxapi users forget 0123456789abcdef
|
||||
```
|
||||
|
||||
#### Electron app
|
||||
|
||||
When installing nxapi from source the app can be run using this command:
|
||||
|
||||
```sh
|
||||
nxapi app
|
||||
```
|
||||
|
||||
This command has no options, but environment variables can still be used.
|
||||
|
||||
#### Data location
|
||||
|
||||
Data will be stored in an OS-specific local data location by default in the `nxapi-nodejs` directory.
|
||||
|
|
@ -695,6 +707,8 @@ ZNCA_API_URL=http://[::1]:12345/api/znca nxapi nso ...
|
|||
|
||||
Some options can be set using environment variables. These can be stored in a `.env` file in the data location. Environment variables will be read from the `.env` file in the default location, then the `.env` file in `NXAPI_DATA_PATH` location. `.env` files will not be read from the location set in the `--data-path` option.
|
||||
|
||||
This can be used with the Electron app (including when using the packaged version).
|
||||
|
||||
### Links
|
||||
|
||||
- Nintendo Switch Online app API docs
|
||||
|
|
|
|||
BIN
resources/app.png
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
|
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 37 KiB |
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |