{"id":25654222,"url":"https://github.com/magicbell/magicbell-swift-user-client","last_synced_at":"2026-02-28T02:37:56.210Z","repository":{"id":268584813,"uuid":"902448391","full_name":"magicbell/magicbell-swift-user-client","owner":"magicbell","description":"Swift client SDK for the MagicBell API","archived":false,"fork":false,"pushed_at":"2026-02-23T05:33:14.000Z","size":280,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-23T13:46:44.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.magicbell.com","language":"Swift","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/magicbell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-12T15:31:16.000Z","updated_at":"2025-03-13T18:21:19.000Z","dependencies_parsed_at":"2024-12-17T17:38:29.896Z","dependency_job_id":"7ed4aadf-2bfe-47fa-8a4c-c7b65d919b40","html_url":"https://github.com/magicbell/magicbell-swift-user-client","commit_stats":null,"previous_names":["magicbell/magicbell-swift-client","magicbell/magicbell-swift-user-client"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/magicbell/magicbell-swift-user-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-swift-user-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-swift-user-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-swift-user-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-swift-user-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicbell","download_url":"https://codeload.github.com/magicbell/magicbell-swift-user-client/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicbell%2Fmagicbell-swift-user-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29923410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"online","status_checked_at":"2026-02-28T02:00:07.010Z","response_time":90,"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":[],"created_at":"2025-02-23T20:18:39.021Z","updated_at":"2026-02-28T02:37:56.178Z","avatar_url":"https://github.com/magicbell.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MagicBellUserClient Swift SDK 0.4.0\n\nWelcome to the MagicBellUserClient SDK documentation. This guide will help you get started with integrating and using the MagicBellUserClient SDK in your project.\n\n## About the API\n\nOpenAPI 3.0.3 Specification for MagicBell API.\n\n## Table of Contents\n\n- [MagicBellUserClient Swift SDK 0.4.0](#magicbelluserclient-swift-sdk-020)\n  - [About the API](#about-the-api)\n  - [Table of Contents](#table-of-contents)\n- [Setup \\\u0026 Configuration](#setup--configuration)\n  - [Supported Language Versions](#supported-language-versions)\n  - [Installation](#installation)\n    - [Swift Package Manager](#swift-package-manager)\n  - [Authentication](#authentication)\n    - [Access Token Authentication](#access-token-authentication)\n      - [Setting the Access Token](#setting-the-access-token)\n- [Sample Usage](#sample-usage)\n  - [License](#license)\n\n# Setup \u0026 Configuration\n\n## Supported Language Versions\n\nThis SDK is compatible with the following versions:\n\n- iOS 13.0+, macOS 15.0+, tvOS 13.0+, watchOS 6.0+, visionOS 1.0+\n- Swift 6.0+\n- Xcode 16+\n\n## Installation\n\nThis package depends on the [Swift OpenAPI Runtime](https://github.com/apple/swift-openapi-runtime) which is only available via Swift Package Manager.\n\n### Swift Package Manager\n\nTo install MagicBell using [Swift Package Manager](https://www.swift.org/package-manager/), add the dependency as follows to your project:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/magicbell/magicbell-swift-user-client\", .upToNextMajor(from: \"0.4.0\"))\n]\n```\n\n## Authentication\n\n### Access Token Authentication\n\nThe MagicBell API uses an Access Token for authentication.\n\nThis token must be provided to authenticate your requests to the API.\n\n#### Setting the Access Token\n\nWhen you initialize the SDK, you can set the access token via the `AuthenticationMiddleware`:\n\n```swift\nlet authMiddleware = AuthenticationMiddleware(jwtToken: token)\n\nlet client = MagicBellUserClient.Client(\n            serverURL: try Servers.Server1.url(),\n            configuration: .init(dateTranscoder: .iso8601WithFractionalSeconds),\n            transport: URLSessionTransport(),\n            middlewares: [authMiddleware])\n```\n\nIf you need to set or update the access token after initializing the SDK you can create a new Client instance.\n\n# Sample Usage\n\nBelow is a comprehensive example demonstrating how to authenticate and call a simple endpoint:\n\n```swift\nimport Foundation\nimport MagicBellUserClient\nimport OpenAPIURLSession\n\nlet token = \"YOUR_ACCESS_TOKEN\"\n\n@main\nstruct MainApp {\n    static func main() async throws {\n\n        let client = MagicBellUserClient.Client(\n            serverURL: try Servers.Server1.url(),\n            configuration: .init(dateTranscoder: .iso8601WithFractionalSeconds),\n            transport: URLSessionTransport(),\n            middlewares: [AuthenticationMiddleware(jwtToken: token)])\n\n        let response = try await client.get_mobile_push_apns_tokens(.init())\n\n        switch response {\n        case .ok(let okResponse):\n            let json = try okResponse.body.json\n            let tokens = json.data\n\n            print(\"Found \\(tokens?.count ?? 0) tokens\")\n            tokens?.forEach({ token in\n                print(\"- token: \\(token.data.device_token)\")\n            })\n\n        case .undocumented(let statusCode, _):\n            print(\"Undocumented status code: \\(statusCode)\")\n        }\n    }\n}\n```\n\n## License\n\nThis SDK is licensed under the MIT License.\n\nSee the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicbell%2Fmagicbell-swift-user-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicbell%2Fmagicbell-swift-user-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicbell%2Fmagicbell-swift-user-client/lists"}