Merge pull request #14 from lukepistrol/feat/add-fps-property add fps property to PSVideo.File
Merge pull request #14 from lukepistrol/feat/add-fps-property
add fps property to PSVideo.File
fps
PSVideo.File
Pexels.com API client library for the Swift programming language.
This Swift Package is a wrapper for Pexels API to get access to the entire photo library of Pexels within your Swift app.
Pexels
It is mandatory to get an API Key.
dependencies: [ .package(url: "https://github.com/lukepistrol/Pexels-Swift.git", from: "0.1.0") ],
See the full documentation here or build it locally using ⇧⌃⌘D in Xcode once you added Pexels-Swift to your project.
⇧⌃⌘D
Pexels-Swift
import PexelsSwift // access the singleton instance let pexels = PexelsSwift.shared // set your API key pexels.setup(apiKey: "YOUR_API_KEY", logLevel: .debug) // fetch images metadata using async/await let result = await pexels.getCuratedPhotos() switch result { case .failure(let error): print(error.description) case .success(let (data, paging, response)): // access photos // data -> [PSPhoto] // paging -> PSPagingInfo // response -> HTTPURLResponse } // fetch images metadata using completion handlers pexels.getCuratedPhotos() { result in switch result { case .failure(let error): print(error.description) case .success(let (data, paging, response)): // access photos // data -> [PSPhoto] // paging -> PSPagingInfo // response -> HTTPURLResponse } }
I’ve built a simple iOS app - PexelsBrowser - using this library and SwiftUI.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
Pexels-Swift
Pexels.com API client library for the Swift programming language.
Overview
This Swift Package is a wrapper for Pexels API to get access to the entire photo library of
Pexels
within your Swift app.Installation (SPM)
Documentation
See the full documentation here or build it locally using
⇧⌃⌘D
in Xcode once you addedPexels-Swift
to your project.Usage
Demo Project
I’ve built a simple iOS app - PexelsBrowser - using this library and SwiftUI.