guyb7 / github-api-streamdeck-plugin

GitHub API Plugin for the Elgato Stream Deck
18 stars 6 forks source link

Make the plugin more generic to allow requests to GitLab #7

Open pedropombeiro opened 2 years ago

pedropombeiro commented 2 years ago

@guyb7 This is a great plugin, thanks for making it public! I wonder if with small tweaks it would be possible to make it retrieve data from GitLab's GraphQL API.

guyb7 commented 2 years ago

@pedropombeiro Thanks for reaching out! You're probably right -- this plugin is loosely coupled with GitHub, but it could pretty easily send the requests to any GraphQL endpoint. Auth headers might need to be tweaked as well.

This is the code that's coupled with GitHub: https://github.com/guyb7/github-api-streamdeck-plugin/blob/main/src/GitHub.js

They have the very convenient oktokit utility which I used, but I don't see a reason it can't be swapped with a generic GraphQL client, or even with a simple fetch().

The hardest part is probably the UI (settings and icons). Need to think about it a little bit (: