MCPcopy Create free account
hub / github.com/algolia/cli / NewClientWithHTTPClient

Function NewClientWithHTTPClient

api/dashboard/client.go:78–83  ·  view source on GitHub ↗

NewClientWithHTTPClient creates a new dashboard client with a custom HTTP client. Used primarily in tests; callers must set DashboardURL and APIURL explicitly.

(clientID string, httpClient *http.Client)

Source from the content-addressed store, hash-verified

76// NewClientWithHTTPClient creates a new dashboard client with a custom HTTP client.
77// Used primarily in tests; callers must set DashboardURL and APIURL explicitly.
78func NewClientWithHTTPClient(clientID string, httpClient *http.Client) *Client {
79 return &Client{
80 ClientID: clientID,
81 client: httpClient,
82 }
83}
84
85// AuthorizeURL builds the OAuth 2.0 authorization URL for the browser-based sign-in flow.
86func (c *Client) AuthorizeURL(codeChallenge, redirectURI string) string {

Callers 9

newRefreshServerFunction · 0.92
newLogoutOptsFunction · 0.92
newDashboardTestClientFunction · 0.92
newOptsFunction · 0.92
newOptsFunction · 0.92
newOptsFunction · 0.92
newOptsFunction · 0.92
newTestClientFunction · 0.70

Calls

no outgoing calls

Tested by 9

newRefreshServerFunction · 0.74
newLogoutOptsFunction · 0.74
newDashboardTestClientFunction · 0.74
newOptsFunction · 0.74
newOptsFunction · 0.74
newOptsFunction · 0.74
newOptsFunction · 0.74
newTestClientFunction · 0.56