{"id":37880173,"url":"https://github.com/ferueda/go-whoop","last_synced_at":"2026-01-16T16:47:57.827Z","repository":{"id":64089416,"uuid":"570275592","full_name":"ferueda/go-whoop","owner":"ferueda","description":"Go client for accessing the WHOOP API (https://developer.whoop.com/)","archived":false,"fork":false,"pushed_at":"2022-12-02T05:57:15.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-21T09:47:21.174Z","etag":null,"topics":["go","golang","whoop","whoop-api","whoop-strap"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/ferueda/go-whoop","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferueda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-24T19:04:28.000Z","updated_at":"2024-06-21T09:47:21.175Z","dependencies_parsed_at":"2023-01-14T22:00:47.880Z","dependency_job_id":null,"html_url":"https://github.com/ferueda/go-whoop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ferueda/go-whoop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferueda%2Fgo-whoop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferueda%2Fgo-whoop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferueda%2Fgo-whoop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferueda%2Fgo-whoop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferueda","download_url":"https://codeload.github.com/ferueda/go-whoop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferueda%2Fgo-whoop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","whoop","whoop-api","whoop-strap"],"created_at":"2026-01-16T16:47:57.731Z","updated_at":"2026-01-16T16:47:57.803Z","avatar_url":"https://github.com/ferueda.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-whoop\n=======\n\n[![go-whoop release (latest SemVer)](https://img.shields.io/github/v/release/ferueda/go-whoop?sort=semver)](https://github.com/ferueda/go-whoop/releases)\n[![GoDoc](https://godoc.org/github.com/ferueda/go-whoop?status.svg)](http://godoc.org/github.com/ferueda/go-whoop)\n[![Test Status](https://github.com/ferueda/go-whoop/workflows/tests/badge.svg)](https://github.com/ferueda/go-whoop/actions?query=workflow%3Atests)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ferueda/go-whoop)](https://goreportcard.com/report/github.com/ferueda/go-whoop)\n\ngo-whoop is a Go client library for accessing the [WHOOP Platform API](https://developer.whoop.com/api).\n\n## Installation\n\nTo install the library, simply\n\n`go get github.com/ferueda/go-whoop`\n\n## Usage\n```go\nimport \"github.com/ferueda/go-whoop/whoop\"\n```\nCreate a new client, then use the various services on the client to access different parts of the API. For example:\n```go\nclient := whoop.NewClient(nil)\nctx := context.Background()\n\n// list all cycles for the authenticated user\ncycles, _ := client.Cycle.ListAll(ctx, nil)\n```\n\n### Query filters\n\nSome API methods have optional parameters that can be passed to filter results by dates, limit the number of results returned, or provied the token for the next page of results. For example:\n\n```go\nclient := whoop.NewClient(nil)\nctx := context.Background()\n\n// List all cycle records for the authenticated user with query filters.\nparams := whoop.RequestParams{\n\t\tStart:     time.Now().Add(time.Hour * -48),\n\t\tEnd:       time.Now(),\n\t\tLimit:     4,\n\t\tNextToken: \"abc\"}\n\ncycles, err := client.Cycle.ListAll(ctx, \u0026params)\n```\n\n### User Service\nGet the profile for the authenticated user.\n```go\nprofile, err := client.User.GetProfile(ctx)\n```\nGet the body measurements for the authenticated user.\n```go\nbodyMeasurement, err := client.User.GetBodyMeasurement(ctx)\n```\n\n### Cycle Service\nGet a single physiological cycle record for the specified id.\n```go\ncycle, err := client.Cycle.GetOne(ctx, 1)\n```\nList all physiological cycle records for the authenticated user.\n```go\ncycles, err := client.Cycle.ListAll(ctx, nil)\n```\n\n### Sleep Service\nGet a single single sleep record for the specified id.\n```go\nsleep, err := client.Sleep.GetOne(ctx, 1)\n```\nList all sleep records for the authenticated user.\n```go\nsleeps, err := client.Sleep.ListAll(ctx, nil)\n```\n\n### Recovery Service\nGet a single recovery record for the specified cycle id.\n```go\nrecovery, err := client.Recovery.GetOneByCycleId(ctx, 1)\n```\nList all recovery records for the authenticated user.\n```go\nrecoveries, err := client.Recovery.ListAll(ctx, nil)\n```\n\n### Workout Service\nGet a single workout activity record for the specified id.\n```go\nworkout, err := client.Workout.GetOne(ctx, 1)\n```\nList all workout activity records for the authenticated user.\n```go\nworkouts, err := client.Workout.ListAll(ctx, nil)\n```\n\n## Authentication\nThe client does not handle authentication for you. Instead, you can provide `whoop.NewClient()` with an `http.Client` of your own that can handle authentication for you.\n\nThe most common way is using the [OAuth2 package](https://pkg.go.dev/golang.org/x/oauth2).\n\nIf you have an OAuth2 access token, you can use it with the OAuth2 package like:\n\n```go\nimport (\n    \"context\"\n\n    \"github.com/ferueda/go-whoop/whoop\"\n    \"golang.org/x/oauth2\"\n)\n\nfunc main() {\n    ctx := context.Background()\n    ts := oauth2.StaticTokenSource(\n        \u0026oauth2.Token{AccessToken: \"your_token\"},\n    )\n\n    client := whoop.NewClient(oauth2.NewClient(ctx, ts))\n    cycles, _ := client.Cycle.ListAll(ctx, nil)\n}\n```\n\n## How to Contribute\n\n* Fork a repository\n* Add/Fix something\n* Check that tests are passing\n* Create PR\n\nCurrent contributors:\n\n- [Felipe Rueda](https://github.com/ferueda)\n\n## License ##\n\nThis library is distributed under the MIT License found in the [LICENSE](./LICENSE)\nfile.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferueda%2Fgo-whoop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferueda%2Fgo-whoop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferueda%2Fgo-whoop/lists"}