(name: string)
| 60 | } |
| 61 | |
| 62 | unregisterAPI(name: string) { |
| 63 | if (!(name in this.#apis)) |
| 64 | throw new Error(`There is no API named "${name}".`); |
| 65 | if (this.getCredentials().find(e => e.type == name)) |
| 66 | throw new Error(`Can not unregister API "${name}" because there is an API credential using it.`); |
| 67 | delete this.#apis[name]; |
| 68 | this.saveConfig(); |
| 69 | } |
| 70 | |
| 71 | getAPISelections(): Selection[] { |
| 72 | return Object.keys(this.#apis).map(k => ({name: k, value: this.#apis[k]})).sort(sortByPriority); |
nothing calls this directly
no test coverage detected