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) 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 90090644..fe12cf67 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