// Code generated by Lark OpenAPI.

package larkperformance

import (
	"context"
	"github.com/larksuite/oapi-sdk-go/v3/core"
	"net/http"
)

type V2 struct {
	Activity                    *activity                    // activity
	AdditionalInformation       *additionalInformation       // additional_information
	AdditionalInformationsBatch *additionalInformationsBatch // additional_informations.batch
	Indicator                   *indicator                   // indicator
	MetricDetail                *metricDetail                // metric_detail
	MetricField                 *metricField                 // metric_field
	MetricLib                   *metricLib                   // metric_lib
	MetricTag                   *metricTag                   // metric_tag
	MetricTemplate              *metricTemplate              // metric_template
	Question                    *question                    // question
	ReviewData                  *reviewData                  // review_data
	ReviewTemplate              *reviewTemplate              // review_template
	Reviewee                    *reviewee                    // reviewee
	StageTask                   *stageTask                   // stage_task
	UserGroupUserRel            *userGroupUserRel            // user_group_user_rel
	UserInfo                    *userInfo                    // user_info
}

func New(config *larkcore.Config) *V2 {
	return &V2{
		Activity:                    &activity{config: config},
		AdditionalInformation:       &additionalInformation{config: config},
		AdditionalInformationsBatch: &additionalInformationsBatch{config: config},
		Indicator:                   &indicator{config: config},
		MetricDetail:                &metricDetail{config: config},
		MetricField:                 &metricField{config: config},
		MetricLib:                   &metricLib{config: config},
		MetricTag:                   &metricTag{config: config},
		MetricTemplate:              &metricTemplate{config: config},
		Question:                    &question{config: config},
		ReviewData:                  &reviewData{config: config},
		ReviewTemplate:              &reviewTemplate{config: config},
		Reviewee:                    &reviewee{config: config},
		StageTask:                   &stageTask{config: config},
		UserGroupUserRel:            &userGroupUserRel{config: config},
		UserInfo:                    &userInfo{config: config},
	}
}

type activity struct {
	config *larkcore.Config
}
type additionalInformation struct {
	config *larkcore.Config
}
type additionalInformationsBatch struct {
	config *larkcore.Config
}
type indicator struct {
	config *larkcore.Config
}
type metricDetail struct {
	config *larkcore.Config
}
type metricField struct {
	config *larkcore.Config
}
type metricLib struct {
	config *larkcore.Config
}
type metricTag struct {
	config *larkcore.Config
}
type metricTemplate struct {
	config *larkcore.Config
}
type question struct {
	config *larkcore.Config
}
type reviewData struct {
	config *larkcore.Config
}
type reviewTemplate struct {
	config *larkcore.Config
}
type reviewee struct {
	config *larkcore.Config
}
type stageTask struct {
	config *larkcore.Config
}
type userGroupUserRel struct {
	config *larkcore.Config
}
type userInfo struct {
	config *larkcore.Config
}

