This project contains an Azure Function and Logic Apps to interact with the Reddit API and process Reddit posts.
- AzureFunctions/
- RedditApiFunction/
- .funcignore
- .gitignore
- .vscode/
- extensions.json
- launch.json
- settings.json
- tasks.json
- host.json
- local.settings.json
- package.json
- src/
- functions/
- RedditNewsFunction.js
- index.js
- RedditNewsFunction/
- function.json
- RedditNewsFunction.js
- functions/
- RedditApiFunction/
- LogicApps/
- GetRedditPostsApp/
- workflow.json
- MailApp/
- workflow.json
- GetRedditPostsApp/
- Readme.md
The RedditApiFunction
directory contains an Azure Function that interacts with the Reddit API.
src/functions/RedditNewsFunction.js
: Contains the main function logic for fetching Reddit news.src/index.js
: Sets up the Azure Function app.src/RedditNewsFunction/function.json
: Configuration for the RedditNewsFunction.
-
Install dependencies:
npm install
-
Start the function locally:
npm start
host.json
: Global configuration for all functions.local.settings.json
: Local settings for the function app..vscode/
: Contains VS Code settings and tasks for debugging and deployment.
The LogicApps
directory contains two Logic Apps:
GetRedditPostsApp
: Fetches Reddit posts and processes them.MailApp
: Sends emails based on the processed Reddit posts.
GetRedditPostsApp/workflow.json
: Defines the workflow for fetching and processing Reddit posts.MailApp/workflow.json
: Defines the workflow for sending emails.
- @azure/functions: Azure Functions SDK.
- @azure/identity: Azure Identity library.
- @azure/keyvault-secrets: Azure Key Vault Secrets client.
- axios: Promise-based HTTP client.
- node-fetch: Node.js library for making HTTP requests.
- snoowrap: A JavaScript wrapper for the Reddit API.
This project is licensed under the MIT License.