{"id":19900634,"url":"https://github.com/microcmsio/microcms-go-sdk","last_synced_at":"2025-10-13T05:46:20.494Z","repository":{"id":46247209,"uuid":"369480483","full_name":"microcmsio/microcms-go-sdk","owner":"microcmsio","description":"microCMS Go SDK.","archived":false,"fork":false,"pushed_at":"2023-12-09T13:27:13.000Z","size":33,"stargazers_count":23,"open_issues_count":2,"forks_count":2,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-30T09:48:04.746Z","etag":null,"topics":["golang","microcms"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/microcmsio/microcms-go-sdk","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microcmsio.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}},"created_at":"2021-05-21T09:17:12.000Z","updated_at":"2025-07-14T17:01:28.000Z","dependencies_parsed_at":"2023-12-09T14:29:06.368Z","dependency_job_id":"32c0988b-c134-457e-962f-4e1fd41e7f55","html_url":"https://github.com/microcmsio/microcms-go-sdk","commit_stats":null,"previous_names":["wantainc/microcms-go-sdk"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/microcmsio/microcms-go-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcmsio%2Fmicrocms-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcmsio%2Fmicrocms-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcmsio%2Fmicrocms-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcmsio%2Fmicrocms-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microcmsio","download_url":"https://codeload.github.com/microcmsio/microcms-go-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microcmsio%2Fmicrocms-go-sdk/sbom","scorecard":{"id":642867,"data":{"date":"2025-08-11","repo":{"name":"github.com/microcmsio/microcms-go-sdk","commit":"f6cc4f107d7b84766973583911774d0c19a3457d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 2/23 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/microcmsio/microcms-go-sdk/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/microcmsio/microcms-go-sdk/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/microcmsio/microcms-go-sdk/ci.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 13 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T11:17:47.887Z","repository_id":46247209,"created_at":"2025-08-21T11:17:47.887Z","updated_at":"2025-08-21T11:17:47.887Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013708,"owners_count":26085394,"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-13T02:00:06.723Z","response_time":61,"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":["golang","microcms"],"created_at":"2024-11-12T20:12:49.387Z","updated_at":"2025-10-13T05:46:20.478Z","avatar_url":"https://github.com/microcmsio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# microCMS Go SDK\n\n[microCMS](https://document.microcms.io/manual/api-request) Go SDK.\n\n## Tutorial\n\nSee [official tutorial](https://document.microcms.io/tutorial/go/go-top).\n\n## Installation\n\n```sh\n$ go get github.com/microcmsio/microcms-go-sdk\n```\n\n## Usage\n\n### Import\n\n```go\nimport \"github.com/microcmsio/microcms-go-sdk\"\n```\n\n### Create client object\n\n```go\nserviceDomain := \"YOUR_DOMAIN\" // YOUR_DOMAIN is the XXXX part of XXXX.microcms.io\napiKey := \"YOUR_API_KEY\"\nclient := microcms.New(serviceDomain, apiKey)\n```\n\n### Example content definition\n\n```go\ntype YourContent struct {\n\tID          string    `json:\"id,omitempty\"`\n\tTitle       string    `json:\"title,omitempty\"`\n\tBody        string    `json:\"body,omitempty\"`\n\tCreatedAt   time.Time `json:\"createdAt,omitempty\"`\n\tUpdatedAt   time.Time `json:\"updatedAt,omitempty\"`\n\tPublishedAt time.Time `json:\"publishedAt,omitempty\"`\n\tRevisedAt   time.Time `json:\"revisedAt,omitempty\"`\n}\n\ntype YourContentList struct {\n\tContents   []Content\n\tTotalCount int\n\tLimit      int\n\tOffset     int\n}\n```\n\n### Get content list\n\n```go\nvar list YourContentList\nerr := client.List(\n\tmicrocms.ListParams{\n\t\tEndpoint: \"endpoint\",\n\t},\n\t\u0026list,\n)\nprintln(list.Contents[0].Title)\n```\n\n### Get content list with parameters\n\n```go\nvar list YourContentList\nerr := client.List(\n\tmicrocms.ListParams{\n\t\tEndpoint: \"endpoint\",\n\t\tDraftKey: \"abcd\",\n\t\tLimit:    100,\n\t\tOffset:   1,\n\t\tOrders:   []string{\"createdAt\"},\n\t\tQ:        \"Hello\",\n\t\tFields:   []string{\"id\", \"title\"},\n\t\tIDs:      []string{\"foo\"},\n\t\tFilters:  \"publishedAt[greater_than]2021-01-01\",\n\t\tDepth:    1,\n\t},\n\t\u0026list,\n)\nprintln(list.Contents[0].Title)\n```\n\n### Get single content\n\n```go\nvar content YourContent\nerr := client.Get(\n\tmicrocms.GetParams{\n\t\tEndpoint:  \"endpoint\",\n\t\tContentID: \"my-content-id\",\n\t},\n\t\u0026content,\n)\nprintln(content.Title)\n```\n\n### Get single content with parameters\n\n```go\nvar content YourContent\nerr := client.Get(\n\tmicrocms.GetParams{\n\t\tEndpoint:  \"endpoint\",\n\t\tContentID: \"my-content-id\",\n\t\tDraftKey:  \"abcd\",\n\t\tFields:    []string{\"id\", \"title\"},\n\t\tDepth:     1,\n\t},\n\t\u0026content,\n)\nprintln(content.Title)\n```\n\n### Get object form content\n\n```go\nvar content YourContent\nerr := client.Get(\n\tmicrocms.GetParams{\n\t\tEndpoint: \"endpoint\",\n\t},\n\t\u0026content,\n)\nprintln(content.Title)\n```\n\n### Create content\n\n```go\ncreateResult, err := client.Create(microcms.CreateParams{\n\tEndpoint: \"endpoint\",\n\tContent:  YourContent{\n\t\tTitle: \"content\",\n\t\tBody:  \"Hello, content!\",\n\t},\n})\nprintln(createResult.ID)\n```\n\n### Create content with specified ID\n\n```go\ncreateResult, err := client.Create(microcms.CreateParams{\n\tEndpoint:  \"endpoint\",\n\tContentID: \"my-content-id\",\n\tContent:   YourContent{\n\t\tTitle: \"my content\",\n\t\tBody:  \"Hello, my content!\",\n\t},\n})\nprintln(createResult.ID)\n```\n\n### Create draft content\n\n```go\ncreateResult, err := client.Create(microcms.CreateParams{\n\tEndpoint: \"endpoint\",\n\tStatus:   microcms.StatusDraft,\n\tContent:  YourContent{\n\t\tTitle: \"draft content\",\n\t\tBody:  \"Hello, draft content!\",\n\t},\n})\nprintln(createResult.ID)\n```\n\n### Update content\n\n```go\nupdateResult, err := client.Update(microcms.UpdateParams{\n\tEndpoint:  \"endpoint\",\n\tContentID: \"my-content-id\",\n\tContent:   YourContent{\n\t\tBody: \"Hello, new content!\",\n\t},\n})\nprintln(updateResult.ID)\n```\n\n### Update object form content\n\n```go\nupdateResult, err := client.Update(microcms.UpdateParams{\n\tEndpoint:  \"endpoint\",\n\tContentID: \"my-content-id\",\n\tContent:   YourContent{\n\t\tBody: \"Hello, new content!\",\n\t},\n})\nprintln(updateResult.ID)\n```\n\n### Delete content\n\n```go\nerr := client.Delete(microcms.DeleteParams{\n\tEndpoint:  \"endpoint\",\n\tContentID: \"my-content-id\",\n})\n```\n\n### Error Handling\n\n```go\ndata, err := client.Get(ctx, \"endpoint\", nil)\nif err != nil {\n    if httpErr, ok := err.(*sdk.HttpResponseError); ok {\n        fmt.Printf(\"HTTP Status Code: %d\\n\", httpErr.Response.StatusCode)\n        fmt.Printf(\"Error Message: %s\\n\", httpErr.ErrorMessage)\n    }\n    return\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocmsio%2Fmicrocms-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrocmsio%2Fmicrocms-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrocmsio%2Fmicrocms-go-sdk/lists"}