Latest 0.0.6
Homepage https://github.com/AlexandreBarbier/Unswash
License MIT
Platforms ios 9.0
Authors

BuddyBuild

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’

Usage:

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.

Initialisation

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
        Unswash.client.configure(clientId: "YOUR_APP_ID", clientName: "YOUR_APP_NAME")
        return true
}

Show Picker

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 {

  }
}

Direct call to the API

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)

Latest podspec

{
    "name": "Unswash",
    "version": "0.0.6",
    "summary": "LightWeight client for Unsplash",
    "description": "LightWeight client for Unsplash.com",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "homepage": "https://github.com/AlexandreBarbier/Unswash",
    "authors": {
        "Alexandre": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/AlexandreBarbier/Unswash.git",
        "tag": "0.0.6"
    },
    "source_files": "Unswash/**/*",
    "public_header_files": "Unswash/Unswash.h",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This