Spaces:
Paused
Paused
Download src/providers/index.js from ZSCGR/Meting-API: direct link, hf CLI and curl.
- Browser
- Download file 646 Bytes
-
https://huggingface.co/spaces/ZSCGR/Meting-API/resolve/main/src/providers/index.js
- Command line
-
hf download hf://spaces/ZSCGR/Meting-API/src/providers/index.js
-
curl -L -o index.js https://huggingface.co/spaces/ZSCGR/Meting-API/resolve/main/src/providers/index.js
646 Bytes
| import tencent from "./tencent/index.js" | |
| import netease from './netease/index.js' | |
| import ytmusic from './ytmusic/index.js' | |
| import spotify from "./spotify/index.js" | |
| class Providers { | |
| constructor() { | |
| this.providers = {} | |
| tencent.register(this) | |
| netease.register(this) | |
| ytmusic.register(this) | |
| spotify.register(this) | |
| } | |
| register(provider_name, handle_obj) { | |
| this.providers[provider_name] = handle_obj | |
| } | |
| get(provider_name) { | |
| return this.providers[provider_name]; | |
| } | |
| get_provider_list() { | |
| return Object.keys(this.providers) | |
| } | |
| } | |
| export default Providers | |