{"id":15069180,"url":"https://github.com/uakihir0/kmisskey","last_synced_at":"2025-07-14T21:33:17.110Z","repository":{"id":223110704,"uuid":"756689268","full_name":"uakihir0/kmisskey","owner":"uakihir0","description":"Kotlin multiplatform Misskey library.","archived":false,"fork":false,"pushed_at":"2024-12-30T05:27:12.000Z","size":534,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-28T18:09:02.275Z","etag":null,"topics":["ios","js","jvm","kotlin","kotlin-library","kotlin-multiplatform","macos"],"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/uakihir0.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":"2024-02-13T05:33:11.000Z","updated_at":"2025-01-23T02:40:15.000Z","dependencies_parsed_at":"2024-03-01T17:46:25.864Z","dependency_job_id":"3e87d61f-f985-473e-b399-8cce87927764","html_url":"https://github.com/uakihir0/kmisskey","commit_stats":null,"previous_names":["uakihir0/kmisskey"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/uakihir0/kmisskey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uakihir0%2Fkmisskey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uakihir0%2Fkmisskey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uakihir0%2Fkmisskey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uakihir0%2Fkmisskey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uakihir0","download_url":"https://codeload.github.com/uakihir0/kmisskey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uakihir0%2Fkmisskey/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265352018,"owners_count":23751839,"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":["ios","js","jvm","kotlin","kotlin-library","kotlin-multiplatform","macos"],"created_at":"2024-09-25T01:40:53.769Z","updated_at":"2025-07-14T21:33:17.069Z","avatar_url":"https://github.com/uakihir0.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e [日本語](./docs/README_ja.md)\n\n# kmisskey\n\n![Maven metadata URL](https://img.shields.io/maven-metadata/v?metadataUrl=https%3A%2F%2Frepo.repsy.io%2Fmvn%2Fuakihir0%2Fpublic%2Fwork%2Fsocialhub%2Fkmisskey%2Fcore%2Fmaven-metadata.xml)\n\n![badge][badge-js]\n![badge][badge-jvm]\n![badge][badge-ios]\n![badge][badge-mac]\n\n**This library is a Misskey client library that supports [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html).**\nIt depends on [khttpclient] and internally uses Ktor Client.\nTherefore, this library is available on Kotlin Multiplatform and platforms supported by Ktor Client.\nThe behavior on each platform depends on [khttpclient].\n\n## Usage\n\nBelow is how to use it in Kotlin with Gradle on supported platforms.\n**If you want to use it on Apple platforms, please refer to [kmisskey-cocoapods](https://github.com/uakihir0/kmisskey-cocoapods).**\n**Also, for usage in JavaScript, please refer to [kmsskey.js](https://github.com/uakihir0/kmisskey.js).**\nPlease refer to the test code for how to use each API.\n\n```kotlin:build.gradle.kts\nrepositories {\n    mavenCentral()\n+   maven { url = uri(\"https://repo.repsy.io/mvn/uakihir0/public\") }\n}\n\ndependencies {\n+   implementation(\"work.socialhub.kmisskey:core:0.0.1-SNAPSHOT\")\n+   implementation(\"work.socialhub.kmisskey:stream:0.0.1-SNAPSHOT\")\n}\n```\n\n### Authentication\n\nUsing MiAuth, request the URL for users to authenticate as follows.\n\n```kotlin\nval misskey = MisskeyFactory.instance(\"HOST\")\n\nval response = misskey.auth().getMiAuthUri(\n    GetMiAuthUriRequest().also { r -\u003e\n        r.name = \"APP_NAME\"\n        r.callbackUrl = \"APP_CALLBACK_URL\"\n        r.permission = Scope.ALL.map { it.target }\n    }\n)\n\nprintln(\"URL:\" + response.data)\n```\n\nAfter the user authenticates and is redirected, obtain the token from the redirected URL and get the access token as follows.\n\n```kotlin\nval response =\n    misskey.auth().sessionUserKey(\n        UserKeyAuthSessionRequest().also {\n            it.token = \"VERIFY_TOKEN\"\n            it.appSecret = \"CLIENT_SECRET\"\n        }\n    )\n\nprintln(\"USER TOKEN: \" + response.data.accessToken)\n```\n\n### Create Note\n\n```kotlin\nval misskey = MisskeyFactory.instance(\n    \"HOST\", \n    \"CLIENT_SECRET\", \n    \"ACCESS_TOKEN\",\n)\n\nmisskey.notes().create(\n    NotesCreateRequest().also {\n        it.text = \"Hello World!\"\n        it.visibility = \"home\"\n    })\n```\n\n## License\n\nMIT License\n\n## Author\n\n[Akihiro Urushihara](https://github.com/uakihir0)\n\n[khttpclient]: https://github.com/uakihir0/khttpclient\n[badge-android]: http://img.shields.io/badge/-android-6EDB8D.svg\n[badge-android-native]: http://img.shields.io/badge/support-[AndroidNative]-6EDB8D.svg\n[badge-wearos]: http://img.shields.io/badge/-wearos-8ECDA0.svg\n[badge-jvm]: http://img.shields.io/badge/-jvm-DB413D.svg\n[badge-js]: http://img.shields.io/badge/-js-F8DB5D.svg\n[badge-js-ir]: https://img.shields.io/badge/support-[IR]-AAC4E0.svg\n[badge-nodejs]: https://img.shields.io/badge/-nodejs-68a063.svg\n[badge-linux]: http://img.shields.io/badge/-linux-2D3F6C.svg\n[badge-windows]: http://img.shields.io/badge/-windows-4D76CD.svg\n[badge-wasm]: https://img.shields.io/badge/-wasm-624FE8.svg\n[badge-apple-silicon]: http://img.shields.io/badge/support-[AppleSilicon]-43BBFF.svg\n[badge-ios]: http://img.shields.io/badge/-ios-CDCDCD.svg\n[badge-mac]: http://img.shields.io/badge/-macos-111111.svg\n[badge-watchos]: http://img.shields.io/badge/-watchos-C0C0C0.svg\n[badge-tvos]: http://img.shields.io/badge/-tvos-808080.svg","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuakihir0%2Fkmisskey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuakihir0%2Fkmisskey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuakihir0%2Fkmisskey/lists"}