{"id":20664728,"url":"https://github.com/jasudev/unsplashprovider","last_synced_at":"2025-08-26T03:09:01.948Z","repository":{"id":107700257,"uuid":"453324416","full_name":"jasudev/UnsplashProvider","owner":"jasudev","description":"It is a package that can use the Unsplash API. It was developed as a SwiftUI.","archived":false,"fork":false,"pushed_at":"2022-12-27T16:40:06.000Z","size":7824,"stargazers_count":27,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T18:59:27.392Z","etag":null,"topics":["images","swift","swiftui","unsplash","unsplash-api","unsplash-client","unsplash-images","unsplash-swiftui"],"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/jasudev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2022-01-29T07:09:34.000Z","updated_at":"2025-02-20T09:47:34.000Z","dependencies_parsed_at":"2023-03-12T20:45:18.705Z","dependency_job_id":null,"html_url":"https://github.com/jasudev/UnsplashProvider","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jasudev/UnsplashProvider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FUnsplashProvider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FUnsplashProvider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FUnsplashProvider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FUnsplashProvider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasudev","download_url":"https://codeload.github.com/jasudev/UnsplashProvider/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasudev%2FUnsplashProvider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272164962,"owners_count":24884626,"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","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["images","swift","swiftui","unsplash","unsplash-api","unsplash-client","unsplash-images","unsplash-swiftui"],"created_at":"2024-11-16T19:25:56.385Z","updated_at":"2025-08-26T03:09:01.942Z","avatar_url":"https://github.com/jasudev.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **UnsplashProvider for SwiftUI**\nIt is a package that can use the Unsplash API. It was developed as a SwiftUI.\n\n[![Platforms](https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS-blue?style=flat-square)](https://developer.apple.com/macOS)\n[![iOS](https://img.shields.io/badge/iOS-13.0-blue.svg)](https://developer.apple.com/iOS)\n[![macOS](https://img.shields.io/badge/macOS-11.0-blue.svg)](https://developer.apple.com/macOS)\n[![instagram](https://img.shields.io/badge/instagram-@dev.fabula-orange.svg?style=flat-square)](https://www.instagram.com/dev.fabula)\n[![SPM](https://img.shields.io/badge/SPM-compatible-red?style=flat-square)](https://developer.apple.com/documentation/swift_packages/package/)\n[![MIT](https://img.shields.io/badge/licenses-MIT-red.svg)](https://opensource.org/licenses/MIT)  \n\n## Screenshot\nhttps://user-images.githubusercontent.com/1617304/153021842-cb46588f-69be-4df6-a290-e6d92349bb47.mp4\n\n## Usage\n```swift\nimport UnsplashProvider\n```\n```swift\n// You must enter the application access key.\nUPConfiguration.shared.accessKey = \"\" // \u003cYOUR_ACCESS_KEY\u003e\n```\n\n* How to use the built-in ObservableObject object\n    ```swift\n    @StateObject var photo = UPPhotoStore()\n    @StateObject var photos = UPPhotosStore()\n    @StateObject var randomPhotos = UPRandomPhotosStore()\n    @StateObject var searchPhotos = UPSearchPhotosStore()\n    @StateObject var searchUsers = UPSearchUsersStore()\n    \n    ...\n    \n    List(photos.photos) { photo in\n        ...\n    }\n    List(randomPhotos.photos) { photo in\n        ...\n    }\n    List(searchPhotos.photos) { photo in\n        ...\n    }\n    List(searchUsers.users) { user in\n        ...\n    }\n    \n    ...\n    \n    // func fetchPhoto(id: String)\n    photo.fetchPhoto(id: \"F3OvjNcF5Xg\") \n    \n    // func fetchPhotos(page: Int = 1, perPage: Int = 30, orderBy: UPSort = .latest)\n    photos.fetchPhotos(orderBy: .popular) \n    \n    // func fetchPhotos(collections: String? = nil, topics: String? = nil, username: String? = nil, query: String? = nil, orientation: UPOrientation? = nil, contentFilter: UPContentFilter? = nil, count: Int = 1)\n    randomPhotos.fetchPhotos(query: \"cat\", count: 30) \n    \n    // func fetchSearchPhotos(query: String, page: Int = 1, perPage: Int = 30, orderBy: UPSort = .relevant, collections: String? = nil, contentFilter: UPContentFilter? = nil, color: UPColor? = nil, orientation: UPOrientation? = nil)\n    searchPhotos.fetchSearchPhotos(query: \"colorful\", orientation: .squarish) \n    \n    // func fetchSearchUsers(query: String, page: Int = 1, perPage: Int = 30)\n    searchUsers.fetchSearchUsers(query: \"lo\") \n    \n    ```\n\n        \n* How to use Router directly.\n    ```swift\n    let router = UPAPIRouter.randomPhotos(query: \"colorful\", orientation: .landscape)\n    UnsplashProvider().loadPhotos(router: router) { photos, error in\n        guard error == nil else { return }\n        if let photos = photos, !photos.isEmpty {\n            let photo = photos[0]\n            self.currentPhoto = photo\n        }\n    }\n    ```\n\n## Swift Package Manager\nThe Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. Once you have your Swift package set up, adding UnsplashProvider as a dependency is as easy as adding it to the dependencies value of your Package.swift.\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/jasudev/UnsplashProvider.git\", .branch(\"main\"))\n]\n```\n\n## Contact\ninstagram : [@dev.fabula](https://www.instagram.com/dev.fabula)  \nemail : [dev.fabula@gmail.com](mailto:dev.fabula@gmail.com)\n\n## License\nUnsplashProvider is available under the MIT license. See the [LICENSE](LICENSE) file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Funsplashprovider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasudev%2Funsplashprovider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasudev%2Funsplashprovider/lists"}