(href, opts, items = [])
| 5 | const BaseCommand = require('../base-cmd.js') |
| 6 | |
| 7 | async function paginate (href, opts, items = []) { |
| 8 | while (href) { |
| 9 | const result = await fetch.json(href, opts) |
| 10 | items = items.concat(result.objects) |
| 11 | href = result.urls.next |
| 12 | } |
| 13 | return items |
| 14 | } |
| 15 | |
| 16 | class Token extends BaseCommand { |
| 17 | static description = 'Manage your authentication tokens' |