| 35 | ) |
| 36 | |
| 37 | type ApiOptions struct { |
| 38 | AppVersion string |
| 39 | InvokingAgent string |
| 40 | BaseRepo func() (ghrepo.Interface, error) |
| 41 | Branch func() (string, error) |
| 42 | Config func() (gh.Config, error) |
| 43 | HttpClient func(api.HTTPClientOptions) (*http.Client, error) |
| 44 | IO *iostreams.IOStreams |
| 45 | TelemetryDisabler ghtelemetry.Disabler |
| 46 | |
| 47 | Hostname string |
| 48 | RequestMethod string |
| 49 | RequestMethodPassed bool |
| 50 | RequestPath string |
| 51 | RequestInputFile string |
| 52 | MagicFields []string |
| 53 | RawFields []string |
| 54 | RequestHeaders []string |
| 55 | Previews []string |
| 56 | ShowResponseHeaders bool |
| 57 | Paginate bool |
| 58 | Slurp bool |
| 59 | Silent bool |
| 60 | Template string |
| 61 | CacheTTL time.Duration |
| 62 | FilterOutput string |
| 63 | Verbose bool |
| 64 | |
| 65 | AllowEscapeSequences bool |
| 66 | } |
| 67 | |
| 68 | func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command { |
| 69 | opts := ApiOptions{ |
nothing calls this directly
no outgoing calls
no test coverage detected