(parameters: TriviaParameters)
| 107 | } |
| 108 | |
| 109 | function createAPIUrl(parameters: TriviaParameters): string { |
| 110 | const { number, category, difficulty, type } = parameters; |
| 111 | let url = "https://opentdb.com/api.php?"; |
| 112 | url += number ? `amount=${number}&` : `amount=10&`; |
| 113 | url += category ? `category=${category}&` : ""; |
| 114 | url += difficulty ? `difficulty=${difficulty}&` : ""; |
| 115 | url += type ? `type=${type}` : ""; |
| 116 | |
| 117 | return url; |
| 118 | } |
| 119 | |
| 120 | async function startUI() { |
| 121 | figma.showUI(__html__, { visible: false }); |
no outgoing calls
no test coverage detected