{"id":24764497,"url":"https://github.com/seamapi/go","last_synced_at":"2025-10-11T14:30:43.585Z","repository":{"id":182366709,"uuid":"666067449","full_name":"seamapi/go","owner":"seamapi","description":"Go library for accessing the Seam API","archived":false,"fork":false,"pushed_at":"2024-12-10T19:45:00.000Z","size":898,"stargazers_count":2,"open_issues_count":9,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-01T15:56:16.223Z","etag":null,"topics":["go-client","go-sdk","golang"],"latest_commit_sha":null,"homepage":"https://docs.seam.co","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seamapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-07-13T16:23:56.000Z","updated_at":"2024-04-19T21:05:22.000Z","dependencies_parsed_at":"2023-11-16T04:30:48.071Z","dependency_job_id":"f77ccc61-d01e-4ac1-bbaf-26f6598e6ace","html_url":"https://github.com/seamapi/go","commit_stats":null,"previous_names":["seamapi/go"],"tags_count":42,"template":false,"template_full_name":null,"purl":"pkg:github/seamapi/go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seamapi","download_url":"https://codeload.github.com/seamapi/go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seamapi%2Fgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279007457,"owners_count":26084313,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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-client","go-sdk","golang"],"created_at":"2025-01-28T22:31:53.382Z","updated_at":"2025-10-11T14:30:43.214Z","avatar_url":"https://github.com/seamapi.png","language":"Go","readme":"# Seam Go Library\n\n[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-SDK%20generated%20by%20Fern-brightgreen)](https://github.com/fern-api/fern)\n[![go shield](https://img.shields.io/badge/go-docs-blue)](https://pkg.go.dev/github.com/seamapi/go)\n\nThe Seam Go library provides convenient access to the Seam API from Go.\n\n# Requirements\n\nThis module requires Go version \u003e= 1.13.\n\n# Installation\n\nRun the following command to use the Seam Go library in your module:\n```sh\ngo get github.com/seamapi/go\n```\n\n# Usage\n\n```go\nimport goclient \"github.com/seamapi/go/client\"\n\nclient := goclient.NewClient(goclient.WithApiKey(\"\u003cYOUR_AUTH_TOKEN\u003e\"))\n```\n\n## Access Codes\n\n```go\nimport goclient \"github.com/seamapi/go/client\"\n\nclient := goclient.NewClient(goclient.WithApiKey(\"\u003cYOUR_AUTH_TOKEN\u003e\"))\naccessCode, err := client.AccessCodes.Create(\n  context.TODO(),\n  \u0026seamgo.AccessCodesCreateRequest{\n    DeviceId: someDevice.DeviceId,\n    Name:     seamgo.String(\"Test code\"),\n    Code:     seamgo.String(\"4444\"),\n  },\n)\n```\n\n## Timeouts\n\nSetting a timeout for each individual request is as simple as using the standard\n`context` library. Setting a one second timeout for an individual API call looks\nlike the following:\n\n```go\nimport seamgo \"github.com/seamapi/go\"\n\nctx, cancel := context.WithTimeout(context.TODO(), time.Second)\ndefer cancel()\n\ndevices, err = client.Devices.List(\n  ctx,\n  \u0026seamgo.DevicesListRequest{\n    DeviceType: seamgo.DeviceTypeAugustLock.Ptr(),\n  },\n)\n```\n\n## Client Options\n\nA variety of client options are included to adapt the behavior of the library, which includes\nconfiguring authorization tokens to be sent on every request, or providing your own instrumented\n`*http.Client`. Both of these options are shown below:\n\n```go\nclient := goclient.NewClient(\n  goclient.WithApiKey(\"\u003cYOUR_AUTH_TOKEN\u003e\"),\n  goclient.WithHTTPClient(\n    \u0026http.Client{\n      Timeout: 5 * time.Second,\n    },\n  ),\n)\n```\n\n\u003e Providing your own `*http.Client` is recommended. Otherwise, the `http.DefaultClient` will be used,\n\u003e and your client will wait indefinitely for a response (unless the per-request, context-based timeout\n\u003e is used).\n\n## Errors\n\nStructured error types are returned from API calls that return non-success status codes. For example,\nyou can check if the error was due to a bad request (i.e. status code 400) with the following:\n\n```go\naccessCode, err := client.AccessCodes.Create(\n  context.TODO(),\n  \u0026seamgo.AccessCodesCreateRequest{\n    Name: seamgo.String(\"Bad Request\"),\n  },\n)\nif err != nil {\n  if badRequestErr, ok := err.(*seamgo.BadRequestError);\n    // Do something with the bad request ...\n  }\n  return err\n}\n```\n\nThese errors are also compatible with the `errors.Is` and `errors.As` APIs, so you can access the error\nlike so:\n\n```go\naccessCode, err := client.AccessCodes.Create(\n  context.TODO(),\n  \u0026seamgo.AccessCodesCreateRequest{\n    Name: seamgo.String(\"Bad Request\"),\n  },\n)\nif err != nil {\n  var badRequestErr *seamgo.BadRequestError\n  if errors.As(err, badRequestErr) {\n    // Do something with the bad request ...\n  }\n  return err\n}\n```\n\nIf you'd like to wrap the errors with additional information and still retain the ability to access the type\nwith `errors.Is` and `errors.As`, you can use the `%w` directive:\n\n```go\naccessCode, err := client.AccessCodes.Create(\n  context.TODO(),\n  \u0026seamgo.AccessCodesCreateRequest{\n    Name: seamgo.String(\"Bad Request\"),\n  },\n)\nif err != nil {\n  return fmt.Errorf(\"failed to create access code: %w\", err)\n}\n```\n\n# Beta Status\n\nThis SDK is in beta, and there may be breaking changes between versions without a major \nversion update. Therefore, we recommend pinning the package version to a specific version. \nThis way, you can install the same version each time without breaking changes.\n\n# Contributing\n\nWhile we value open-source contributions to this SDK, this library is generated programmatically. \nAdditions made directly to this library would have to be moved over to our generation code, \notherwise they would be overwritten upon the next generated release. Feel free to open a PR as\n a proof of concept, but know that we will not be able to merge it as-is. We suggest opening \nan issue first to discuss with us!\n\nOn the other hand, contributions to the README are always very welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseamapi%2Fgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseamapi%2Fgo/lists"}