LightWeight library for Unsplash api
We provide a simple UI allowing to search and browse the free content of unsplash.
install: via cocoapods -> pod 'Unswash'
To use Unswash you need a developer account on Unsplash. To get your App Name and App ID you need to create an app on Unsplash
Once you have those informations you can start using Unswash.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
Unswash.client.configure(clientId: "YOUR_APP_ID", clientName: "YOUR_APP_NAME")
return true
}
After this step you can use the UI we created for you which look like this :
UnswashPhotoViewController.picker().present(in: self, quality: .regular) { image, url in
DispatchQueue.main.async {
}
}
Unswash.client.Photos.search(query: String, page: Int = 1, per_page: Int = 10, completion: @escaping ([Photo]) -> Void)
Unswash.client.Photos.get(page: Int = 1, per_page: Int = 10, order_by: Order = Order.latest, completion: @escaping ([Photo]) -> Void)