{"id":21310497,"url":"https://github.com/lebje/arcgiskit","last_synced_at":"2026-05-11T03:50:57.709Z","repository":{"id":112036382,"uuid":"323381965","full_name":"LebJe/ArcGISKit","owner":"LebJe","description":"A Swift library for the ArcGIS REST API.","archived":false,"fork":false,"pushed_at":"2023-11-24T00:42:16.000Z","size":7486,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-22T09:37:21.379Z","etag":null,"topics":["arcgis","arcgis-api","library","linux","macos","rest-api","rest-client","swift","swift-library","swift-package-manager","swift5"],"latest_commit_sha":null,"homepage":"https://lebje.github.io/ArcGISKit/","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LebJe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"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":"2020-12-21T15:53:47.000Z","updated_at":"2021-09-05T19:21:26.000Z","dependencies_parsed_at":"2023-06-29T15:18:40.641Z","dependency_job_id":"0a729ab1-2777-47a1-ad46-ed3949eb726e","html_url":"https://github.com/LebJe/ArcGISKit","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebJe%2FArcGISKit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebJe%2FArcGISKit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebJe%2FArcGISKit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LebJe%2FArcGISKit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LebJe","download_url":"https://codeload.github.com/LebJe/ArcGISKit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243789961,"owners_count":20348319,"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":["arcgis","arcgis-api","library","linux","macos","rest-api","rest-client","swift","swift-library","swift-package-manager","swift5"],"created_at":"2024-11-21T17:13:51.539Z","updated_at":"2026-05-11T03:50:52.682Z","avatar_url":"https://github.com/LebJe.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArcGISKit\n\n**Under Construction! DO NOT USE!**\n\n**A Swift library for the [ArcGIS REST API](https://developers.arcgis.com/rest/).**\n\n[![Swift 5.3](https://img.shields.io/badge/Swift-5.3-brightgreen?logo=swift)](https://swift.org)\n[![SPM Compatible](https://img.shields.io/badge/SPM-compatible-brightgreen.svg)](https://swift.org/package-manager)\n[![https://img.shields.io/badge/Platforms-MacOS%20%7C%20Linux-lightgrey](https://img.shields.io/badge/Platforms-MacOS%20%7C%20Linux-lightgrey)](https://img.shields.io/badge/Platforms-MacOS%20%7C%20Linux-lightgrey)\n[![](https://img.shields.io/github/v/tag/LebJe/ArcGISKit)](https://github.com/LebJe/ArcGISKit/releases)\n[![Build and Test](https://github.com/LebJe/ArcGISKit/workflows/Build%20and%20Test/badge.svg)](https://github.com/LebJe/ArcGISKit/actions?query=workflow%3A%22Build+and+Test%22)\n\nDocumentation comments are taken from the [ArcGIS REST API](https://developers.arcgis.com/rest/).\n\nView the documentation on [Github Pages](https://lebje.github.io/ArcGISKit/).\n\nTable of Contents\n=================\n\n\u003c!--ts--\u003e\n   * [ArcGISKit](#arcgiskit)\n   * [Table of Contents](#table-of-contents)\n      * [Install](#install)\n         * [Swift Package Manager](#swift-package-manager)\n      * [Usage](#usage)\n         * [Vapor](#vapor)\n      * [Contributing](#contributing)\n\n\u003c!-- Added by: jefflebrun, at: Thu Feb  4 15:57:06 EST 2021 --\u003e\n\n\u003c!--te--\u003e\nCreated by [gh-md-toc](https://github.com/ekalinin/github-markdown-toc)\n\n**Under Construction! DO NOT READ!**\n\n## Install\n### Swift Package Manager\nAdd this to the `dependencies` array in `Package.swift`:\n\n```swift\n.package(url: \"https://github.com/LebJe/ArcGISKit\", from: \"1.0.0\")\n```\n\nAnd add this to the `targets` array in the aforementioned file:\n\n```swift\n.product(name: \"ArcGISKit\", package: \"ArcGISKit\")\n```\n\n## Usage\n\nYou first need to get a `GIS`:\n\n```swift\nimport ArcGISKit\nimport NIO\n\n// Setup a group for the `HTTPClient`.\nlet group = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)\n\n// Login using a username and password.\nlet authenticatedGIS = GIS(\n\tauthType: .credentials(username: \"username\", password: \"password\"), \n\teventLoopGroup: group, \n\turl: URL(string: \"https://my-organization.maps.arcgis.com\")!\n)\n\n// Login anonymously.\n// There is no user available since we logged in anonymously.\nlet anonymousGIS = GIS(authType: .anonymous, eventLoopGroup: group)\n\n// Login using a client ID and client secret.\nlet idAndSecretGIS = GIS(\n\tauthType: .idAndSecret(clientID: \"id\", clientSecret: \"secret\", username: \"username\"),\n\teventLoopGroup: group,\n\turl: URL(string: \"https://my-organization.maps.arcgis.com\")!\n)\n```\n\n### Vapor\n\nIf you are using [Vapor](https://github.com/vapor/vapor), initialize your `GIS` like this:\n\n```swift\nfunc routes(_ app: Application) throws {\n\n\t// Initialize your GIS` using `app.eventLoopGroup`.\n\tlet gis = GIS(..., eventLoopGroup: app.eventLoopGroup, ...)\n\t\n\t...\n}\n```\n\nOnce you have a `GIS` you can fetch a `User`:\n\n```swift\nvar gis: GIS = ...\n\nif !gis.isAnonymous {\n\t// Fetch synchronously.\n\tlet user = try gis.fetchUser().wait()\n\n\t// Fetch asynchronously.\n\ttry gis.fetchUser().whenComplete({ res in\n\tswitch res {\n\t\tcase .failure(let error):\n\t\t\t// something went wrong...\n\t\t\tbreak\n\t\tcase .success(let user):\n\t\t\t// Use `user` here.\n\t\t\tprint(user)\n\t\t}\n\t})\t\n}\n```\n\n## Contributing\nBefore committing, please install [pre-commit](https://pre-commit.com), and [swift-format](https://github.com/nicklockwood/SwiftFormat) and install the pre-commit hook:\n```bash\n$ brew bundle # install the packages specified in Brewfile\n$ pre-commit install\n\n# Commit your changes.\n```\n\nTo install pre-commit on other platforms, refer to the [documentation](https://pre-commit.com/#install).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebje%2Farcgiskit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flebje%2Farcgiskit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flebje%2Farcgiskit/lists"}