As the instant of an object’s rising or setting is linked to the Earth’s rotation and the calendar, the correct time scale and calendar must be selected, depending on the requested date. The default behavior of the API is to use the UTC timescale and the Gregorian calendar.
The following example retrieves the lunar eclipse on July 5th, 2020.
Execute this command to retrieve the result encoded in the JSON format (Result of this command ).
wget https://opale.imcce.fr/api/v1/phenomena/eclipses/301/2020-07-05
Execute this command to retrieve the visibility map of the eclipse as a picture (Result of this command ).
wget https://opale.imcce.fr/api/v1/phenomena/eclipses/301/2020-07-05?format=image
Execute this script to retrieve the result encoded in the JSON format.
import json
import requests
apicall = "https://opale.imcce.fr/api/v1/phenomena/eclipses/301/2020-07-05"
response = requests.get( apicall )
print(response.json())
The following example retrieves the solar eclipse of the julian year -100 (same as 101 before era).
Execute this command to retrieve the result encoded in the JSON format (Result of this command ).
wget https://opale.imcce.fr/api/v1/phenomena/eclipses/10/julian,-0100-05-17
Execute this command to retrieve the visibility map of the eclipse as a picture (Result of this command ).
wget https://opale.imcce.fr/api/v1/phenomena/eclipses/10/julian,-0100-05-17?format=image
Execute this script to retrieve the result encoded in the JSON format.
import json
import requests
apicall = "https://opale.imcce.fr/api/v1/phenomena/eclipses/10/julian,-0100-05-17"
response = requests.get( apicall )
print(response.json())