* Fetch example list json
(client: Client)
| 92 | * Fetch example list json |
| 93 | */ |
| 94 | async function fetchExampleList(client: Client) { |
| 95 | output.spinner('Fetching examples'); |
| 96 | const url = `${EXAMPLE_API}/v2/list.json`; |
| 97 | |
| 98 | const body = await client.fetch<Example[]>(url); |
| 99 | output.stopSpinner(); |
| 100 | return body; |
| 101 | } |
| 102 | |
| 103 | /** |
| 104 | * Prompt user for choosing which example to init |