Перейти до вмісту
AstroWay/api v2.73.0 · docs
усі системи в нормі

Algol Nearest Minimum

POST
/algol-minimum/nearest
request.sh
curl -X POST https://api.astroway.info/v1/algol-minimum/nearest \
-H "X-Api-Key: aw_live_..." \
-H "Content-Type: application/json" \
-d '{ "date": "2024-06-15" }'

Find the single nearest Algol brightness minimum before or after a given date.

Media type application/json
object
date required
string
/^\d{4}-\d{2}-\d{2}$/
longitude
number
nullable
Example
{
"date": "2024-06-15"
}

Successful calculation

Media type application/json
object
ok
boolean
data
object
date
string
time
string
jd
number
hoursUntil
number
Example
{
"ok": true,
"data": {
"date": "2024-06-17",
"time": "08:12:00",
"jd": 2460479.84,
"hoursUntil": 41.3
}
}

Validation error

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_INPUT",
"message": "Validation failed: date: Date must be YYYY-MM-DD",
"details": [
{
"path": "date",
"message": "Date must be YYYY-MM-DD"
}
]
}
}

Missing or invalid API key

Media type application/json
Example
{
"ok": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key"
}
}
Корисно?