{"id":13961728,"url":"https://github.com/floschliep/FLORouter","last_synced_at":"2025-07-21T06:31:39.700Z","repository":{"id":79904712,"uuid":"90985982","full_name":"floschliep/FLORouter","owner":"floschliep","description":"URL Routing Library for macOS","archived":false,"fork":false,"pushed_at":"2024-04-12T13:17:12.000Z","size":91,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-28T07:34:38.100Z","etag":null,"topics":["macos","url-router","url-schemes"],"latest_commit_sha":null,"homepage":null,"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/floschliep.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}},"created_at":"2017-05-11T14:03:40.000Z","updated_at":"2024-04-12T13:09:47.000Z","dependencies_parsed_at":"2024-11-28T07:31:21.977Z","dependency_job_id":"94b67af8-0077-40da-83c6-0da0719483fb","html_url":"https://github.com/floschliep/FLORouter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/floschliep/FLORouter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floschliep%2FFLORouter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floschliep%2FFLORouter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floschliep%2FFLORouter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floschliep%2FFLORouter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/floschliep","download_url":"https://codeload.github.com/floschliep/FLORouter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/floschliep%2FFLORouter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266253575,"owners_count":23900052,"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":["macos","url-router","url-schemes"],"created_at":"2024-08-08T17:01:23.206Z","updated_at":"2025-07-21T06:31:39.418Z","avatar_url":"https://github.com/floschliep.png","language":"Swift","funding_links":[],"categories":["Swift"],"sub_categories":[],"readme":"# FLORouter\n\nFLORouter is an URL routing library for macOS. It provides a simple and unified way to handle URL schemes in your Mac app by using a powerful block-based API.\n\n## Usage\n#### Simple Registration\n```\nRouter.global.register(\"/my/route\") { request in\n\tlet scheme = request.scheme\n\t// …\n\treturn true\n}\n```\n\nThis example registers the route `/my/route` for all schemes using the shared `Router` instance `global`. You can retrieve the scheme used to open your app from the supplied `request` object.\n#### Multiple Routes\n```\nlet router = Router()\nrouter.register([\"/foo/bar\", \"/bar/foo\"]) { request in\n\tlet url = request.url\n\t// …\n\treturn true\n}\n```\n\nIt’s possible to use multiple `Router` instances simultaneously. Here we create our own instance and register two routes at once which will both be handled by the same block.\n#### Scheme Requirements\n```\nRouter.global.register(\"/\", for: \"scheme-1\") { request in\n\t// …\n\treturn true\n}\nRouter.global.register(\"/\", for: \"scheme-2\") { request in\n\t// …\n\treturn true\n}\n```\n\nYou can also require specific schemes. The first block will only be called for the URL `scheme-1://` and the second for `scheme-2://`.\n#### Parameters\n```\nRouter.global.register(\"/view/:user“) { request in\n\tlet user = request.parameters[\"user\"]\n\tlet referrer = request.parameters[\"referrer\"]\n\t// …\n\treturn true\n}\n```\n\nWhen opening the URL `myapp://view/foo?referrer=bar`, the registered block would reveice `foo` as `user` parameter and `bar` as `referrer` parameter.\n#### Wildcards\n\n```\nRouter.global.register(\"/unknown/route/*\") { request in\n\tlet wildcardComponents = request.wildcardComponents\n\t// …\n\treturn true \n}\n```\n\nIn case you don’t know all possible paths beforehand you can register a wildcard route. The URL components found at the position of the wildcard can be retrieved using the `wildcardComponents` property of the `request` object. Be aware that wildcard routes will also me matched if the wildcard is empty. In this case the `wildcardComponents` property will be `nil`.\n\n## Requirements\n\nFLORouter is written in Swift 4 but its public interface is 100% compatible with Objective-C. Requires macOS 10.9 or later.\n\n## Installation\n\nDrop the FLORouter Xcode Project into your workspace and add the framework as a target dependency.\n\n## Author\n\nFlorian Schliep\n\n- GitHub: [@floschliep](https://github.com/floschliep)\n- Twitter: [@floschliep](https://twitter.com/floschliep)\n- Web: [floschliep.com](https://floschliep.com)\n\n## License\n\nFLORouter is available under the MIT license. See the LICENSE.txt file for more info.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloschliep%2FFLORouter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffloschliep%2FFLORouter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffloschliep%2FFLORouter/lists"}