{"id":20279217,"url":"https://github.com/peterhellberg/sr","last_synced_at":"2025-03-04T01:49:52.714Z","repository":{"id":20747287,"uuid":"24031733","full_name":"peterhellberg/sr","owner":"peterhellberg","description":"Go library for Sveriges Radio API","archived":false,"fork":false,"pushed_at":"2014-11-09T12:25:42.000Z","size":396,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T07:11:27.814Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://sverigesradio.se/api/documentation/v2/index.html","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/peterhellberg.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}},"created_at":"2014-09-14T19:52:46.000Z","updated_at":"2014-12-09T08:04:26.000Z","dependencies_parsed_at":"2022-09-15T01:44:26.661Z","dependency_job_id":null,"html_url":"https://github.com/peterhellberg/sr","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/peterhellberg%2Fsr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fsr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fsr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterhellberg%2Fsr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterhellberg","download_url":"https://codeload.github.com/peterhellberg/sr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241768278,"owners_count":20017129,"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":[],"created_at":"2024-11-14T13:28:59.020Z","updated_at":"2025-03-04T01:49:52.668Z","avatar_url":"https://github.com/peterhellberg.png","language":"Go","readme":"sr (api v2)\n==========\n\nGo library for [Sveriges Radio API](http://sverigesradio.se/api/documentation/v2/index.html)\n\n[![GoDoc](https://godoc.org/github.com/peterhellberg/sr?status.svg)](https://godoc.org/github.com/peterhellberg/sr)\n[![Build Status](https://travis-ci.org/peterhellberg/sr.svg?branch=master)](https://travis-ci.org/peterhellberg/sr)\n\n## Installation\n\n```bash\ngo get -u github.com/peterhellberg/sr\n```\n\n## Example usage\n\nGetting the toplist for the current day.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/peterhellberg/sr\"\n)\n\nfunc main() {\n\tsr := sr.NewClient(nil)\n\n\tshows, err := sr.Toplist.GetDay()\n\n\tif err == nil {\n\t\tfor i, show := range shows {\n\t\t\tfmt.Println(i+1, show.Title)\n\t\t}\n\t}\n}\n```\n\n## Services\n\n### Channels\n\nReturn a list of SR all channels\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/peterhellberg/sr\"\n)\n\nfunc main() {\n\tsr := sr.NewClient(nil)\n\n\tif channels, err := sr.Channels.All(); err == nil {\n\t\tfor _, c := range channels {\n\t\t\tfmt.Println(c.Name, \"\\n\", c.SiteURL, \"\\n\")\n\t\t}\n\t}\n}\n```\n\n### Episodes\n\nGet broadcast file for the latest episode of \"Tankesmedjan\"\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/peterhellberg/sr\"\n)\n\nfunc main() {\n\tsr := sr.NewClient(nil)\n\tid := 3718\n\n\tif e, err := sr.Episodes.GetLatest(id); err == nil {\n\t\tfmt.Println(e.Broadcast.Broadcastfiles[0].URL)\n\t}\n}\n```\n\n### News\n### Playlists\n### Program Categories\n### Programs\n### Scheduled Episodes\n### Sport\n### Toplist\n\n## Utils\n\nDeveloped using [JSON-to-Go by](http://mholt.github.io/json-to-go/) by Matthew Holt.\n\n## License\n\n\u003e *The MIT License (MIT)*\n\u003e\n\u003e Copyright (c) 2014 [Peter Hellberg](http://c7.se/)\n\u003e\n\u003e Permission is hereby granted, free of charge, to any person obtaining a copy\n\u003e of this software and associated documentation files (the \"Software\"), to deal\n\u003e in the Software without restriction, including without limitation the rights\n\u003e to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n\u003e copies of the Software, and to permit persons to whom the Software is\n\u003e furnished to do so, subject to the following conditions:\n\u003e\n\u003e The above copyright notice and this permission notice shall be included in all\n\u003e copies or substantial portions of the Software.\n\u003e\n\u003e THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n\u003e IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n\u003e FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n\u003e AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n\u003e LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n\u003e OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n\u003e SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Fsr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterhellberg%2Fsr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterhellberg%2Fsr/lists"}