Swift Package Index


UCL API wrapper in Swift


  • The latest stable release is 0.1.0. Released 3 years ago.
  • The last commit to main was 3 months ago.

Swift Version Compatibility

  • 0.1.0
    5.3
    5.2
    5.1
    5.0
    4.2
  • main
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.1.0
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
  • main
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

UCLKit is a Swift wrapper for the UCL API. I have developed UCLKit so that Swift developers are able to forget about all the networking, JSON parsing, etc. and with one line, request all the data already fully parsed in object properties, and with the correct Data Types, from the simple String and Int to the more proprietary URL and Date.

Main Features

  • 100% native Swift 4.2 framework
  • Fast and native networking
  • Smart error handling

How-To

Authentication

Just create a config instance with the token as initialization value:

let config = TokenConfiguration("12345")

After that, well, use it! :)

UCLKit(config).rooms() { response in
  switch response {
  case .success(let data):
    print("The first room's name is \(data.rooms[0].name)")
  case .failure(let error):
    print("Oops: \(UCLKit(config).parseError(error))")
  }
}

If you need some more help with the framework you can open an issue above, I'll reply as soon as possible. As an example, please have a look at CampusBuddy and APIBuddy.

Author

Tiago Ferreira | Twitter | Website

License

UCLKit Copyright (C) 2017 Tiago Ferreira

Please check the license file embed in this project for more details.