{"id":15678246,"url":"https://github.com/lukepistrol/pexels-swift","last_synced_at":"2025-05-07T02:27:52.703Z","repository":{"id":37968541,"uuid":"491679721","full_name":"lukepistrol/Pexels-Swift","owner":"lukepistrol","description":"Pexels API client library for the Swift programming language.","archived":false,"fork":false,"pushed_at":"2024-05-27T06:15:32.000Z","size":2480,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-25T01:53:38.061Z","etag":null,"topics":["ios","macos","pexels","pexels-api","swift"],"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/lukepistrol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"lukepistrol","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["buymeacoffee.com/lukeeep"]}},"created_at":"2022-05-12T21:59:02.000Z","updated_at":"2025-01-21T01:59:01.000Z","dependencies_parsed_at":"2024-10-27T08:47:44.912Z","dependency_job_id":null,"html_url":"https://github.com/lukepistrol/Pexels-Swift","commit_stats":{"total_commits":116,"total_committers":2,"mean_commits":58.0,"dds":0.008620689655172376,"last_synced_commit":"4b792b759bb2b37dc2bd03b0a5ec3693e2e71293"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FPexels-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FPexels-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FPexels-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukepistrol%2FPexels-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukepistrol","download_url":"https://codeload.github.com/lukepistrol/Pexels-Swift/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252801061,"owners_count":21806255,"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":["ios","macos","pexels","pexels-api","swift"],"created_at":"2024-10-03T16:19:16.400Z","updated_at":"2025-05-07T02:27:52.681Z","avatar_url":"https://github.com/lukepistrol.png","language":"Swift","funding_links":["https://github.com/sponsors/lukepistrol","buymeacoffee.com/lukeeep","https://www.buymeacoffee.com/lukeeep"],"categories":[],"sub_categories":[],"readme":"\u003cp\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Swift-5.7-f05318.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/iOS-\u003e= 13.0-blue.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/macOS-\u003e= 10.15-blue.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/watchOS-\u003e= 6.0-blue.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/tvOS-\u003e= 13.0-blue.svg\" /\u003e\n\u003c/p\u003e\n\u003cp\u003e\n  \u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/lukepistrol/Pexels-Swift/build-documentation.yml?label=CI\"\u003e\n  \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/lukepistrol/pexels-swift\"\u003e\n  \u003ca href=\"https://twitter.com/lukeeep_\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Twitter-@lukeeep_-1e9bf0.svg?style=flat\" alt=\"Twitter: @lukeeep_\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Pexels-Swift\n\n[Pexels.com API](https://www.pexels.com/api) client library for the Swift programming language.\n\n![Banner](https://github.com/lukepistrol/Pexels-Swift/blob/main/Sources/PexelsSwift/Documentation.docc/Resources/Banner.png)\n\n## Overview\n\nThis Swift Package is a wrapper for [Pexels API](https://www.pexels.com/api) to get access to the entire photo library of `Pexels` within your Swift app.\n\n\u003e It is mandatory to get an [API Key](https://www.pexels.com/api).\n\n## Installation (SPM)\n\n```swift\ndependencies: [\n  .package(url: \"https://github.com/lukepistrol/Pexels-Swift.git\", from: \"0.1.0\")\n],\n```\n\n## Documentation\n\nSee the full documentation [here](https://lukepistrol.github.io/Pexels-Swift/documentation/pexelsswift/) or build it locally using `⇧⌃⌘D` in Xcode once you added `Pexels-Swift` to your project.\n\n## Usage\n\n```swift\nimport PexelsSwift\n\n// access the singleton instance\nlet pexels = PexelsSwift.shared\n\n// set your API key\npexels.setup(apiKey: \"YOUR_API_KEY\", logLevel: .debug)\n\n// fetch images metadata using async/await\nlet result = await pexels.getCuratedPhotos()\n\nswitch result {\ncase .failure(let error):\n    print(error.description)\ncase .success(let (data, paging, response)):\n    // access photos\n    // data -\u003e [PSPhoto]\n    // paging -\u003e PSPagingInfo\n    // response -\u003e HTTPURLResponse\n}\n\n// fetch images metadata using completion handlers\npexels.getCuratedPhotos() { result in\n    switch result {\n    case .failure(let error):\n        print(error.description)\n    case .success(let (data, paging, response)):\n        // access photos\n        // data -\u003e [PSPhoto]\n        // paging -\u003e PSPagingInfo\n        // response -\u003e HTTPURLResponse\n    }\n}\n```\n\n## Demo Project\n\nI've built a simple iOS app - [PexelsBrowser](https://github.com/lukepistrol/PexelsBrowser) - using this library and SwiftUI.\n\n\u003ca href=\"https://www.buymeacoffee.com/lukeeep\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepistrol%2Fpexels-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukepistrol%2Fpexels-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukepistrol%2Fpexels-swift/lists"}