Skip to content

Commit

Permalink
badcase反馈接口
Browse files Browse the repository at this point in the history
  • Loading branch information
mossju committed Jun 23, 2022
1 parent e3243c6 commit ec2afa4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions ci.go
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,38 @@ func (s *CIService) GetWebpageAuditingJob(ctx context.Context, jobid string) (*G
return &res, resp, err
}

// ReportBadcaseOptions
type ReportBadcaseOptions struct {
XMLName xml.Name `xml:"Request"`
ContentType int `xml:",omitempty"`
Text string `xml:",omitempty"`
Url string `xml:",omitempty"`
Label string `xml:",omitempty"`
SuggestedLabel string `xml:",omitempty"`
JobId string `xml:",omitempty"`
ModerationTime string `xml:",omitempty"`
}

// ReportBadcaseResult
type ReportBadcaseResult struct {
XMLName xml.Name `xml:"Response"`
RequestId string `xml:",omitempty"`
}

// 提交Badcase
func (s *CIService) ReportBadcase(ctx context.Context, opt *ReportBadcaseOptions) (*ReportBadcaseResult, *Response, error) {
var res ReportBadcaseResult
sendOpt := sendOptions{
baseURL: s.client.BaseURL.CIURL,
uri: "/report/badcase",
method: http.MethodPost,
body: opt,
result: &res,
}
resp, err := s.client.send(ctx, &sendOpt)
return &res, resp, err
}

// PutVirusDetectJobOptions is the option of PutVirusDetectJob
type PutVirusDetectJobOptions struct {
XMLName xml.Name `xml:"Request"`
Expand Down

0 comments on commit ec2afa4

Please sign in to comment.