MCPcopy Index your code
hub / github.com/LumaAI-API/Luma-API / getMe

Function getMe

luma.go:261–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

259}
260
261func getMe() (map[string]any, error) {
262 resp, err := DoRequest(http.MethodGet, common.BaseUrl+UserinfoEndpoint, nil, nil)
263 if err != nil {
264 return nil, err
265 }
266 if resp.StatusCode != http.StatusOK {
267 return nil, errors.New(resp.Status)
268 }
269 var res = make(map[string]any)
270 err = json.NewDecoder(resp.Body).Decode(&res)
271 if err != nil {
272 return nil, err
273 }
274 return res, nil
275}
276
277func getUsage() (map[string]any, error) {
278 resp, err := DoRequest(http.MethodGet, common.BaseUrl+UsageEndpoint, nil, nil)

Callers 2

MeFunction · 0.85
StartAllKeepAliveFunction · 0.85

Calls 1

DoRequestFunction · 0.85

Tested by

no test coverage detected