AstronomyService
public class AstronomyService : BaseService
Service class for Astronomy APi Calls
See also
Astronomy Service-
Public function get Astronomical data
Note
This class needs to be initialized with the accessKey and SecretKey- request: AstronomyRequest object
- Astronomy Data Respomse: AstronomyDataResponse
- Service Errors
var astronomyService = AstronomyService(accessKey: "[YOUR_ACCESS_KEY]", secretKey:"[YOUR_SECRET_KEY]") var astronomyRequest = AstronomyRequest() astronomyRequest.objects = "sun" astronomyRequest.placeId = "norway/oslo". astronomyService.getAstronomicalInfo(request:astronomyRequest) { (result, error) in }
Declaration
Swift
public func getAstronomicalInfo(request: AstronomyRequest, completionHandler: @escaping (_ result: AstronomyDataResponse?, _ error: ServiceErrors?) -> Void)
Return Value