https://github.com/tgymnich/apodini-solartime
🌍 Solar time web service using Apodini
https://github.com/tgymnich/apodini-solartime
apodini server-side-swift solar-time sunrise sunset swift
Last synced: 7 months ago
JSON representation
🌍 Solar time web service using Apodini
- Host: GitHub
- URL: https://github.com/tgymnich/apodini-solartime
- Owner: tgymnich
- License: mit
- Created: 2020-12-30T02:47:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2024-03-02T21:11:15.000Z (over 1 year ago)
- Last Synced: 2025-02-06T12:32:28.757Z (9 months ago)
- Topics: apodini, server-side-swift, solar-time, sunrise, sunset, swift
- Language: Swift
- Homepage: https://github.com/apodini/apodini
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Apodini-SolarTime
## Endpoints
| Endpoint | Description | Optional Query Parameters |
|-|-|-|
| `/v1` | returns the solar time based on the location of your IP address | `latitude`, `longitude`, `time` |
| `/v1/{location}` | returns the solar time based on the location passed in the path parameter | `time` |
## Example
```
curl --request GET http://localhost:8080/v1/Munich
```
returns
```
{
"data" : {
"currentDeclination" : 14.953388755535467,
"sunset" : "2021-02-08T16:24:51.057Z",
"hoursOfSunlight" : 9.8667992055416107,
"zenith" : "2021-02-08T11:28:50.818Z",
"sunrise" : "2021-02-08T06:32:50.580Z"
},
"_links" : {
"self" : "http://127.0.0.1:8080/v1/Munich"
}
}