MCPcopy Index your code
hub / github.com/apache/devlake / CreateApiClient

Function CreateApiClient

backend/plugins/asana/tasks/api_client.go:27–40  ·  view source on GitHub ↗
(taskCtx plugin.TaskContext, connection *models.AsanaConnection)

Source from the content-addressed store, hash-verified

25)
26
27func CreateApiClient(taskCtx plugin.TaskContext, connection *models.AsanaConnection) (*api.ApiAsyncClient, errors.Error) {
28 if connection.GetEndpoint() == "" {
29 connection.Endpoint = "https://app.asana.com/api/1.0/"
30 }
31 apiClient, err := api.NewApiClientFromConnection(taskCtx.GetContext(), taskCtx, connection)
32 if err != nil {
33 return nil, err
34 }
35 asyncApiClient, err := api.CreateAsyncApiClient(taskCtx, apiClient, nil)
36 if err != nil {
37 return nil, err
38 }
39 return asyncApiClient, nil
40}

Callers

nothing calls this directly

Calls 2

GetEndpointMethod · 0.65
GetContextMethod · 0.65

Tested by

no test coverage detected