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

Function crawlerClient

pkg/cmd/factory/default.go:75–88  ·  view source on GitHub ↗
(f *cmdutil.Factory)

Source from the content-addressed store, hash-verified

73}
74
75func crawlerClient(f *cmdutil.Factory) func() (*crawler.Client, error) {
76 return func() (*crawler.Client, error) {
77 userID, err := f.Config.Profile().GetCrawlerUserID()
78 if err != nil {
79 return nil, err
80 }
81 APIKey, err := f.Config.Profile().GetCrawlerAPIKey()
82 if err != nil {
83 return nil, err
84 }
85
86 return crawler.NewClient(userID, APIKey), nil
87 }
88}
89
90func compositionClient(f *cmdutil.Factory, appVersion string) func() (*composition.APIClient, error) {
91 return func() (*composition.APIClient, error) {

Callers 1

NewFunction · 0.85

Calls 4

NewClientFunction · 0.92
GetCrawlerUserIDMethod · 0.80
GetCrawlerAPIKeyMethod · 0.80
ProfileMethod · 0.65

Tested by

no test coverage detected