{"id":32527656,"url":"https://github.com/rico-vz/hexcore","last_synced_at":"2025-10-28T10:48:53.393Z","repository":{"id":303042705,"uuid":"1010364508","full_name":"rico-vz/hexcore","owner":"rico-vz","description":"Go library to interact with the League of Legends LCU API","archived":false,"fork":false,"pushed_at":"2025-07-05T10:04:55.000Z","size":655,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-05T10:39:52.562Z","etag":null,"topics":["go","golang","lcu","lcu-api","lcu-driver","league-of-legends","leagueoflegends","riot-games","riotgames"],"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/rico-vz.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,"zenodo":null}},"created_at":"2025-06-28T23:04:56.000Z","updated_at":"2025-07-05T10:04:58.000Z","dependencies_parsed_at":"2025-07-05T10:40:12.631Z","dependency_job_id":"3e705d34-ca04-4ea4-abd8-7cf348151eb6","html_url":"https://github.com/rico-vz/hexcore","commit_stats":null,"previous_names":["rico-vz/hexcore"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/rico-vz/hexcore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rico-vz%2Fhexcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rico-vz%2Fhexcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rico-vz%2Fhexcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rico-vz%2Fhexcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rico-vz","download_url":"https://codeload.github.com/rico-vz/hexcore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rico-vz%2Fhexcore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281425541,"owners_count":26499031,"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-28T02:00:06.022Z","response_time":60,"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","golang","lcu","lcu-api","lcu-driver","league-of-legends","leagueoflegends","riot-games","riotgames"],"created_at":"2025-10-28T10:48:49.381Z","updated_at":"2025-10-28T10:48:53.379Z","avatar_url":"https://github.com/rico-vz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hexcore\n\n![Go Version](https://img.shields.io/badge/go-1.24-blue.svg)\n![GitHub License](https://img.shields.io/github/license/rico-vz/hexcore?color=blue)\n\nHexcore is an easy-to-use library for interacting with the League of Legends Client Update (LCU) API in Go.\n\n---\n\n## Features\n\n-   Automatic finding of LCU port and authorization token.\n-   Typed structs for the LCU API endpoints.\n-   WebSocket support for LCU events with type-safe event topics.\n\n---\n\n## Installation\n\nTo install the Hexcore package, use the `go get` command:\n\n```bash\ngo get github.com/rico-vz/hexcore/lcu\n```\n\n---\n\n## Usage\n\nBasic example of how to init a new client, get the current player's information and subscribe to an event:\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\t\"github.com/rico-vz/hexcore/lcu\"\n)\n\nfunc main() {\n\tlog.Println(\"Connecting to LCU API...\")\n\n\tclient, err := lcu.NewHexcoreClient()\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to create client: %v\", err)\n\t}\n\tdefer client.Close()\n\n\tlog.Printf(\"Connected to LCU on port %s\\n\", client.Params.Port)\n\n\t// Getting the current player their information\n\tsummonerResponse, err := client.GetLolSummonerV1CurrentSummonerWithResponse(context.Background())\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to get current summoner: %v\", err)\n\t}\n\n\tif summonerResponse.StatusCode() == http.StatusOK {\n\t\tvar summonerData lcu.LolSummonerSummoner\n\t\terr := json.Unmarshal(summonerResponse.Body, \u0026summonerData)\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Failed to parse response body: %v\", err)\n\t\t}\n\n\t\tfmt.Printf(\"Current Player: %s\\n\", summonerData.GameName)\n\t\tfmt.Printf(\"Summoner Level: %d\\n\", summonerData.SummonerLevel)\n\t} else {\n\t\tfmt.Println(\"Could not retrieve summoner data.\")\n\t\tfmt.Printf(\"Response status: %s\\n\", summonerResponse.Status())\n\t\tfmt.Printf(\"Response body: %s\\n\", string(summonerResponse.Body))\n\t}\n\n\t// Subscribing to an event (End of Game event in this example)\n\tlog.Println(\"Subscribing to End of Game events...\")\n\terr = client.Subscribe(lcu.Events.EndOfGameV1EogStatsBlock(), OnEndOfGameEvent)\n\tif err != nil {\n\t\tlog.Fatalf(\"Failed to subscribe to End of Game event: %v\", err)\n\t}\n\n\tlog.Println(\"Subscribed to the End of Game event\")\n\tlog.Println(\"Listening for events...\")\n\n\tsigChan := make(chan os.Signal, 1)\n\tsignal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)\n\t\u003c-sigChan\n}\n\n// This gets called when the event we subscribed to gets triggered\nfunc OnEndOfGameEvent(payload interface{}) {\n\tlog.Println(\"[OnEndOfGameEvent] Received the event!\")\n}\n```\n\nOutput example:\n\n```text\n2025/07/05 10:33:44 Connecting to LCU API...\n2025/07/05 10:33:44 Connected to LCU on port 3588\nCurrent Player: Z\nSummoner Level: 205\n2025/07/05 10:33:44 Subscribing to End of Game events...\n2025/07/05 10:33:44 Subscribed to the End of Game event\n2025/07/05 10:33:44 Listening for events...\n2025/07/05 10:35:11 [OnEndOfGameEvent] Received the event!\n```\n\n\n\n---\n\n## Contributing\n\nContributions are welcome. Please feel free to submit a pull request or open an issue for any bugs or feature requests.\n\nHexcore follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for all commit messages.\nAllowed types: `fix`, `feat`, `build`, `chore`, `ci`, `docs`, `style`, `refactor`, `perf` \u0026 `test`\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feat/new-thing`)\n3. Commit your changes (`git commit -m 'feat: brand new thing'`)\n4. Push to your branch (`git push origin feat/new-thing`)\n5. Open a Pull Request\n\n---\n\n## Acknowledgments\n\n- [dysolix/hasagi-types](https://github.com/dysolix/hasagi-types/) - Used to get the latest `swagger.json` file for the LCU API.\n- [oapi-codegen](https://github.com/oapi-codegen/oapi-codegen) - Used to generate the API client code from the OpenAPI specification.\n- [Riot Third Party Developer Discord](https://discord.com/invite/riotgamesdevrel) - Nice community. Useful for information about the LCU API and libraries.\n- [HextechDocs](https://hextechdocs.dev/) - Community maintained developer documentation for games made by Riot Games.\n\n---\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n\n***Disclaimer:***  \n*Hexcore isn't endorsed by Riot Games and doesn't reflect the views or opinions of Riot Games or anyone officially involved in producing or managing League of Legends.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frico-vz%2Fhexcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frico-vz%2Fhexcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frico-vz%2Fhexcore/lists"}