keon94 commented on code in PR #4626:
URL: 
https://github.com/apache/incubator-devlake/pull/4626#discussion_r1141620636


##########
backend/helpers/pluginhelper/api/api_collector_with_state.go:
##########
@@ -258,27 +265,31 @@ type FinalizableApiCollectorArgs struct {
        CollectUnfinishedDetails FinalizableApiCollectorDetailArgs
 }
 
+// FinalizableApiCollectorCommonArgs is the common arguments for both list and 
detail collectors
+// Note that all request-related arguments would be called or utilized before 
any response-related arguments
 type FinalizableApiCollectorCommonArgs struct {
-       UrlTemplate     string `comment:"GoTemplate for API url"`
-       Query           func(reqData *RequestData, createdAfter *time.Time) 
(url.Values, errors.Error)
-       Header          func(reqData *RequestData, createdAfter *time.Time) 
(http.Header, errors.Error)
-       MinTickInterval *time.Duration
-       ResponseParser  func(res *http.Response) ([]json.RawMessage, 
errors.Error)
-       AfterResponse   common.ApiClientAfterResponse
-       RequestBody     func(reqData *RequestData) map[string]interface{}
-       Method          string
+       UrlTemplate     string                                                  
                        // required, url path template for the request, e.g. 
repos/{{ .Params.Name }}/pulls

Review Comment:
   Let's explain what the allowed variables on the URL template are. For 
example, ".Params" corresponds to whatever gets set on RawDataSubtaskArgs. 
Similarly for ".Input", etc.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to