Horary Chart Data Sharing Endpoints#
Users can generate quick links to cast a horary chart without manual input of data. These links contain date, time, geographic coordinates, and user options.
The following endpoints generate and validate these links
/api/share/validate/
Checks if the arguments in the URL are correct./api/share/newlink/
Generate new sharing link
Link - Verify#
/api/share/validate/
Checks if the arguments in the URL are correct. If successful, returns data for the front-end application to cast a chart.
Request#
Method GET
Param | Required | Comment |
---|---|---|
data | Yes | Year-Month-Day. May include leading zeros, like 2023-02-03 |
time | Yes | hrs:min:sec. Seconds are optional, hours are in 24hrs format |
tz | Yes | Timezone (UTC offset in hours), f.e. -3.5 means minus 3hrs and 30 minutes |
ln_d | Yes | Longitude degrees 0..180 |
ln_m | Yes | Longitude minutes 0..59 |
dir_ln | Yes | east-west direction. Can be e or w |
lt_d | Yes | Latitude degrees 0..90 |
lt_m | Yes | Latitude minutes 0..59 |
dir_lt | Yes | north-south direction. Can be n or s |
fortune | 0 to use reversed PoF, 1 to use a day-only formula. Default is 1 |
|
cel_lat | 0 to ignore planet's latitude in 5-degree horary rule, 1 to use it. Default is 0 |
|
q | horary question string (max ... symbols, no spaces) |
Example of params in GET request ?date=2023-7-24&time=18:13&tz=4.0&ln_d=44&ln_m=45&dir_ln=e<_d=41<_m=43&dir_lt=n&fortune=1&al=0&q=My_horary_question
Response#
Success, status 200
{
"year": 2023,
"month": 7,
"day": 24,
"hour": 18,
"minute": 13,
"second": 0,
"tz": 4.0,
"ln_d": 44,
"ln_m": 45,
"dir_ln": "e",
"lt_d": 41,
"lt_m": 43,
"dir_lt": "n",
"fortune": true,
"q": "My_horary_question"
}
Failure, status 400
{
"error": [
"Error message"
]
}
Possible error messages:
- Datetime is invalid.
- Geo coordinates are invalid.
Link - Generate#
/api/share/newlink/
Generate a shared link url params based on a given chart data
Request#
Method POST
Param | Required | Comment |
---|---|---|
year | Yes | For levels 0 , 1 , 2 , can only be in 1950 ... 2100 |
month | Yes | integer |
day | Yes | integer |
hour | Yes | integer |
minute | Yes | integer |
second | integer | |
tz | Yes | Timezone in hours, float, f.e. -4.5 |
ln_d | Yes | Longitude degrees 0..180, integer |
ln_m | Yes | Longitude minuted 0..59, integer |
dir_ln | Yes | east-west direction. Can be e or w |
lt_d | Yes | Latitude degrees 0..90, integer |
lt_m | Yes | Latitude minutes 0..59, integer |
dir_lt | Yes | north-south direction. Can be n or s |
fortune | Bool. false to use reversed PoF, true to use a day-only formula. Default is true |
|
cel_lat | Bool. false to ignore planet's latitude in 5-degree horary rule, true to use it. Default is false |
|
q | horary question string (max ... symbols, no spaces), string |
Response#
Success, status 200
{
"url_params": "?date=2022-1-29&time=12:29&tz=..."
}
Failure, status 400
{
"error": [
"Error message"
]
}
Possible error messages:
- Datetime is invalid.
- Geo coordinates are invalid.