github-api-streamdeck-plugin icon indicating copy to clipboard operation
github-api-streamdeck-plugin copied to clipboard

Make the plugin more generic to allow requests to GitLab

Open pedropombeiro opened this issue 3 years ago • 1 comments
trafficstars

@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.

pedropombeiro avatar Nov 15 '22 15:11 pedropombeiro

@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 (:

guyb7 avatar Nov 16 '22 14:11 guyb7