{"id":13427556,"url":"https://github.com/christiandeange/ozone","last_synced_at":"2025-04-22T15:08:16.011Z","repository":{"id":158570268,"uuid":"611550055","full_name":"christiandeange/ozone","owner":"christiandeange","description":"Kotlin Multiplatform bindings for Bluesky","archived":false,"fork":false,"pushed_at":"2025-04-22T07:41:35.000Z","size":2991,"stargazers_count":111,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-22T15:08:09.231Z","etag":null,"topics":["at-protocol","bluesky","bluesky-api","bluesky-client","kotlin-multiplatform"],"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/christiandeange.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":"2023-03-09T03:33:19.000Z","updated_at":"2025-04-22T07:41:39.000Z","dependencies_parsed_at":"2024-01-18T13:40:50.346Z","dependency_job_id":"d790b442-ca90-4c82-b7a7-7f753ad35c11","html_url":"https://github.com/christiandeange/ozone","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiandeange%2Fozone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiandeange%2Fozone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiandeange%2Fozone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christiandeange%2Fozone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christiandeange","download_url":"https://codeload.github.com/christiandeange/ozone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250264910,"owners_count":21402003,"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":["at-protocol","bluesky","bluesky-api","bluesky-client","kotlin-multiplatform"],"created_at":"2024-07-31T01:00:31.520Z","updated_at":"2025-04-22T15:08:16.004Z","avatar_url":"https://github.com/christiandeange.png","language":"Kotlin","funding_links":[],"categories":["\u003ca name='clients-and-libraries'\u003e\u003c/a\u003e Clients and Libraries"],"sub_categories":["\u003ca name='kotlin'\u003e\u003c/a\u003e Kotlin"],"readme":"![Maven Central](https://img.shields.io/maven-central/v/sh.christian.ozone/bluesky?versionPrefix=0.3.2) ![CI](https://github.com/christiandeange/ozone/actions/workflows/ci.yml/badge.svg)\n\nozone\n=====\n\n### Overview\n\nThe Ozone project for the [AT Protocol](https://atproto.com/) consists of 4 components:\n\n1. A Gradle plugin to compile AT Protocol schemas into usable Kotlin classes.\n2. Multiplatform APIs for the AT Protocol spec that can be used with any compatible service, including [Bluesky Social](https://bsky.app).\n   - Supports Android, JVM, JavaScript, and iOS.\n3. APIs to connect to the [Jetstream](https://github.com/bluesky-social/jetstream) firehose for Bluesky Social.\n   - Supports Android, JVM, and JavaScript.\n4. Example client apps that demonstrate usage of those APIs.\n\n\u003e **Warning**\n\u003e\n\u003e 🚧 🚧 🚧 Everything in here is very much a work-in-progress!\n\u003e The [upstream schemas](https://github.com/bluesky-social/atproto/commits/main/lexicons) are still subject to breaking\n\u003e changes and may break at any moment if used in production code. Use at your own risk!\n\n### Why \"Ozone\"?\n\nO\u003csub\u003e3\u003c/sub\u003e exists at all levels in the [ATmosphere](https://bsky.app/profile/shreyanjain.net/post/3k26nw6kwnh2e).\n\nNo relation to the moderation tools also named [Ozone](https://github.com/bluesky-social/ozone).\n\n### Bluesky Social Bindings\n\nDocumentation is available at [ozone.christian.sh](https://ozone.christian.sh).\n\n#### Java / Kotlin\n\n```kotlin\n// build.gradle[.kts]\n\ndependencies {\n  api(\"sh.christian.ozone:bluesky:0.3.2\")\n}\n```\n\n#### Swift / Objective-C\n\nIn Xcode, select **File \u003e Add Packages** and enter https://github.com/christiandeange/BlueskyAPI\n\n### Jetstream Bindings\n\nDocumentation is available at [ozone.christian.sh](https://ozone.christian.sh/ozone/sh.christian.ozone.jetstream/index.html).\n\n#### Java / Kotlin\n\n```kotlin\n// build.gradle[.kts]\n\ndependencies {\n  api(\"sh.christian.ozone:jetstream:0.3.2\")\n}\n```\n\n### Gradle Plugin\n\nIn addition to shipping the lexicons that define the official Bluesky API, this project also includes a Gradle Plugin that allows you to bring your own lexicon definitions and generate any set of AT Protocol bindings from them.\n\n```kotlin\n// build.gradle[.kts]\n\nplugins {\n  id(\"sh.christian.ozone.generator\") version \"0.3.2\"\n}\n\ndependencies {\n  // This is where you have your schema files stored in your project.\n  lexicons(fileTree(\"lexicons\") { include(\"**/*.json\") })\n\n  // You can also depend directly on the published Bluesky lexicons instead.\n  lexicons(\"sh.christian.ozone:lexicons:0.3.2\")\n}\n\nlexicons {\n  // Determines the package name of generated supporting methods. Defaults to \"sh.christian.ozone\".\n  namespace.set(\"com.example.myapp\")\n\n   // Configuration for how to handle unknown types and known values.\n  defaults {\n     // Determines whether to generate classes to encapsulate unknown types for union references. Defaults to false.\n     generateUnknownsForSealedTypes.set(true)\n\n     // Determines whether to generate classes to encapsulate unknown values for strings. Defaults to false.\n     generateUnknownsForEnums.set(true)\n  }\n\n  // Generates an additional interface for the target schemas.\n  // This method can be called more than once to generate multiple API interfaces.\n  generateApi(\"BlueskyApi\") {\n    // Determines the package name of the generated API. Defaults to \"sh.christian.ozone\".\n    packageName.set(\"com.example.myapp\")\n\n    // Generates an additional class that implements this interface by sending corresponding\n    // XRPC requests to a provided host conforming to the AT Protocol.\n    // Inherits the same package name as the generated interface.\n    withKtorImplementation(\"XrpcBlueskyApi\")\n\n    // Determines the return type for each generated API method. Defaults to Raw.\n    // - Raw: the raw data type\n    // - Result: Result\u003cT\u003e\n    // - Response: AtpResponse\u003cT\u003e\n    returnType.set(ApiReturnType.Result)\n\n    // Determines whether the generated methods should be marked as suspend functions.\n    // When generating a Ktor implementation as well, execution will block the current thread\n    // for non-suspending methods. Defaults to true.\n    suspending.set(true)\n  }\n\n  // File path where Kotlin source files will be written to. Defaults to \"\u003cproject-dir\u003e/build/generated/lexicons\".\n  outputDirectory.set(project.layout.buildDirectory.dir(\"out\"))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiandeange%2Fozone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristiandeange%2Fozone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristiandeange%2Fozone/lists"}