Update README.md

This commit is contained in:
2025-12-20 07:27:35 +00:00
parent 6590dcdac7
commit 6c138c93a4
+8 -10
View File
@@ -9,26 +9,24 @@ Previously, there was a "deploy to cloudflare" button here, but it seems to only
### Docker ### Docker
This worker requires that the KV store is pre-populated with client-id keys and client-secret values, but doesn't provide any mechanism for this to work with selflare. As such, the docker container may not be usable until this is resolved. PRs are welcome. Previously, this repo produced oci images, but they were inclomlete and more work is needed before they are ready.
This worker is also availible as a docker container at [ghcr.io/sugoidogo/twitch-cloud-ebs](https://github.com/sugoidogo/twitch-clips-consent-api/pkgs/container/twitch-clips-consent-api).
It listens on HTTP port 8080 and requires mounts for `/worker/cache`, `/worker/kv`, `/worker/d1`, and `/worker/r2`.
The r2 and kv mounts are the only ones actually used, but the selflare runtime requires all of them regardless.
## Twurple Module ## Twurple Module
https://gitea.sugoidogo.com/sugoidogo/-/packages/npm/@sugoidogo%2Ftwitch-cloud-ebs/
This API provides two Twurple modules, one for authorization and one for storage, allowing for easy integration if you're already using the Twurple javascript library. This API provides two Twurple modules, one for authorization and one for storage, allowing for easy integration if you're already using the Twurple javascript library.
the WebStorage module can be used to cache fetched resources from anywhere, but when used as demonstrated below, allows your client to maintain access to previously stored resources from cloud storage via the browser's CacheStorage API. the WebStorage module can be used to cache fetched resources from anywhere, but when used as demonstrated below, allows your client to maintain access to previously stored resources from cloud storage via the browser's CacheStorage API.
<details><summary>javascript</summary> <details><summary>javascript</summary>
```javascript ```javascript
import SugoiAuthProvider from 'https://ebs.domain.com/SugoiAuthProvider.js' import { SugoiAuthProvider, WebStorage } from '@sugoidogo/twitch-cloud-ebs'
import WebStorage from 'https://ebs.domain.com/WebStorage.js' import { ApiClient } from '@twurple/ebs';
import { ApiClient } from 'https://cdn.jsdelivr.net/npm/@twurple/api@7/+esm';
const authProvicder=new SugoiAuthProvider('your-client-id') const ebs_host='https://your.ebs.hostname'
const webStorage=new WebStorage(authProvider) const authProvicder=new SugoiAuthProvider('your-client-id',ebs_host)
const webStorage=new WebStorage(authProvider,undefined,ebs_host)
const apiClient = new ApiClient({ authProvider }); const apiClient = new ApiClient({ authProvider });
const config=await webStorage.fetch('config.json').then(response=>response.json()) const config=await webStorage.fetch('config.json').then(response=>response.json())