MCPcopy Index your code
hub / github.com/google/go-github / DownloadUserDailyMetrics

Method DownloadUserDailyMetrics

github/copilot.go:1219–1231  ·  view source on GitHub ↗

DownloadUserDailyMetrics downloads the payload of a 1-day Copilot user metrics report from a download link returned by GetEnterpriseUsersDailyMetricsReport or GetOrganizationUsersDailyMetricsReport. The response is newline-delimited JSON, with one CopilotUserDailyMetrics record per line.

(ctx context.Context, url string)

Source from the content-addressed store, hash-verified

1217//
1218// The response is newline-delimited JSON, with one CopilotUserDailyMetrics record per line.
1219func (s *CopilotService) DownloadUserDailyMetrics(ctx context.Context, url string) ([]*CopilotUserDailyMetrics, *Response, error) {
1220 resp, r, err := s.fetchMetricsReport(ctx, url)
1221 if err != nil {
1222 return nil, r, err
1223 }
1224 defer resp.Body.Close()
1225
1226 records, err := decodeNDJSONMetrics[CopilotUserDailyMetrics](resp.Body)
1227 if err != nil {
1228 return nil, r, err
1229 }
1230 return records, r, nil
1231}
1232
1233// DownloadUserPeriodicMetrics downloads the payload of a multi-day (e.g. 28-day rolling) Copilot
1234// user metrics report from a download link returned by GetEnterpriseUsersMetricsReport or

Calls 2

fetchMetricsReportMethod · 0.95
CloseMethod · 0.80