{"id":15663890,"url":"https://github.com/nasa9084/go-switchbot","last_synced_at":"2025-04-15T11:12:45.056Z","repository":{"id":54989297,"uuid":"341949370","full_name":"nasa9084/go-switchbot","owner":"nasa9084","description":"SwitchBot API Client for Go","archived":false,"fork":false,"pushed_at":"2025-04-14T05:50:11.000Z","size":85,"stargazers_count":19,"open_issues_count":2,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T06:33:58.145Z","etag":null,"topics":["switchbot","switchbot-api"],"latest_commit_sha":null,"homepage":"","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/nasa9084.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-24T15:43:45.000Z","updated_at":"2025-04-14T05:49:08.000Z","dependencies_parsed_at":"2024-01-12T22:13:46.206Z","dependency_job_id":"690fb7a6-3eda-4509-8fce-6e44d941bfed","html_url":"https://github.com/nasa9084/go-switchbot","commit_stats":{"total_commits":46,"total_committers":10,"mean_commits":4.6,"dds":"0.34782608695652173","last_synced_commit":"755254e3b2864a555b3b4ad1ae1a1e1038a95cdc"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa9084%2Fgo-switchbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa9084%2Fgo-switchbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa9084%2Fgo-switchbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nasa9084%2Fgo-switchbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nasa9084","download_url":"https://codeload.github.com/nasa9084/go-switchbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248836886,"owners_count":21169373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["switchbot","switchbot-api"],"created_at":"2024-10-03T13:40:22.060Z","updated_at":"2025-04-15T11:12:45.034Z","avatar_url":"https://github.com/nasa9084.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"go-switchbot\n===\n[![Go Reference](https://pkg.go.dev/badge/github.com/nasa9084/go-switchbot.svg)](https://pkg.go.dev/github.com/nasa9084/go-switchbot)\n[![test](https://github.com/nasa9084/go-switchbot/actions/workflows/test.yml/badge.svg?event=push)](https://github.com/nasa9084/go-switchbot/actions/workflows/test.yml)\n\nA [SwitchBot API](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/main/README.md) client for Golang\n\n## SYNOPSIS\n\n``` go\nconst (\n\topenToken = \"blahblahblah\"\n\tsecretKey = \"blahblahblah\"\n)\n\nc := switchbot.New(openToken, secretKey)\n\n// get physical devices and show\npdev, _, _ := c.Device().List(context.Background())\n\nfor _, d := range pdev {\n\tfmt.Printf(\"%s\\t%s\\n\", d.Type, d.Name)\n}\n```\n\n## Get Open Token\n\nTo use [SwitchBot API](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/main/README.md), you need to get Open Token for auth. [Follow steps](https://github.com/OpenWonderLabs/SwitchBotAPI/blob/e236be6a613c1d2a9c18965fd502a951608a8765/README.md#getting-started) below:\n\n\u003e 1. Download the SwitchBot app on App Store or Google Play Store\n\u003e 2. Register a SwitchBot account and log in into your account\n\u003e 3. Generate an Open Token within the app a) Go to Profile \u003e Preference b) Tap App Version 10 times. Developer Options will show up c) Tap Developer Options d) Tap Get Token\n\u003e 4. Roll up your sleeves and get your hands dirty with SwitchBot OpenAPI!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa9084%2Fgo-switchbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnasa9084%2Fgo-switchbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnasa9084%2Fgo-switchbot/lists"}