// Query
//
// - 获取项目的信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=activity&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_activity.go
func (a *activity) Query(ctx context.Context, req *QueryActivityReq, options ...larkcore.RequestOptionFunc) (*QueryActivityResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/activity/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryActivityResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Import
//
// - 可批量导入被评估人的补充信息作为评估参考（包括新增和更新场景）
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=import&project=performance&resource=additional_information&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/import_additionalInformation.go
func (a *additionalInformation) Import(ctx context.Context, req *ImportAdditionalInformationReq, options ...larkcore.RequestOptionFunc) (*ImportAdditionalInformationResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/additional_informations/import"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ImportAdditionalInformationResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 可批量查询被评估人的补充信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=additional_information&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_additionalInformation.go
func (a *additionalInformation) Query(ctx context.Context, req *QueryAdditionalInformationReq, options ...larkcore.RequestOptionFunc) (*QueryAdditionalInformationResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/additional_informations/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryAdditionalInformationResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (a *additionalInformation) QueryByIterator(ctx context.Context, req *QueryAdditionalInformationReq, options ...larkcore.RequestOptionFunc) (*QueryAdditionalInformationIterator, error) {
	return &QueryAdditionalInformationIterator{
		ctx:      ctx,
		req:      req,
		listFunc: a.Query,
		options:  options,
		limit:    req.Limit}, nil
}

// Delete
//
// - 批量删除补充信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=delete&project=performance&resource=additional_informations.batch&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/delete_additionalInformationsBatch.go
func (a *additionalInformationsBatch) Delete(ctx context.Context, req *DeleteAdditionalInformationsBatchReq, options ...larkcore.RequestOptionFunc) (*DeleteAdditionalInformationsBatchResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/additional_informations/batch"
	apiReq.HttpMethod = http.MethodDelete
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, a.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &DeleteAdditionalInformationsBatchResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, a.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取评估题配置
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=indicator&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_indicator.go
func (i *indicator) Query(ctx context.Context, req *QueryIndicatorReq, options ...larkcore.RequestOptionFunc) (*QueryIndicatorResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/indicators/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, i.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryIndicatorResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, i.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (i *indicator) QueryByIterator(ctx context.Context, req *QueryIndicatorReq, options ...larkcore.RequestOptionFunc) (*QueryIndicatorIterator, error) {
	return &QueryIndicatorIterator{
		ctx:      ctx,
		req:      req,
		listFunc: i.Query,
		options:  options,
		limit:    req.Limit}, nil
}

// Import
//
// - 批量录入指定周期被评估人的关键指标详情
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=import&project=performance&resource=metric_detail&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/import_metricDetail.go
func (m *metricDetail) Import(ctx context.Context, req *ImportMetricDetailReq, options ...larkcore.RequestOptionFunc) (*ImportMetricDetailResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/metric_details/import"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, m.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ImportMetricDetailResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, m.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 批量获取指定周期中被评估人的关键指标详情
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_detail&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_metricDetail.go
func (m *metricDetail) Query(ctx context.Context, req *QueryMetricDetailReq, options ...larkcore.RequestOptionFunc) (*QueryMetricDetailResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/metric_details/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, m.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryMetricDetailResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, m.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取指标的字段基础信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_field&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_metricField.go
func (m *metricField) Query(ctx context.Context, req *QueryMetricFieldReq, options ...larkcore.RequestOptionFunc) (*QueryMetricFieldResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/metric_fields/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, m.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryMetricFieldResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, m.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取指标库的信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_lib&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_metricLib.go
func (m *metricLib) Query(ctx context.Context, req *QueryMetricLibReq, options ...larkcore.RequestOptionFunc) (*QueryMetricLibResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/metric_libs/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, m.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryMetricLibResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, m.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// List
//
// - 获取指标标签列表
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=list&project=performance&resource=metric_tag&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/list_metricTag.go
func (m *metricTag) List(ctx context.Context, req *ListMetricTagReq, options ...larkcore.RequestOptionFunc) (*ListMetricTagResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/metric_tags"
	apiReq.HttpMethod = http.MethodGet
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, m.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &ListMetricTagResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, m.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (m *metricTag) ListByIterator(ctx context.Context, req *ListMetricTagReq, options ...larkcore.RequestOptionFunc) (*ListMetricTagIterator, error) {
	return &ListMetricTagIterator{
		ctx:      ctx,
		req:      req,
		listFunc: m.List,
		options:  options,
		limit:    req.Limit}, nil
}

// Query
//
// - 获取指标模板的信息
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=metric_template&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_metricTemplate.go
func (m *metricTemplate) Query(ctx context.Context, req *QueryMetricTemplateReq, options ...larkcore.RequestOptionFunc) (*QueryMetricTemplateResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/metric_templates/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, m.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryMetricTemplateResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, m.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取标签填写题配置
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=question&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_question.go
func (q *question) Query(ctx context.Context, req *QueryQuestionReq, options ...larkcore.RequestOptionFunc) (*QueryQuestionResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/questions/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, q.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryQuestionResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, q.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (q *question) QueryByIterator(ctx context.Context, req *QueryQuestionReq, options ...larkcore.RequestOptionFunc) (*QueryQuestionIterator, error) {
	return &QueryQuestionIterator{
		ctx:      ctx,
		req:      req,
		listFunc: q.Query,
		options:  options,
		limit:    req.Limit}, nil
}

// Query
//
// - 获取绩效详情V2
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=review_data&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_reviewData.go
func (r *reviewData) Query(ctx context.Context, req *QueryReviewDataReq, options ...larkcore.RequestOptionFunc) (*QueryReviewDataResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/review_datas/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, r.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryReviewDataResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, r.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// - 获取评估模板配置
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=review_template&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_reviewTemplate.go
func (r *reviewTemplate) Query(ctx context.Context, req *QueryReviewTemplateReq, options ...larkcore.RequestOptionFunc) (*QueryReviewTemplateResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/review_templates/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, r.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryReviewTemplateResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, r.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
func (r *reviewTemplate) QueryByIterator(ctx context.Context, req *QueryReviewTemplateReq, options ...larkcore.RequestOptionFunc) (*QueryReviewTemplateIterator, error) {
	return &QueryReviewTemplateIterator{
		ctx:      ctx,
		req:      req,
		listFunc: r.Query,
		options:  options,
		limit:    req.Limit}, nil
}

// Query
//
// - 获取指定周期参与了的被评估人
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=reviewee&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_reviewee.go
func (r *reviewee) Query(ctx context.Context, req *QueryRevieweeReq, options ...larkcore.RequestOptionFunc) (*QueryRevieweeResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/reviewees/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, r.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryRevieweeResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, r.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Write
//
// - 写入人员组成员范围
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=write&project=performance&resource=user_group_user_rel&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/write_userGroupUserRel.go
func (u *userGroupUserRel) Write(ctx context.Context, req *WriteUserGroupUserRelReq, options ...larkcore.RequestOptionFunc) (*WriteUserGroupUserRelResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/user_group_user_rels/write"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &WriteUserGroupUserRelResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}

// Query
//
// -
//
// - 官网API文档链接:https://open.feishu.cn/api-explorer?from=op_doc_tab&apiName=query&project=performance&resource=user_info&version=v2
//
// - 使用Demo链接:https://github.com/larksuite/oapi-sdk-go/tree/v3_main/sample/apiall/performancev2/query_userInfo.go
func (u *userInfo) Query(ctx context.Context, req *QueryUserInfoReq, options ...larkcore.RequestOptionFunc) (*QueryUserInfoResp, error) {
	// 发起请求
	apiReq := req.apiReq
	apiReq.ApiPath = "/open-apis/performance/v2/user_info/query"
	apiReq.HttpMethod = http.MethodPost
	apiReq.SupportedAccessTokenTypes = []larkcore.AccessTokenType{larkcore.AccessTokenTypeTenant}
	apiResp, err := larkcore.Request(ctx, apiReq, u.config, options...)
	if err != nil {
		return nil, err
	}
	// 反序列响应结果
	resp := &QueryUserInfoResp{ApiResp: apiResp}
	err = apiResp.JSONUnmarshalBody(resp, u.config)
	if err != nil {
		return nil, err
	}
	return resp, err
}
