Nostr streaming provider topup

This commit is contained in:
2023-07-04 14:12:49 +01:00
parent 7cc613646c
commit 552a6744a8
9 changed files with 148 additions and 65 deletions

View File

@ -15,6 +15,10 @@ export class OwncastProvider implements StreamProvider {
return new URL(this.#url).host
}
get type() {
return StreamProviders.Owncast
}
createConfig(): any & { type: StreamProviders; } {
return {
type: StreamProviders.Owncast,
@ -40,6 +44,10 @@ export class OwncastProvider implements StreamProvider {
} as StreamProviderInfo
}
topup(amount: number): Promise<string> {
throw new Error("Method not implemented.");
}
async #getJson<T>(method: "GET" | "POST", path: string, body?: unknown): Promise<T> {
const rsp = await fetch(`${this.#url}${path}`, {
method: method,