Commit Graph

37 Commits

Author SHA1 Message Date
Samuel Elliott
d1785ee1fc
Add CoralApiInterface 2023-07-04 21:01:25 +01:00
Samuel Elliott
4d0b708469
Write debug logs 2023-06-01 18:45:31 +01:00
Samuel Elliott
30333dec8e
HTTP server errors 2023-05-22 23:58:56 +01:00
Samuel Elliott
6867b6be9d
Fix update interval for friend code data 2023-01-17 04:01:23 +00:00
Samuel Elliott
fb9cd6d76f
Add presence server SplatNet 3 proxy 2022-12-18 12:08:03 +00:00
Samuel Elliott
0e33825d27
Fix API proxy announcements 2022-10-31 17:22:05 +00:00
Samuel Elliott
2776c936a1
Add Retry-After header for temporary errors 2022-10-30 17:47:10 +00:00
Samuel Elliott
516349e5df
Move HTTP server functions to a separate class 2022-10-30 17:44:01 +00:00
Samuel Elliott
9cb4ced59f
HTTP servers 2022-10-30 03:56:01 +00:00
Samuel Elliott
85d93c681e
Coral/SplatNet 3 presence proxy server 2022-09-25 19:51:05 +01:00
Samuel Elliott
c9c91a874d
Fix web service ID type in token request, handle errors requesting a new token 2022-09-10 16:58:02 +01:00
Samuel Elliott
5b93c63c23
Use coral result object directly 2022-09-07 17:33:40 +01:00
Samuel Elliott
f24dc2c63c
Remove unidentified-script user agent when running the API proxy server 2022-08-13 00:40:24 +01:00
Samuel Elliott
e9218b9004
Add friend code URL to API proxy 2022-07-28 14:04:29 +01:00
Samuel Elliott
0cc39aad13
Add friend code lookup to API proxy 2022-07-28 13:57:39 +01:00
Samuel Elliott
e12bb364a7
Prevent attempting to authenticate more than four times per hour
This only affects scripts - running this nxapi command in a terminal and the Electron app will ignore this limit.

https://github.com/samuelthomas2774/nxapi/issues/9
2022-07-27 15:48:19 +01:00
Samuel Elliott
21f5f095a0
Add helper function for setting user agent 2022-07-01 21:22:40 +01:00
Samuel Elliott
a6a69b1799
Rename most instances of znc to coral 2022-06-28 19:22:01 +01:00
Samuel Elliott
9f63fc8359
Handle simultaneous znc proxy requests properly 2022-05-30 13:16:06 +01:00
Samuel Elliott
b8f9c2c110
Automatically renew token when znc responds with a token expired error 2022-05-30 12:32:38 +01:00
Samuel Elliott
18761bbb31
Update dependencies 2022-05-29 19:16:54 +01:00
Samuel Elliott
967a063220
Move utility functions
This avoids importing most dependencies when not used.
2022-05-21 23:52:36 +01:00
Samuel Elliott
5f6004bd57
Move authentication functions
app no longer imports from cli
2022-05-21 23:47:41 +01:00
Samuel Elliott
b531fcced4
Move monitoring classes, use nxapi debug namespace for non-app/cli modules 2022-05-14 19:06:43 +01:00
Samuel Elliott
a2f3d7d2e2
Allow selecting multiple users for friend notifications 2022-05-12 21:32:00 +01:00
Samuel Elliott
784e882dd4
Move getToken/getMoonToken and add cli-table types 2022-05-09 21:28:31 +01:00
Samuel Elliott
8f5965913d
Add a command to test getting Discord activity from Nintendo Switch presence 2022-04-22 20:00:06 +01:00
Samuel Elliott
f294daa5bc
Fix getting current user presence with API proxy 2022-04-21 18:05:24 +01:00
Samuel Elliott
f807719f3a
Add Discord Rich Presence and user/friend presence notifications to the Electron app 2022-04-17 22:29:14 +01:00
Samuel Elliott
77a32e1b5e
Add an option to show event data 2022-04-08 19:57:45 +01:00
Samuel Elliott
a53eccd91e
Update znc types, add other endpoints and use /v3/Account/GetToken to renew the app token 2022-04-06 23:17:54 +01:00
Samuel Elliott
8bd6f306f8
Don't update web services and events with friends list 2022-04-06 22:48:35 +01:00
Samuel Elliott
085d8a6a54
Use a single loop class for nso notify/presence and splatnet2 monitor 2022-03-25 18:55:03 +00:00
Samuel Elliott
1a36947720
Add API proxy access tokens
This allows providing access to the API proxy server as your account but only to access certain data (probably user/friend presence for Discord).

For example a token generated using `nxapi nso znc-proxy-tokens --znc-proxy-url "http://[::1]:12345/api/znc" create --policy-user-presence` will only be able to access your presence at http://[::1]:12345/api/znc/user/presence (with the access token provided in the Authorization header as a Bearer token or in the token query string parameter).
2022-03-22 23:39:56 +00:00
Samuel Elliott
86fb372722
Add commands to download SplatNet 2 data 2022-03-21 20:38:52 +00:00
Samuel Elliott
cc8dbc6f6e
Fix docker-entrypoint.sh arguments and don't require specifying an IP address in servers 2022-03-18 09:11:40 +00:00
Samuel Elliott
311d13d0d1
Move Nintendo Switch Online commands 2022-03-17 13:06:12 +00:00