// NewAPI returns a new API instance.
NewAPI returns a new API instance.
// NewAPI returns a new API instance .
func NewAPI(opts ...apiOption) (*API, error) {
	api := &API{}
	for _, opt := range opts {
		err := opt(api)
		if err != nil {
			return nil, errors.Wrap(err, "applying option")
		}
	}
	return api, nil
}
func NewAPI ( opts ... apiOption ) ( * API , error ) { api := & API { } for _ , opt := range opts { err := opt ( api ) if err != nil { return nil , errors . Wrap ( err , " " ) } } return api , nil }
NewAPI returns a new API instance.
NewAPI returns a new API instance .