GithubHelp home page GithubHelp logo

barrycarlyon / twitch_extension_tools Goto Github PK

View Code? Open in Web Editor NEW
42.0 5.0 2.0 13.18 MB

Tools for Twitch Developers to assist them working on a Twitch Extension

License: Do What The F*ck You Want To Public License

JavaScript 62.45% CSS 1.68% HTML 34.09% Python 1.78%
twitch tools desktop-app extensions twitch-extensions twitchdev

twitch_extension_tools's Introduction

CodeQL

What is this

This Program is an alternative version of the Twitch Developer Rig.

Primarilly this works as a glorified Rest Client but handles the required JWT generation or App Access Token generation and maintance as needed.

Generally it should serve as a "test tool" and not used to manage a live extension, but you could, saves you writing your own Bits Product, or Extension Config Managment tool! If you do so it's at your own risk!

First Launch Screenshot

Check out more Screenshots

Installation and Updates

This is an Electron App, so it maybe installed from the GitHub releases tab.

The Windows Build is Code Signed with the Publisher Barry Carlyon The Mac Builds are Code Signed with Apple Cerficates that identify Barry Carlyon

You can download the latest version, for Windows and Mac from here on GitHub under releases. These builds will self update

Or

Download on Mac App Store

This Mac App Store build will update from the App Store itself and may lag a little behind releases here.

Or

Install using winget

winget install BarryCarlyon.BarryCarlyonExtensionTools

Uninstallation

You can use Windows "Add and Remove Programs" to uninstall the program.

And on mac just throw it in the trash! :-P

You may need to manually remove data stored in the data/config storage location below.

Data/Config Storage

Your Extensions Client IDs and secrets are stored locally unencrypted in the file config.json in the following location:

Windows:

%appdata%/BarryCarlyonTwitchExtensionTools/

Mac DMG/Manual install:

~/Library/Application Support/BarryCarlyonTwitchExtensionTools/

Mac App Store

~/Library/Containers/com.barrycarlyon.twitch-extension-tools/Data/Library/Application\ Support/BarryCarlyonTwitchExtensionTools/

In the file config.json

Which follows the format:

{
    "extensions": {
        ...
        "a_client_id": {
            "name": "Your Entered Name",
            "client_id": "",
            "extension_secret": "base 64 encoded secret",
            "user_id": "Twitch owner ID"
        },
        ...
        "a_client_id_with_secret": {
            "name": "Your Entered Name",
            "client_id": "",
            "extension_secret": "base 64 encoded secret",
            "client_secret": "a client API secret",
            "user_id": "Twitch owner ID",
            "access_token": "A recently generated App Access Token"
        }
        ...
    },
    "active": {
        "client_id": "Selected active Extension ClientID set to use",
        "version": "Selected Version to talk to"
    },
    "window": {
        "size": [ width, height ],
        "position": [ x, y ]
    }
}

โญ Tip: If you open the Application and the window has gone missing, close the app, open config.json for editing and completely reset "window" to {} and then reopen the app, it'll reset to default display, top left. The App does try to magically 0,0 the window if this happens but it might need a hand!

Supported Features

We will use the Get Extensions API to see which features are enabled for your selected version of your extension and block/allow access in the UI as needed. Don't forget to turn on/off features (such as the Config Service of Chat Service) you'll need to use the Developer Console to do so.

If a Key Sets Extension API Client Secret is Provided, alllowing the generation of client credentials

Common Gotchas/FAQ

Q. No matter what I do, it just claims authentication failed when trying to validate/refresh my Extension

A. Since the Extension API's mostly utilise a JWT, this program creates a JWT on the fly with only a 4 second expiration. So if your system clock is significantly out of date, this can generate an already expired JWT. So check your system clock is accurate.

Not Supported Features

Extension View simulation, this might get explored but it's not gonna be as effective as actually testing on the Twitch Website itself (when in localtest).

Whilst the Twitch Developer Rig is now marked as no longer supported, view testing in the Rig remains working, but you may need another tool to update any Rig manifests you have stored, you can check out the Twitch Developer Rig Manifester to provide manifest import and revision. This manifester tool might at somepoint get added to this tool.

