Skip to content

timeanddate/libtad-swift

Repository files navigation

SWIFT Framework for API Services From timeanddate.com

Platform

Use our API Services to tap into timeanddate.com's databases and integrate our data into your applications

Service Reference

The requests created by this library use the an expiry date, 60s from creation.

Requirements

  • iOS 12.0+ / macOS 10.14+
  • Xcode 11+
  • Swift 5.1+

Instalation

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate TadApi into your Xcode project using Carthage, specify it in your Cartfile:

github "TimeAndDate/TadApi"

Cocoapods

CocoaPods a popular dependency manager. Using the command pod 'libtad-swift', '~> 1.0' to add this library to your podfile.

Usage

let astronomyService = AstronomyService(accessKey: "[YOUR_ACCESS_KEY]", secretKey:"[YOUR_SECRET_KEY]")
let astronomyRequest = AstronomyRequest()
astronomyRequest.objects = "sun"
astronomyRequest.placeId = "norway/oslo"
astronomyService.getAstronomicalInfo(request:astronomyRequest) { (result, error) in 
	print(result)
}

Credits

TadApi is owned and maintained by the Time and Date AS. You can visit our API Reference at timeanddate.com for project updates and releases.

Author

Time and Date