Sunrise Sunset (Independent Publisher) (#2726)

* Init sunrise

* Add sunrise-sunset
This commit is contained in:
Andras Fordos 2023-06-22 06:02:29 +02:00 коммит произвёл GitHub
Родитель 7f9df3b0d3
Коммит 9caf117723
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 192 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,163 @@
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Sunrise-Sunset",
"contact": {
"name": "Fördős András",
"email": "fordosa90+ipc_sunrise@gmail.com"
},
"description": "Sunrise-Sunset provides sunset and sunrise times for a given latitude and longitude, including twilight informations. Attribution required."
},
"host": "api.sunrise-sunset.org",
"basePath": "/",
"schemes": [
"https"
],
"consumes": [],
"produces": [
"application/json"
],
"paths": {
"/json": {
"get": {
"summary": "Get sunset-sunrise",
"description": "Query sunrise and sunset information (twilight included) based on latitude and longitude.",
"operationId": "GetData",
"parameters": [
{
"name": "lat",
"in": "query",
"type": "number",
"format": "float",
"required": true,
"x-ms-summary": "Latitude",
"description": "Latitude in decimal degrees, for example '36.7201'."
},
{
"name": "lng",
"in": "query",
"type": "number",
"format": "float",
"required": true,
"x-ms-summary": "Longitude",
"description": "Longitude in decimal degrees, for example '-4.42034'."
},
{
"name": "date",
"default": "",
"in": "query",
"type": "string",
"required": false,
"x-ms-summary": "Date",
"description": "Date in YYYY-MM-DD format. Also accepts other date formats and even relative date formats. If not present, date defaults to current date."
},
{
"name": "formatted",
"in": "query",
"type": "integer",
"format": "int32",
"required": false,
"x-ms-visibility": "advanced",
"x-ms-summary": "Formatted",
"enum": [
0,
1
],
"description": "Formatted (1) or not (0) response. Time values in response will be expressed following ISO 8601 and day_length will be expressed in seconds."
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"results": {
"type": "object",
"properties": {
"sunrise": {
"type": "string",
"description": "Timestamp, indicating when the sun comes above the horizon.",
"title": "Sunrise"
},
"sunset": {
"type": "string",
"description": "Timestamp, indicating when the sun goes down below the horizon.",
"title": "Sunset"
},
"solar_noon": {
"type": "string",
"title": "Solar noon",
"description": "Timestamp, when the Sun passes a location's meridian and reaches its highest position in the sky."
},
"day_length": {
"type": "string",
"description": "Length of the day (sun above horizon).",
"title": "Day length"
},
"civil_twilight_begin": {
"type": "string",
"description": "Timestamp, when the rising sun is less than 6 degrees below the horizon.",
"title": "Civil twilight begin"
},
"civil_twilight_end": {
"type": "string",
"description": "Timestamp, when the descending sun reaches 6 degrees below the horizon.",
"title": "Civil twilight end"
},
"nautical_twilight_begin": {
"type": "string",
"description": "Timestamp, when the rising sun is between 12 degrees and 6 degrees below the horizon.",
"title": "Nautical twilight begin"
},
"nautical_twilight_end": {
"type": "string",
"description": "Timestamp, when the descending sun is between 6 degrees and 12 degrees below the horizon.",
"title": "Nautical twilight end"
},
"astronomical_twilight_begin": {
"type": "string",
"description": "Timestamp, when the rising sun is between 18 degrees and 12 degrees below the horizon.",
"title": "Astronomical twilight begin"
},
"astronomical_twilight_end": {
"type": "string",
"description": "Timestamp, when the descending sun is between 12 degrees and 18 degrees below the horizon.",
"title": "Astronomical twilight end"
}
}
},
"status": {
"type": "string",
"description": "Status of response.",
"title": "Status"
}
}
}
}
}
}
}
},
"definitions": {},
"parameters": {},
"responses": {},
"securityDefinitions": {},
"security": [],
"tags": [],
"x-ms-connector-metadata": [
{
"propertyName": "Website",
"propertyValue": "https://sunrise-sunset.org/api"
},
{
"propertyName": "Privacy policy",
"propertyValue": "https://sunrise-sunset.org/privacy"
},
{
"propertyName": "Categories",
"propertyValue": "Data"
}
]
}

Просмотреть файл

@ -0,0 +1,9 @@
{
"properties": {
"connectionParameters": {},
"iconBrandColor": "#da3b01",
"capabilities": [],
"publisher": "Fördős András",
"stackOwner": "Sunrise-Sunset"
}
}

Просмотреть файл

@ -0,0 +1,20 @@
# Sunrise Sunset
Sunrise-Sunset provides sunset and sunrise times for a given latitude and longitude, including twilight informations. Attribution required.
## Publisher: Fördős András
## Prerequisites
There are no pre-requisites to this service as it is free and public, however attrbution is required on usage.
## Supported Operations
### Get sunset-sunrise
Query sunrise and sunset information (twilight included) based on latitude and longitude.
## Known Issues and Limitations
There are currently no known limitations or issues with the connector.
The API itself has some limitations based on your usage, but one of the important take away is that attribution is required and only reasonable request volume is allowd: [https://sunrise-sunset.org/api](https://sunrise-sunset.org/api)