Skip to content

Commit 33c8219

Browse files
committed
Add support for Graph API handler
1 parent 9ae5712 commit 33c8219

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

httpclient/httpclient_api_handler.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package httpclient
44
import (
55
"net/http"
66

7+
"github.com/deploymenttheory/go-api-http-client/apihandlers/graph"
78
"github.com/deploymenttheory/go-api-http-client/apihandlers/jamfpro"
89
"github.com/deploymenttheory/go-api-http-client/logger"
910
"go.uber.org/zap"
@@ -16,7 +17,6 @@ type APIHandler interface {
1617
ConstructAPIAuthEndpoint(instanceName string, endpointPath string, log logger.Logger) string
1718
MarshalRequest(body interface{}, method string, endpoint string, log logger.Logger) ([]byte, error)
1819
MarshalMultipartRequest(fields map[string]string, files map[string]string, log logger.Logger) ([]byte, string, error)
19-
//HandleResponse(resp *http.Response, out interface{}, log logger.Logger) error
2020
HandleAPISuccessResponse(resp *http.Response, out interface{}, log logger.Logger) error
2121
HandleAPIErrorResponse(resp *http.Response, out interface{}, log logger.Logger) error
2222
GetContentTypeHeader(method string, log logger.Logger) string
@@ -44,12 +44,12 @@ func LoadAPIHandler(apiType string, log logger.Logger) (APIHandler, error) {
4444
}
4545
log.Info("API handler loaded successfully", zap.String("APIType", apiType))
4646

47-
/*case "graph":
48-
apiHandler = &graph.GraphAPIHandler{
49-
// Initialize with necessary parameters
50-
}
51-
log.Info("API handler loaded successfully", zap.String("APIType", apiType))
52-
*/
47+
case "graph":
48+
apiHandler = &graph.GraphAPIHandler{
49+
// Initialize with necessary parameters
50+
}
51+
log.Info("API handler loaded successfully", zap.String("APIType", apiType))
52+
5353
default:
5454
return nil, log.Error("Unsupported API type", zap.String("APIType", apiType))
5555
}

0 commit comments

Comments
 (0)