CallRefAPI calls a referenced api.
(api IAPI)
| 692 | |
| 693 | // CallRefAPI calls a referenced api. |
| 694 | func (s *StepRequest) CallRefAPI(api IAPI) *StepAPIWithOptionalArgs { |
| 695 | var err error |
| 696 | s.step.API, err = api.ToAPI() |
| 697 | if err != nil { |
| 698 | log.Error().Err(err).Msg("failed to load api") |
| 699 | os.Exit(code.GetErrorCode(err)) |
| 700 | } |
| 701 | return &StepAPIWithOptionalArgs{ |
| 702 | step: s.step, |
| 703 | } |
| 704 | } |
| 705 | |
| 706 | // StartTransaction starts a transaction. |
| 707 | func (s *StepRequest) StartTransaction(name string) *StepTransaction { |