Skip to content

jdisho/UnsplashSwift

Repository files navigation

UnsplashSwift

🌯 A Swift wrapper for the Unsplash API

πŸ›  Installation

CocoaPods

To integrate UnsplashSwift into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'UnsplashSwift'

πŸ‘¨πŸ»β€πŸ’» Usage

let unsplash = Provider<Unsplash>(clientID: "xxx") // only for public actions

// OR

let unsplash = Provider<Unsplash>(token: "xxx") // for all actions

provider.request(.photos(page: 1, perPage: 10, orderBy: .popular)).responseJSON { response in
    // do something with the response
}

UnsplashSwift is build on top of Alamofire.

See Alamofire for more information about Response Handling, Response Validation

🐨 Author

Created with ❀️ by Joan Disho

πŸ™ Acknowledgements

Inspired by Moya

πŸ“ƒ License

UnsplashSwift is released under an MIT license. See License.md for more information.