{"id":15293688,"url":"https://github.com/adboco/unsplashimageview","last_synced_at":"2025-03-24T15:11:27.882Z","repository":{"id":56925430,"uuid":"133811418","full_name":"adboco/UnsplashImageView","owner":"adboco","description":"Easily embed Unsplash photos in UIImageView. Using Unsplash Source API.","archived":false,"fork":false,"pushed_at":"2019-07-17T06:46:48.000Z","size":1835,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-02T16:39:47.313Z","etag":null,"topics":["cocoapods","ios","ios-lib","ios-swift","ios-ui","ios11","pod","pods","swift","swift4","swiftlibrary","unsplash","unsplash-client","unsplash-source","xcode","xcode9"],"latest_commit_sha":null,"homepage":null,"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/adboco.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}},"created_at":"2018-05-17T12:38:50.000Z","updated_at":"2025-02-25T19:19:35.000Z","dependencies_parsed_at":"2022-08-20T22:50:30.483Z","dependency_job_id":null,"html_url":"https://github.com/adboco/UnsplashImageView","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FUnsplashImageView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FUnsplashImageView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FUnsplashImageView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adboco%2FUnsplashImageView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adboco","download_url":"https://codeload.github.com/adboco/UnsplashImageView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245294774,"owners_count":20591909,"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":["cocoapods","ios","ios-lib","ios-swift","ios-ui","ios11","pod","pods","swift","swift4","swiftlibrary","unsplash","unsplash-client","unsplash-source","xcode","xcode9"],"created_at":"2024-09-30T16:50:35.458Z","updated_at":"2025-03-24T15:11:27.859Z","avatar_url":"https://github.com/adboco.png","language":"Swift","readme":"# UnsplashImageView\n\n[![Version](https://img.shields.io/cocoapods/v/UnsplashImageView.svg?style=flat)](https://cocoapods.org/pods/UnsplashImageView)\n[![License](https://img.shields.io/cocoapods/l/UnsplashImageView.svg?style=flat)](https://cocoapods.org/pods/UnsplashImageView)\n[![Platform](https://img.shields.io/cocoapods/p/UnsplashImageView.svg?style=flat)](https://cocoapods.org/pods/UnsplashImageView)\n[![Swift Version](https://img.shields.io/badge/swift-4.1-orange.svg)](https://cocoapods.org/pods/UnsplashImageView)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fadboco%2FUnsplashImageView.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fadboco%2FUnsplashImageView?ref=badge_shield)\n\n__UnsplashImageView__ allows to display _Unsplash_ photos in UIImageView and make transitions between images. It uses [Unsplash Source API](https://source.unsplash.com).\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://github.com/adboco/UnsplashImageView/blob/master/Assets/unsplash_demo.gif\" height=\"600px\" /\u003e\n\u003c/p\u003e\n\n## Requirements\n\n* Xcode 9.0+\n* iOS 8.0+\n\n## Installation\n\nUnsplashImageView is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'UnsplashImageView'\n```\n\n## Usage\n\n```swift\nimport UnsplashImageView\n```\n\n__With default configuration__\n\n```swift\nUnsplashConfig.default.query = .random(featured: true) // Query to Unsplash. Default is `.random(featured: false)`.\nUnsplashConfig.default.size = CGSize(width: 600, height: 600) // Specifies the size of images. Default is `nil`.\nUnsplashConfig.default.terms = [\"fruit\", \"vegan\"] // Search terms. Default is `nil`.\nUnsplashConfig.default.mode = .gallery(interval: 10.0, transition: .fade(0.5)) // Image loading mode. Default is `single`.\nUnsplashConfig.default.fixed = .none\n```\n\n__Start getting images__\n\n```swift\nlet imageView = UIImageView()\n// ...\nimageView.unsplash.start()\n```\n\n__Stop getting images (if `gallery` mode enabled)__\n\n```swift\nimageView.unsplash.stop()\n```\n\n__With custom configuration__\n\n```swift\nvar config = UnsplashConfig()\n\nconfig.query = .randomFromUser(username: \"ari_spada\")\nconfig.mode = .single(transition: .none)\nconfig.fixed = .daily\n\nimageView.unsplash.start(with: config)\n```\n\n### Modes\n\n* `single`. Get a single image.\n* `gallery`. Get a new image every __x__ seconds.\n\n### Queries\n\n* `photo(id: String)`. Get a specific photo by id.\n* `random(featured: Bool)`. Get a random photo from Unsplash. If `featured` is `true`, it gets it from curated collections.\n* `randomFromUser(username: String)`. Get a random photo from a specific user.\n* `randomFromUserLikes(username: String)`. Get a random photo from a user's likes.\n* `randomFromCollection(id: String)`. Get a random photo from a specific collection.\n\n### Updates\n\n* `none`. Always request a new photo. Default value.\n* `daily`. Returns the same photo during a day for the same query.\n* `weekly`. Returns the same photo during a week for the same query.\n\n## Author\n\nadboco@telefonica.net, Adrián Bouza Correa\n\n## License\n\nUnsplashImageView is available under the MIT license. See the LICENSE file for more info.\n\n\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fadboco%2FUnsplashImageView.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fadboco%2FUnsplashImageView?ref=badge_large)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadboco%2Funsplashimageview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadboco%2Funsplashimageview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadboco%2Funsplashimageview/lists"}