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


##########
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:
   The option will be passed to the `api_collector`, It should be explained 
there in detail in another PR instead



-- 
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