From 68e571e2e4633f7fb9244870176bdc25a6696cfd Mon Sep 17 00:00:00 2001 From: noeppi_noeppi Date: Tue, 10 Nov 2020 17:52:05 +0100 Subject: [PATCH 1/3] Update docs --- docs/dependencies.md | 4 ++++ docs/index.md | 2 +- docs/samples/reddit.md | 45 ++++++++++++++++++++++++++++++++++++++++++ docs/services.md | 9 +++++++++ 4 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 docs/samples/reddit.md diff --git a/docs/dependencies.md b/docs/dependencies.md index 5695f1a9..81acc1da 100644 --- a/docs/dependencies.md +++ b/docs/dependencies.md @@ -35,6 +35,8 @@ FontStyle Underline [node-hue-api] as node_hue_api <> [[https://www.npmjs.com/package/node-hue-api]] [nodecg-io-rcon] as nodecg_io_rcon <> [[https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-rcon]] [rcon-client] as rcon_client <> [[https://www.npmjs.com/package/rcon-client]] +[nodecg-io-reddit] as nodecg_io_reddit <> [[https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-reddit]] +[reddit-ts] as reddit_ts <> [[https://www.npmjs.com/package/reddit-ts]] [nodecg-io-sacn-receiver] as nodecg_io_sacn_receiver <> [[https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-sacn-receiver]] [sacn] as sacn <> [[https://www.npmjs.com/package/sacn]] [nodecg-io-sacn-sender] as nodecg_io_sacn_sender <> [[https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-sacn-sender]] @@ -92,6 +94,8 @@ nodecg_io_philipshue ...> node_hue_api nodecg_io_philipshue --> nodecg_io_core nodecg_io_rcon --> nodecg_io_core nodecg_io_rcon ...> rcon_client +nodecg_io_reddit --> nodecg_io_core +nodecg_io_reddit ...> reddit_ts nodecg_io_sacn_receiver --> nodecg_io_core nodecg_io_sacn_receiver ...> sacn nodecg_io_sacn_sender --> nodecg_io_core diff --git a/docs/index.md b/docs/index.md index 73c29651..b96738fd 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,7 +6,7 @@ -[![Sevices](https://img.shields.io/static/v1?label=Services%20implemented&message=23&color=blue&style=flat-square)](services.md) +[![Sevices](https://img.shields.io/static/v1?label=Services%20implemented&message=24&color=blue&style=flat-square)](services.md) [![License](https://img.shields.io/github/license/codeoverflow-org/nodecg-io?label=License&style=flat-square)](https://github.com/codeoverflow-org/nodecg-io/blob/master/LICENSE) [![Discord](https://img.shields.io/badge/discord-join-7289DA.svg?logo=discord&style=flat-square)](https://discord.gg/sX2Gjbs/) diff --git a/docs/samples/reddit.md b/docs/samples/reddit.md new file mode 100644 index 00000000..cbd9274d --- /dev/null +++ b/docs/samples/reddit.md @@ -0,0 +1,45 @@ +## Using the Reddit sample bundle + +The reddit-message-read example bundle in `samples/reddit-msg-read` demonstrates the ability to read recent posts from a subreddit (in this case `r/skate702`) + +### Prerequisites + +- Working NodeCG & nodecg-io installation +- a Reddit Application (Should be of type script for own purpose) + +_Note:_ If you don't have such an application yet you can get one [here](https://www.reddit.com/prefs/apps). + +### Configure the Reddit sample bundle + +1. Start nodecg with nodecg-io installed. The reddit-message-read bundle is currently part of it so it should also be loaded. + +2. Go to the `nodecg-io` tab in the nodecg dashboard. + +3. Login using your password. If this is your first run, then enter the password with which you want to encrypt your configurations and credentials. + +4. Create a new reddit service instance using the left upper menu. + +5. Enter your applications id and secret and your own username and password. Zhe entered username and password must be for the user who registered the application. + + The created instance should be automatically selected, if not select it in the upper left menu. Enter your data in monaco (the text-editor on the right) in this format: + + ```json + { + "clientId": "Your client Id (This is displayed right below the application name)", + "clientSecret": "Your client secret", + "username": "Your username", + "password": "Your password" + } + ``` + + After entering it, click save. + + _Note:_ If you don't see monaco on the right, try reloading the page. + +6. Set the created reddit service instance to the service dependency of the reddit-message-read bundle. + + Select the reddit-message-read bundle and the Reddit service in the left bottom menu and then select the service instance that should be used by the reddit-message-read bundle (in this case the name of the previously created reddit instance). + +7. Check the nodecg logs + + You should see the recent posts in `r/skate702` diff --git a/docs/services.md b/docs/services.md index 0f2bd19b..82defc03 100644 --- a/docs/services.md +++ b/docs/services.md @@ -92,6 +92,15 @@ There's no sample implementation for this service yet. Depends on [nodecg-io-core](https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-core) @ 0.1.0
Depends on [rcon-client](https://www.npmjs.com/package/rcon-client) @ ^4.2.0
+## [nodecg-io-reddit](https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-reddit) + +**Provides aninterface to the Reddit-API.** + +There's no sample implementation for this service yet. + +Depends on [nodecg-io-core](https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-core) @ 0.1.0
+Depends on [reddit-ts](https://www.npmjs.com/package/reddit-ts) @ noeppi-noeppi/npm-reddit-ts#build
+ ## [nodecg-io-sacn-receiver](https://github.com/codeoverflow-org/nodecg-io/tree/master/nodecg-io-sacn-receiver) **Allows you to receive data via sACN from e.g professional lighting consoles.** From 1f852f60b452777dea287d70b4a86cb6bfa0f640 Mon Sep 17 00:00:00 2001 From: noeppi_noeppi Date: Tue, 10 Nov 2020 17:58:51 +0100 Subject: [PATCH 2/3] Add reddit sample to mkdocs.yml --- docs/services.md | 2 +- mkdocs.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/services.md b/docs/services.md index 82defc03..093734de 100644 --- a/docs/services.md +++ b/docs/services.md @@ -96,7 +96,7 @@ Depends on [rcon-client](https://www.npmjs.com/package/rcon-client) @ ^4.2.0
Depends on [reddit-ts](https://www.npmjs.com/package/reddit-ts) @ noeppi-noeppi/npm-reddit-ts#build
diff --git a/mkdocs.yml b/mkdocs.yml index 6f5902bc..9871b114 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -55,6 +55,7 @@ nav: - Midi-Output sample: samples/midi-output.md - Midi-IO sample: samples/midi-io.md - Rcon sample: samples/rcon.md + - Reddit Sample: samples/reddit.md - sACN: - sACN Receiver sample: samples/sacn-receiver.md - sACN Sender sample: samples/sacn-sender.md From 978152743a2f61aa739fccb51a739424e39198d5 Mon Sep 17 00:00:00 2001 From: Daniel <30466471+daniel0611@users.noreply.github.com> Date: Sat, 14 Nov 2020 22:59:37 +0100 Subject: [PATCH 3/3] Add reddit to the list of services --- docs/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.md b/docs/index.md index abc6e0bd..a535e9ee 100644 --- a/docs/index.md +++ b/docs/index.md @@ -32,6 +32,7 @@ If that's no problem you can head over to the [installation guide](https://nodec - [x] OBS - [x] Philips Hue - [x] RCON +- [x] Reddit - [x] sACN Receiver - [x] sACN Sender - [x] Serial Port (Arduino)