{"id":13367217,"url":"https://github.com/michiwend/Gomusicbrainz","last_synced_at":"2025-03-12T18:32:09.115Z","repository":{"id":20601690,"uuid":"23882632","full_name":"michiwend/gomusicbrainz","owner":"michiwend","description":"a Go (Golang) MusicBrainz WS2 client library - work in progress","archived":false,"fork":false,"pushed_at":"2023-05-15T09:58:33.000Z","size":188,"stargazers_count":59,"open_issues_count":7,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-09T23:41:27.102Z","etag":null,"topics":["client","client-library","go","golang","musicbrainz","musicbrainz-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/michiwend.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":"2014-09-10T16:42:33.000Z","updated_at":"2024-12-12T08:33:57.000Z","dependencies_parsed_at":"2024-06-18T16:53:48.255Z","dependency_job_id":"bd40d642-d9f3-44c5-93b3-f156af33a564","html_url":"https://github.com/michiwend/gomusicbrainz","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/michiwend%2Fgomusicbrainz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michiwend%2Fgomusicbrainz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michiwend%2Fgomusicbrainz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/michiwend%2Fgomusicbrainz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/michiwend","download_url":"https://codeload.github.com/michiwend/gomusicbrainz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243271527,"owners_count":20264472,"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":["client","client-library","go","golang","musicbrainz","musicbrainz-api"],"created_at":"2024-07-30T00:01:41.733Z","updated_at":"2025-03-12T18:32:08.797Z","avatar_url":"https://github.com/michiwend.png","language":"Go","funding_links":[],"categories":["第三方 APIs"],"sub_categories":["高级控制台界面","高級控制台界面"],"readme":"# gomusicbrainz [![License MIT](http://img.shields.io/badge/License-MIT-lightgrey.svg?style=flat-square)](http://opensource.org/licenses/MIT) [![GoDoc](http://img.shields.io/badge/api-Godoc-blue.svg?style=flat-square)](https://godoc.org/github.com/michiwend/gomusicbrainz) [![GoWalker](http://img.shields.io/badge/api-GoWalker-green.svg?style=flat-square)](https://gowalker.org/github.com/michiwend/gomusicbrainz) [![Build Status](http://img.shields.io/travis/michiwend/gomusicbrainz.svg?style=flat-square)](https://travis-ci.org/michiwend/gomusicbrainz) \n\na Go (Golang) MusicBrainz WS2 client library - a work in progress.\n\n![gopherbrainz Oo](https://raw.githubusercontent.com/michiwend/gomusicbrainz/master/misc/gopherbrainz.png)\n\n## Current state\nCurrently GoMusicBrainz provides methods to perform search and lookup requests. Browse requests are not supported yet.\n\n## Installation\n```bash\n$ go get github.com/michiwend/gomusicbrainz\n```\n\n## Search Requests\nGoMusicBrainz provides a search method for every WS2 search request in the form:\n```Go\nfunc (*WS2Client) Search\u003cENTITY\u003e(searchTerm, limit, offset) (\u003cENTITY\u003eSearchResponse, error)\n```\nsearchTerm follows the Apache Lucene syntax and can either contain multiple\nfields with logical operators or just a simple search string. Please refer to\n[lucene.apache.org](https://lucene.apache.org/core/4_3_0/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description)\nfor more details on the lucene syntax. In addition the\n[MusicBrainz website] (https://musicbrainz.org/doc/Development/XML_Web_Service/Version_2/Search)\nprovides information about all possible query-fields.\n\n### Example\nThis example demonstrates a simple search requests to find the artist\n*Parov Stelar*. You can find it as a runnable go program in the samples folder.\n```Go\n// create a new WS2Client.\nclient := gomusicbrainz.NewWS2Client(\n    \"https://musicbrainz.org/ws/2\",\n    \"A GoMusicBrainz example\",\n    \"0.0.1-beta\",\n    \"http://github.com/michiwend/gomusicbrainz\")\n\n// Search for some artist(s)\nresp, _ := client.SearchArtist(`artist:\"Parov Stelar\"`, -1, -1)\n\n// Pretty print Name and score of each returned artist.\nfor _, artist := range resp.Artists {\n    fmt.Printf(\"Name: %-25sScore: %d\\n\", artist.Name, resp.Scores[artist])\n}\n```\nthe above code will produce the following output:\n```\nName: Parov Stelar             Score: 100\nName: Parov Stelar Trio        Score: 80\nName: Parov Stelar \u0026 the Band  Score: 70\n```\n\n## Lookup Requests\nGoMusicBrainz provides two ways to perform lookup requests: Either the specific\nlookup method that is implemented for each entity that has a lookup endpoint in\nthe form\n```Go\nfunc(*WS2Client) Lookup\u003cETITY\u003e(id MBID, inc ...string) (*\u003cENTITY\u003e, error)\n```\nor the common lookup method if you already have an entity (with MBID) that\nimplements the MBLookupEntity interface:\n```Go\nfunc(*WS2Client) Lookup(entity MBLookupEntity, inc ...string) error\n```\n\n### Example\nThe following example demonstrates the (specific) LookupArtist method. You can\nfind it as a runnable go program in the samples folder.\n\n```Go\n// create a new WS2Client.\nclient, _ := gomusicbrainz.NewWS2Client(\n    \"https://musicbrainz.org/ws/2\",\n    \"A GoMusicBrainz example\",\n    \"0.0.1-beta\",\n    \"http://github.com/michiwend/gomusicbrainz\")\n\n// Lookup artist by id.\nartist, err := client.LookupArtist(\"9a709693-b4f8-4da9-8cc1-038c911a61be\")\n\nif err != nil {\n    fmt.Println(err)\n    return\n}\n\nfmt.Printf(\"%+v\", artist)\n```\n\n## Package Documentation\nFull documentation for this package can be found at\n[GoDoc](https://godoc.org/github.com/michiwend/gomusicbrainz)\nand  [GoWalker](https://gowalker.org/github.com/michiwend/gomusicbrainz)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichiwend%2FGomusicbrainz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmichiwend%2FGomusicbrainz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmichiwend%2FGomusicbrainz/lists"}