pub struct ServiceClient { /* private fields */ }
Expand description
Client for accessing the Time and Date APIs.
Implementations§
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn get_astro_events(
&self,
request: &AstroEventRequest,
) -> Result<Result<AstronomyResponse, ApiError>, Error>
pub fn get_astro_events( &self, request: &AstroEventRequest, ) -> Result<Result<AstronomyResponse, ApiError>, Error>
The Astro Event service can be used to retrieve the sunrise, sunset, moonrise, moonset, solar noon and twilight times for all locations in our database. The service can also return the azimuth of events, the altitude, and the distance to the sun for the noon event.
Sourcepub fn get_astro_position(
&self,
request: &AstroPositionRequest,
) -> Result<Result<AstronomyResponse, ApiError>, Error>
pub fn get_astro_position( &self, request: &AstroPositionRequest, ) -> Result<Result<AstronomyResponse, ApiError>, Error>
The Astro Position service can be used to retrieve the altitude, azimuth and distance to the Moon and the Sun for all locations in our database. The service also returns the moon phase, the fraction of the Moon’s illuminated side as well as the midpoint angle of the Moon’s bright limb at any point in time.
Unlike the Astro Event service, the Astro Position service can be queried on a specific point in time, down to the second.
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn calculate_business_date(
&self,
request: &BusinessDateRequest,
) -> Result<Result<BusinessDateResponse, ApiError>, Error>
pub fn calculate_business_date( &self, request: &BusinessDateRequest, ) -> Result<Result<BusinessDateResponse, ApiError>, Error>
The BusinessDate service can be used to find a business date from a specified number of days.
Sourcepub fn calculate_business_duration(
&self,
request: &BusinessDurationRequest,
) -> Result<Result<BusinessDurationResponse, ApiError>, Error>
pub fn calculate_business_duration( &self, request: &BusinessDurationRequest, ) -> Result<Result<BusinessDurationResponse, ApiError>, Error>
The BusinessDuration service can be used to calculate the number of business days between a specified start date and end date.
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn get_holidays(
&self,
request: &HolidaysRequest,
) -> Result<Result<HolidaysResponse, ApiError>, Error>
pub fn get_holidays( &self, request: &HolidaysRequest, ) -> Result<Result<HolidaysResponse, ApiError>, Error>
The Holidays service can be used to retrieve a list of holidays for a country.
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn get_events_on_this_day(
&self,
request: &OnThisDayRequest,
) -> Result<Result<OnThisDayResponse, ApiError>, Error>
pub fn get_events_on_this_day( &self, request: &OnThisDayRequest, ) -> Result<Result<OnThisDayResponse, ApiError>, Error>
The On This Day service can be used to retrieve a list of events, births and deaths for a given day.
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn get_places(
&self,
request: &PlacesRequest,
) -> Result<Result<PlacesResponse, ApiError>, Error>
pub fn get_places( &self, request: &PlacesRequest, ) -> Result<Result<PlacesResponse, ApiError>, Error>
The Places service can be used to retrieve a list of supported places.
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn get_tidal_data(
&self,
request: &TidesRequest,
) -> Result<Result<TidesResponse, ApiError>, Error>
pub fn get_tidal_data( &self, request: &TidesRequest, ) -> Result<Result<TidesResponse, ApiError>, Error>
The Tides service can be used to retrieve predicted tidal data over a given time interval for a specific place.
Source§impl ServiceClient
impl ServiceClient
Sourcepub fn convert_time(
&self,
request: &ConvertTimeRequest,
) -> Result<Result<ConvertTimeResponse, ApiError>, Error>
pub fn convert_time( &self, request: &ConvertTimeRequest, ) -> Result<Result<ConvertTimeResponse, ApiError>, Error>
The ConvertTime service can be used to convert any time from UTC or any of the supported locations to any other of the supported locations.
Sourcepub fn get_daylight_savings_time(
&self,
request: &DSTListRequest,
) -> Result<Result<DSTListResponse, ApiError>, Error>
pub fn get_daylight_savings_time( &self, request: &DSTListRequest, ) -> Result<Result<DSTListResponse, ApiError>, Error>
The DSTList service can be used to obtain data about time zones for all supported countries in our database. This includes the start and end date of daylight savings time, and UTC offset for the time zones.
Sourcepub fn get_current_time(
&self,
request: &TimeserviceRequest,
) -> Result<Result<TimeserviceResponse, ApiError>, Error>
pub fn get_current_time( &self, request: &TimeserviceRequest, ) -> Result<Result<TimeserviceResponse, ApiError>, Error>
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.