TimeService
public class TimeService : BaseService
Service call for TimeServce API The timeservice service can be used to retrieve the current time in one or more places. Additionally, information about time zones and related changes and the time of sunrise and sunset can be queried.
-
Public function get Time
Note
This class needs to be initialized with the accessKey and SecretKeyvar timeService = TimeServce(accessKey: "[YOUR_ACCESS_KEY]", secretKey:"[YOUR_SECRET_KEY]") var timeRequest = TimeRequest() timeRequest.placeId = "norway/oslo" timeService.getPLacesInfo(request:timeRequest) { (result, error) in }
Declaration
Swift
public func getCurrentTime(request: TimeRequest, completionHandler: @escaping (_ result: TimeResponse?, _ error: ServiceErrors?) -> Void)
Parameters
request
TimeRequest object
Return Value
- TimeResponse
- Service Errors