Skip to content

jamieb452/APIReactor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

API Reactor

Routinely query Steam's API for app updates; when an updated is detected associated web hooks are triggered.

Current Supported Triggers

  • SteamAppUpdate - Activates when a specified Steam App updates.
  • TimeElapsed - Activates when a minimum specified amount of time elapses since the webhooks were last triggered.

Current Supported Web Hooks

  • Docker HUB - Trigger automated build on Docker HUB.
  • SLACK - Post a message in SLACK.

Working Concepts

Execute wehook(s) when triggers(s) are activated:

[activated] Trigger(s) -=> [execute] Webhook(s)

If no triggers activate no webhooks execute.

This process happens inside of a reactor which establishes many-to-many relationships between triggers and webhooks.

reactor { [activated] Trigger(s) -=> [execute] Webhook(s) }

Inside of a reactor any single activated trigger will result in the execution of all webhooks.

            Trigger 1    /==> [execute] Webhook 1
[activated] Trigger 2 ----==> [execute] Webhook 2
            Trigger n    \==> [execute] Webhook n

Reactors separate "business" concerns; use them to group related webhooks to all relevant triggers.

reactor 1 { SteamAppUpdate(app: X) ----------- Docker Hub build
                                          \--- SLACK channel message }

reactor 2 { SteamAppUpdate(app: Y) ------\/--- Docker Hub build
            TimeElapsed(time: X days) ---/\--- SLACK channel message }

reactor 3 { SteamAppUpdate(app: A) ----------- SLACK channel message
            SteamAppUpdate(app: B) ------/                           }

Motivation

This repo started as a way to trigger Docker Hub builds for Laclede's LAN whenever an application on Steam updated. Soon refactored it to replace a series of crontabs I was running.

If a few changes could make this project useful for your needs feel free to clone, fork, and/or submit a pull request. Also see Contributing.md

About

Trigger webhook(s) when an application is updated on the Steam network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages