{"id":17540136,"url":"https://github.com/kiliankoe/parkkit","last_synced_at":"2025-04-23T22:27:01.957Z","repository":{"id":62450483,"uuid":"77872109","full_name":"kiliankoe/ParkKit","owner":"kiliankoe","description":"🚘 ParkAPI wrapper","archived":false,"fork":false,"pushed_at":"2020-07-19T05:25:47.000Z","size":121,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T04:11:13.453Z","etag":null,"topics":["open-data","parking"],"latest_commit_sha":null,"homepage":"","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/kiliankoe.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}},"created_at":"2017-01-03T00:55:57.000Z","updated_at":"2020-05-19T22:59:19.000Z","dependencies_parsed_at":"2022-11-02T01:01:34.247Z","dependency_job_id":null,"html_url":"https://github.com/kiliankoe/ParkKit","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiliankoe%2FParkKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiliankoe%2FParkKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiliankoe%2FParkKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiliankoe%2FParkKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiliankoe","download_url":"https://codeload.github.com/kiliankoe/ParkKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250525347,"owners_count":21445049,"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":["open-data","parking"],"created_at":"2024-10-20T22:08:26.344Z","updated_at":"2025-04-23T22:27:01.940Z","avatar_url":"https://github.com/kiliankoe.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚘 ParkKit\n\n[![Travis](https://img.shields.io/travis/kiliankoe/ParkKit.svg?style=flat-square)](https://travis-ci.org/kiliankoe/ParkKit)\n[![Version](https://img.shields.io/cocoapods/v/ParkKit.svg?style=flat-square)](http://cocoapods.org/pods/ParkKit)\n[![License](https://img.shields.io/cocoapods/l/ParkKit.svg?style=flat-square)](http://cocoapods.org/pods/ParkKit)\n[![Platform](https://img.shields.io/cocoapods/p/ParkKit.svg?style=flat-square)](http://cocoapods.org/pods/ParkKit)\n[![Docs](https://img.shields.io/cocoapods/metrics/doc-percent/ParkKit.svg?style=flat-square)](http://cocoadocs.org/docsets/ParkKit)\n[![Codecov](https://img.shields.io/codecov/c/github/kiliankoe/ParkKit.svg?style=flat-square)](https://codecov.io/gh/kiliankoe/ParkKit)\n\nThis is a wrapper for the API provided by [ParkAPI](https://github.com/offenesdresden/ParkAPI) for anything written in Swift. It's primary purpose is to be used by [ParkenDD](https://github.com/kiliankoe/ParkenDD).\n\n## Example\n\n```swift\nlet park = ParkKit() // uses the default server at parkendd.de\n// let park = ParkKit(withURL: URL(string: \"https://your_server.com\")!) // uses your server\n```\n\n```swift\npark.fetchCities { result in\n    guard let response = result.success else { return }\n    print(response.cities)\n}\n\n// ▿ 13 elements\n//   ▿ ParkKit.City\n//     - name: \"Aarhus\"\n//     ▿ coordinate: __C.CLLocationCoordinate2D\n//       - latitude: 56.153005\n//       - longitude: 10.203201\n//       ...\n```\n\n```swift\npark.fetchLots(forCity: \"Dresden\") { result in\n    guard let response = result.success else { return }\n    print(response.lots)\n}\n\n// ▿ 48 elements\n//   ▿ ParkKit.Lot\n//     ▿ address: Optional(\"Wilsdruffer Straße\")\n//       ...\n```\n\n```swift\nlet centrum = \"dresdencentrumgalerie\"\nlet dresden = \"Dresden\"\n\n// Fetch forecast info for today\npark.fetchForecast(forLot: centrum, inCity: dresden) { result in\n    guard let response = result.success else { return }\n    print(response.forecast)\n}\n\npark.fetchForecast(forLot: centrum, inCity: dresden, forDay: .today) { _ in\n    // Same as above, `forDay` accepts either `.today`, `.offsetFromToday(Int)` \n    // or any `Date` value which will be used to infer the day.\n}\n\n// You can also specify a custom start and end day if you want more than a single day's worth of data:\n\nlet startingDate = Date()\nlet endingDate = startingDate.addingTimeInterval(7 * 24 * 60 * 60) // one week from now\n\npark.fetchForecast(forLot: centrum, inCity: dresden, startingAt: startingDate, endingAt: endingDate) { _ in\n    // ...\n}\n\n// ▿ 97 elements\n//   ▿ (2 elements)\n//     - .0: 2017-01-11 00:00:00 +0000\n//     - .1: 13\n//   ▿ (2 elements)\n//     - .0: 2017-01-11 00:15:00 +0000\n//     - .1: 12\n//   ...\n```\n\n## Requirements\n\nShould you be hosting your own version of the ParkAPI server and using this on iOS, you might have to set up an ATS exception if you don't serve the data via HTTPS.\n\nUsing your own server is definitely recommended should you be planning on executing a large amount of requests (e.g. through a multitude of client applications).\n\n## Installation\n\nParkKit is available through Cocoapods, Carthage/Punic and Swift Package Manager, take your pick.\n\nCopypasta for your Podfile:\n\n```ruby\npod \"ParkKit\"\n```\n\nCartfile:\n\n```\ngithub \"kiliankoe/ParkKit\"\n```\n\nPackage.swift:\n\n```swift\n.Package(url: \"https://github.com/kiliankoe/ParkKit\", majorVersion: 0)\n```\n\n## Contributors\n\nKilian Koeltzsch, [@kiliankoe](https://github.com/kiliankoe)\n\n## License\n\nParkKit is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiliankoe%2Fparkkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiliankoe%2Fparkkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiliankoe%2Fparkkit/lists"}