.github/images/out.gif
.github/images/out.gif
This is a binary file and will not be displayed.
+7
-1
cassette.tape
+7
-1
cassette.tape
······
+118
-44
flake.nix
+118
-44
flake.nix
······
+232
-14
handler/main.go
+232
-14
handler/main.go
······+return configApiKey, configApiURL, errors.New("config file not found and you haven't passed all arguments")···+c.Printf("Sweet!!! Looks like your hackatime is configured properly! Looks like you have coded today for %s\n\n", styles.Fancy.Render(utils.PrettyPrintTime(duration.Data.GrandTotal.TotalSeconds)))+return errors.New("oh dear; looks like something went wrong when sending that heartbeat. " + styles.Bad.Render("Full error: \""+strings.TrimSpace(err.Error())+"\""))-c.Printf("Sweet!!! Looks like your hackatime is configured properly! Looks like you have coded today for %s\n\n", styles.Fancy.Render(formattedTime))-return errors.New("oh dear; looks like something went wrong when sending that heartbeat. " + styles.Bad.Render("Full error: \""+strings.TrimSpace(err.Error())+"\""))+c.Printf("\nLooks like you have coded today for %s today!\n", styles.Fancy.Render(utils.PrettyPrintTime(status.Data.GrandTotal.TotalSeconds)))+c.Printf("You have averaged %s over the last 7 days\n\n", styles.Fancy.Render(utils.PrettyPrintTime(int(summary.Data.DailyAverage))))
+18
main.go
+18
main.go
···
+22
utils/main.go
+22
utils/main.go
···
+89
wakatime/main.go
+89
wakatime/main.go
···+// GetLast7Days retrieves a user's coding activity summary for the past 7 days from the WakaTime API.+// It returns a Last7DaysResponse and an error if the request fails or returns a non-success status code.+req, err := http.NewRequest("GET", fmt.Sprintf("%s/users/current/stats/last_7_days", c.APIURL), nil)+return Last7DaysResponse{}, fmt.Errorf("%w: status code %d, response: %s", ErrInvalidStatusCode, resp.StatusCode, respContent)+return Last7DaysResponse{}, fmt.Errorf("%w: %v, response: %s", ErrDecodingResponse, err, respContent)