mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 11:48:13 +01:00
23 lines
411 B
Go
23 lines
411 B
Go
package commands
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/asciinema/asciinema/api"
|
|
)
|
|
|
|
type AuthCommand struct {
|
|
api api.API
|
|
}
|
|
|
|
func NewAuthCommand(api api.API) *AuthCommand {
|
|
return &AuthCommand{api}
|
|
}
|
|
|
|
func (c *AuthCommand) Execute() error {
|
|
fmt.Println("Open the following URL in a browser to register your API token and assign any recorded asciicasts to your profile:")
|
|
fmt.Println(c.api.AuthUrl())
|
|
|
|
return nil
|
|
}
|