{"id":15318361,"url":"https://github.com/appleboy/go-kkbox","last_synced_at":"2025-04-14T23:30:51.138Z","repository":{"id":57531146,"uuid":"115084950","full_name":"appleboy/go-kkbox","owner":"appleboy","description":"KKBOX Open API SDK for Golang.","archived":false,"fork":false,"pushed_at":"2019-02-14T15:41:50.000Z","size":72,"stargazers_count":18,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T08:33:05.410Z","etag":null,"topics":["api-client","golang","kkbox","sdk-go"],"latest_commit_sha":null,"homepage":"https://developer.kkbox.com","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/appleboy.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":"2017-12-22T06:34:42.000Z","updated_at":"2024-04-26T09:47:22.000Z","dependencies_parsed_at":"2022-09-17T00:40:41.013Z","dependency_job_id":null,"html_url":"https://github.com/appleboy/go-kkbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgo-kkbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgo-kkbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgo-kkbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appleboy%2Fgo-kkbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appleboy","download_url":"https://codeload.github.com/appleboy/go-kkbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248926624,"owners_count":21184478,"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":["api-client","golang","kkbox","sdk-go"],"created_at":"2024-10-01T08:59:50.930Z","updated_at":"2025-04-14T23:30:51.121Z","avatar_url":"https://github.com/appleboy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-kkbox\n\n[![GoDoc](https://godoc.org/github.com/appleboy/go-kkbox?status.svg)](https://godoc.org/github.com/appleboy/go-kkbox)\n[![Build Status](https://cloud.drone.io/api/badges/appleboy/go-kkbox/status.svg)](https://cloud.drone.io/appleboy/go-kkbox)\n[![codecov](https://codecov.io/gh/appleboy/go-kkbox/branch/master/graph/badge.svg)](https://codecov.io/gh/appleboy/go-kkbox)\n[![Go Report Card](https://goreportcard.com/badge/github.com/appleboy/go-kkbox)](https://goreportcard.com/report/github.com/appleboy/go-kkbox)\n\n[KKBOX Open API](https://docs-en.kkbox.codes/) SDK for Golang.\n\n## Features\n\n* [x] Tracks\n  - [x] /tracks/{track_id}\n* [x] Albums\n  - [x] /albums/{album_id}\n  - [x] /albums/{album_id}/tracks\n* [x] Artists\n  - [x] /artists/{artist_id}\n  - [x] /artists/{artist_id}/albums\n  - [x] /artists/{artist_id}/top-tracks\n  - [x] /artists/{artist_id}/related-artists\n* [x] Shared Playlists\n  - [x] /shared-playlists/{playlist_id}\n  - [x] /shared-playlists/{playlist_id}/tracks\n* [x] Featured Playlists\n  - [x] /featured-playlists\n  - [x] /featured-playlists/{playlist_id}\n  - [x] /featured-playlists/{playlist_id}/tracks\n* [x] Featured Playlist Categories\n  - [x] /featured-playlist-categories\n  - [x] /featured-playlist-categories/{category_id}\n  - [x] /featured-playlist-categories/{category_id}/playlists\n* [x] Mood Stations\n  - [x] /mood-stations\n  - [x] /mood-stations/{station_id}\n* [x] Genre Stations\n  - [x] /genre-stations\n  - [x] /genre-stations/{station_id}\n* [x] New Release Categories\n  - [x] /new-release-categories\n  - [x] /new-release-categories/{category_id}\n  - [x] /new-release-categories/{category_id}/albums\n* [x] Search\n  - [x] /search\n* [x] New Hits Playlists\n  - [x] /new-hits-playlists\n  - [x] /new-hits-playlists/{playlist_id}\n  - [x] /new-hits-playlists/{playlist_id}/tracks\n* [x] Charts\n  - [x] /charts\n  - [x] /charts/{playlist_id}\n  - [x] /charts/{playlist_id}/tracks\n\n## Install\n\nInstall SDK library\n\n```\n$ go get -u github.com/appleboy/go-kkbox\n```\n\nInital the KKBox client:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/appleboy/go-kkbox\"\n)\n\nvar clientID = os.Getenv(\"CLIENT_ID\")\nvar clientSecret = os.Getenv(\"CLIENT_SECRET\")\n\nfunc main() {\n\tif clientID == \"\" || clientSecret == \"\" {\n\t\tlog.Fatal(\"missing client id or secret\")\n\t}\n\tk, err := kkbox.New(clientID, clientSecret)\n\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(\"====== kkbox client ======\")\n\tspew.Dump(k)\n\tfmt.Println(\"====== kkbox end ======\")\n\n\t// fetch charts\n\tcharts, err := k.FetchCharts()\n\tif err != nil {\n\t\tfmt.Printf(\"%#v\\n\", err)\n\t}\n\n\tfmt.Printf(\"%#v\\n\", charts)\n\n\tranks, err := k.FetchChartPlayList(\"4nUZM-TY2aVxZ2xaA-\")\n\tif err != nil {\n\t\tfmt.Printf(\"%#v\\n\", err)\n\t}\n\n\tspew.Dump(ranks)\n\n\ttracks, err := k.FetchChartPlayListTrack(\"4nUZM-TY2aVxZ2xaA-\", kkbox.Param{\n\t\tPerPage:   1,\n\t\tPage:      2,\n\t\tTerritory: \"HK\",\n\t})\n\tif err != nil {\n\t\tfmt.Printf(\"%#v\\n\", err)\n\t}\n\n\tspew.Dump(tracks)\n\tlog.Println(\"length: \", len(tracks.Data))\n}\n```\n\nRun program:\n\n```sh\n$ CLIENT_ID=xxx CLIENT_SECRET=xxx go run main.go\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Fgo-kkbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappleboy%2Fgo-kkbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappleboy%2Fgo-kkbox/lists"}