{"id":16937337,"url":"https://github.com/yageek/tpgswift","last_synced_at":"2026-05-19T15:08:39.866Z","repository":{"id":56923120,"uuid":"58706531","full_name":"yageek/TPGSwift","owner":"yageek","description":":bus: TPG OpenData Swift Library","archived":false,"fork":false,"pushed_at":"2019-02-19T11:24:34.000Z","size":257,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-29T14:02:57.611Z","etag":null,"topics":["geneva","ios","opendata","swift","tpg"],"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/yageek.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":"2016-05-13T06:16:55.000Z","updated_at":"2019-02-19T11:22:12.000Z","dependencies_parsed_at":"2022-08-21T05:20:18.887Z","dependency_job_id":null,"html_url":"https://github.com/yageek/TPGSwift","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yageek%2FTPGSwift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yageek%2FTPGSwift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yageek%2FTPGSwift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yageek%2FTPGSwift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yageek","download_url":"https://codeload.github.com/yageek/TPGSwift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244739949,"owners_count":20501992,"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":["geneva","ios","opendata","swift","tpg"],"created_at":"2024-10-13T20:59:20.689Z","updated_at":"2026-05-19T15:08:34.823Z","avatar_url":"https://github.com/yageek.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TPGSwift\n\nSwift libary for the TPG Open Data.\n\nFor more explanation: [TPG Open Data](http://www.tpg.ch/fr/web/open-data/mode-d-emploi)\n\n[![Build Status](https://travis-ci.org/yageek/TPGSwift.svg?branch=master)](https://travis-ci.org/yageek/TPGSwift)\n\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)\n [![CocoaPods Compatible](https://img.shields.io/cocoapods/v/TPGSwift.svg)](https://img.shields.io/cocoapods/v/TPGSwift.svg)\n [![Platform](https://img.shields.io/cocoapods/p/TPGSwift.svg?style=flat)](http://cocoadocs.org/docsets/TPGSwift)\n\n## Usage\n\n```swift\nimport TPGSwift\n\n// MARK: - Setting the key\n\n// Set the API Key\nAPI.Key = \"MY_API_KEY\"\n\n// MARK: - Creating an API call url\n\n// Get stops for the stop code \"WTC0\"\nlet getStops = API.getStops(stopCode: \"WTC0\", stopName: nil, line: nil, latitude: nil, longitude: nil)\n\nprint(\"API Stops: \\(getStops.URL)\")\n// -\u003e API Stops: https://prod.ivtr-od.tpg.ch/v1/GetStops.json?key=KEY\u0026stopCode=WTC0\n\n// MARK: - Decode\n\nlet json = JSONDecoder()\n// This is mandatory\ndecoder.dateDecodingStrategy = .iso8601\n\ndo {\n    let stops = try json.decode(Record\u003cStop\u003e.self, from: data)\n    print(\"Stops: \\(stops)\")\n} catch let error {\n    print(\"Error: \\(error)\")\n}\n\n```\n\n## Paw\n\nYou can find a basic Paw file which will help you to play with the API.\nOpen `TPGSwift.paw` and change the `KEY` variable in the `Production` group\nwith the one received from the TPG.\n\n## License\n\nTPGSwift is released under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyageek%2Ftpgswift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyageek%2Ftpgswift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyageek%2Ftpgswift/lists"}