MCPcopy Create free account
hub / github.com/LumaAI-API/Luma-API / getUsage

Function getUsage

luma.go:277–291  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275}
276
277func getUsage() (map[string]any, error) {
278 resp, err := DoRequest(http.MethodGet, common.BaseUrl+UsageEndpoint, nil, nil)
279 if err != nil {
280 return nil, err
281 }
282 if resp.StatusCode != http.StatusOK {
283 return nil, errors.New(resp.Status)
284 }
285 var res = make(map[string]any)
286 err = json.NewDecoder(resp.Body).Decode(&res)
287 if err != nil {
288 return nil, err
289 }
290 return res, nil
291}

Callers 1

UsageFunction · 0.85

Calls 1

DoRequestFunction · 0.85

Tested by

no test coverage detected