Notes

  • Uses Electron to provide as a Desktop App
  • Uses Bootstrap for primary layout
  • Uses GitHub for update delivery and code management (and mac app store for MAS builds)
  • JWT tokens are generated inside the App via auth0/node-jsonwebtoken, as apposed to "ClientSide" like this example
  • A number of sindresorhus Electron Modules.

Insomnia?

Basically this app is a "save my Extension configs" Insomnia-esque Rest Client. That wraps the main Extension functions in a handy Application. With some extra features!

Insomnia is a Rest client. I have written a Plugin for Insomnia to aid with JWT generating inside Insomnia itself. You can find that here on Github

Warranty

If you break your extension from using this tool it's your own fault and the author(s) accept no responsbility for problems caused to your extension from using this tool. Granted the worse thing you might do is deprecate a bits product you actually needed.....

License

This project is Licensed under Do What The F*ck You Want To Public License, so Just Do What the F*ck you want to!

Development Notes

This is an Electron Project

To run locally, after cloning, just

$ npm install
$ npn run start

Further Help with Twitch API

TwitchDev Discord

OMGLIEKWUT OHMYGOODNESS U SO MUCH HELP

Thank you for the help I want to give you beer/coffee money -> Check the Funding/Sponsor details

twitch_extension_tools's People

Contributors

barrycarlyon avatar dependabot[bot] avatar ghostzero avatar mgway avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mgway ghostzero

twitch_extension_tools's Issues

Revoke the access token

Since a token is generated for use, it makes sense to provide a easy button to revoke said token and/or validate it

Error/Rate limit toasts are kinda dumb

Brief description

It's kinda dumb the rate limits are in toasts

And errors could be displayed better potentially

Additional context or questions

Barry like c'mon pls

MAS: Update Error

Brief description

Remove the update UI from MAS as MAS handles updates not the app itself

Screenshots

image

UserID dropdowns for commonly used

During development of an extension, a developer might need to swap between userID's for the various endpoints.

Add a quick recall method for commonly used/recently used username/userID combos
To save having to API lookup name/ID combo's all the time and/or remembering those ID's

Translations!

Brief description

Add support for translations...

Add Bits Product management

Add Bits Product management to the App.

This will require additional work,. since it's protected by App Access Token, as apposed to JWT auth.
And the app right now only does JWTs

Out of Date System clock

Windows Version

11?

Brief description

First time install it 401's instead of version prompting

How to reproduce

use windows 11

Expected behavior

It works

Screenshots

Additional context or questions

"Refresh Manifest"

Add an "explict" reload manifest.

Right now you can reload by "reselecting" the extension from the Select Active EXT dropdown.

Windows Specific language

Brief description

Some places uses windows specific language (such as the config location)

Expected behavior

Detect platform and state the correct text(s)

Screenshots

Example:

image

Extend Convert to ID to auto fetch

For Config Service you probably want to Convert to ID and immeditly fetch, so provide a way to do this without having to do two clicks.

This applies to a most of the endpoints.

The backend can't really auto detect since in theory a login could be numbers (I forget the specifics) Easy enough as an explicit button though.

Working with JSON

Brief description

if the input to config/pubsub is invalid JSON and the "please json" toggle is true.
It silent fails when you hit the go button

Personal/profession key sets

Brief description

Add "profiles" so you can store all your settings seperated into categories/profiles, so "work" and "personal" etc

So in an org world the ycan jsut give you a .json file to import and boom it's there

Also some scope to cloud sync that via a private github or other mechanism perhaps

Check for Update button gone missing

Brief description

The Check for Update button has gone missing and thus the download/update progress bar

Additional context or questions

BarryPls

Add support for name to ID

A lot of the API's for extensions will utilise a broadcaster/channel ID.

Add support to auto convert a username to a user ID.

This is probably reliant on #1 as this will need an oAuth token of some description.

So adidng support for bits product managment will provide an token to use to call get users with

Provide a mac build please

Brief description

Jeez barry why.....

Extended description and links to related things

This space left intentionally blank

Additional context or questions

Like why?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.