{"id":13639933,"url":"https://github.com/h5gq3/urbit_http_api","last_synced_at":"2025-04-20T02:32:12.463Z","repository":{"id":54180487,"uuid":"312119921","full_name":"h5gq3/urbit_http_api","owner":"h5gq3","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-04T20:39:49.000Z","size":86,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-07T11:03:05.341Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Kotlin","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/h5gq3.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":"2020-11-11T23:56:14.000Z","updated_at":"2023-02-16T18:08:09.000Z","dependencies_parsed_at":"2022-08-13T08:31:09.344Z","dependency_job_id":null,"html_url":"https://github.com/h5gq3/urbit_http_api","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/h5gq3%2Furbit_http_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h5gq3%2Furbit_http_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h5gq3%2Furbit_http_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/h5gq3%2Furbit_http_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/h5gq3","download_url":"https://codeload.github.com/h5gq3/urbit_http_api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223816296,"owners_count":17207833,"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-08-02T01:01:06.252Z","updated_at":"2024-11-09T10:30:30.799Z","avatar_url":"https://github.com/h5gq3.png","language":"Kotlin","funding_links":[],"categories":["Archive"],"sub_categories":["HTTP APIs (Airlocks)"],"readme":"# Urbit HTTP API\r\n\r\nUrbit HTTP API library in Kotlin for connecting to an Urbit instance\r\n\r\n[![awesome urbit badge](https://img.shields.io/badge/~-awesome%20urbit-lightgrey)](https://github.com/urbit/awesome-urbit)\r\n\r\n## Usage\r\n\r\n1. Copy `urbit.kt` in `/src/main/kotlin/urbit.kt` to your Kotlin project\r\n2. Add following dependencies to your project `build.gradle.kts`\r\n```\r\nimplementation(\"com.squareup.okhttp3:okhttp:4.9.0\")\r\nimplementation(\"com.squareup.okhttp3:okhttp-sse:4.9.0\")\r\n```\r\n3. Import the `Urbit` class in your project with top-level statement `import urbit.http.api.Urbit`\r\n4. Initialize the `Urbit` class. E.g `val zod = Urbit(code, url)`\r\n5. Call methods in your `main` function block. E.g `zod.connect()`\r\n\r\n## Example\r\n\r\n```\r\nimport urbit.http.api.Urbit\r\n\r\nval zod = Urbit(code = \"lidlut-tabwed-pillex-ridrup\", url = \"http://localhost:8080\")\r\n\r\nfun main() {\r\n    zod.connect()\r\n    zod.poke(\"zod\",\"hood\",\"helm-hi\",\"openinggg airlock\")\r\n    zod.subscribe(\"zod\",\"chat-view\",\"/primary\")\r\n    zod.sseInit()\r\n    zod.unsubscribe(2)\r\n    zod.delete()\r\n}\r\n```\r\nLook for more examples at test/urbitclient.kt\r\n\r\n## To do\r\n* improve documentation\r\n* write methods for scry, spider | DONE\r\n* handle timeouts better | DONE\r\n* abstract away message boilerplate, let all actions call sendmessage()\r\n* restructure code into Kotlin Multiplatform\r\n* write graph-store interface | DONE\r\n* write other urbit apps interfaces\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh5gq3%2Furbit_http_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fh5gq3%2Furbit_http_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fh5gq3%2Furbit_http_api/lists"}