{"id":15198344,"url":"https://github.com/t-fowl/cosmobuzz-client-kotlin","last_synced_at":"2026-03-01T04:38:12.828Z","repository":{"id":42186690,"uuid":"403921630","full_name":"T-Fowl/cosmobuzz-client-kotlin","owner":"T-Fowl","description":"A [unofficial] simple kotlin client for creating and managing a room on cosmobuzz.net","archived":false,"fork":false,"pushed_at":"2023-03-09T14:35:08.000Z","size":108,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-03T03:44:00.792Z","etag":null,"topics":["coroutines","cosmobuzz","kotlin","sharedflow","socket-io","stateflow","trivia","trivia-game"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/T-Fowl.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-07T09:37:24.000Z","updated_at":"2022-09-28T11:10:52.000Z","dependencies_parsed_at":"2024-09-18T23:05:22.308Z","dependency_job_id":null,"html_url":"https://github.com/T-Fowl/cosmobuzz-client-kotlin","commit_stats":{"total_commits":22,"total_committers":2,"mean_commits":11.0,"dds":"0.40909090909090906","last_synced_commit":"5134a9a101788eb0a94624dfc02e83600abcfdc6"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fcosmobuzz-client-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fcosmobuzz-client-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fcosmobuzz-client-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Fowl%2Fcosmobuzz-client-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-Fowl","download_url":"https://codeload.github.com/T-Fowl/cosmobuzz-client-kotlin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241605738,"owners_count":19989608,"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":["coroutines","cosmobuzz","kotlin","sharedflow","socket-io","stateflow","trivia","trivia-game"],"created_at":"2024-09-28T01:03:15.378Z","updated_at":"2026-03-01T04:38:12.783Z","avatar_url":"https://github.com/T-Fowl.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cosmobuzz-client-kotlin (Unofficial)\n\n![Build](https://github.com/T-Fowl/cosmobuzz-client-kotlin/workflows/Build/badge.svg)\n![Maven Central](https://img.shields.io/maven-central/v/com.tfowl.cosmobuzz/cosmobuzz-client-kotlin)\n![GitHub](https://img.shields.io/github/license/T-Fowl/cosmobuzz-client-kotlin)\n\nSimple kotlin client wrapper for creating and managing rooms on [cosmobuzz.net](https://www.cosmobuzz.net/). Created as\na sub-project of a trivia controller for trivia nights with my friends.\n\n## Usage\n\nCreating a room:\n\n```kotlin\nwhen (val result = CosmoBuzz.createRoom()) {\n    is CreateRoomResult.Success -\u003e run(result.room)\n    is CreateRoomResult.Failure -\u003e error(result.reason)\n}\n``` \n\n`CosmoBuzzRoom` is essentially a view-model for a room's state\n\nAccessing state:\n\n```kotlin\nroom.players.collect { players -\u003e playersChanged(players) }\nroom.settings.collect { settings -\u003e settingsChanged(settings) }\nroom.buzzer.collect { player -\u003e playerBuzzed(player) }\n```\n\nUpdating room:\n\n```kotlin\nroom.resetBuzzers()\nroom.updateSettings(newRoomSettings)\n```\n\n## Example project\n\nThe examples project contains a (basic) cli interpreter around a `CosmoBuzzRoom`, here is an example run:\n\n```shell\nCosmoBuzzRoom(code=427126, url=https://www.cosmobuzz.net/#/play/\u003croom-code\u003e)\n\n\u003elist-players\nPlayers (2):\n\tPlayerA\n\tPlayerB\n\t\nBUZZ: PlayerA\nBUZZ: PlayerB\n\n\u003ereset-buzzers\n\u003etoggle-first-buz\n\nBUZZ: PlayerA\n```\n\n## Download\n\nAdd a gradle dependency to your project:\n\nGroovy\n\n```groovy\nrepositories {\n    mavenCentral()\n}\nimplementation \"com.tfowl.cosmobuzz:cosmobuzz-client-kotlin:$version\"\n```\n\nKotlin DSL\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\nimplementation(\"com.tfowl.cosmobuzz:cosmobuzz-client-kotlin:$version\")\n```\n\nAdd a maven dependency to your project:\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.tfowl.cosmobuzz\u003c/groupId\u003e\n    \u003cartifactId\u003ecosmobuzz-client-kotlin\u003c/artifactId\u003e\n    \u003cversion\u003e${version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2021 Thomas Fowler\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-fowl%2Fcosmobuzz-client-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-fowl%2Fcosmobuzz-client-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-fowl%2Fcosmobuzz-client-kotlin/lists"}