https://github.com/bst27/sunrise-sunset-api
An HTTP API to get sunrise and sunset times.
https://github.com/bst27/sunrise-sunset-api
api gin-gonic go golang http sunrise sunrise-sunset sunset webservice
Last synced: 3 months ago
JSON representation
An HTTP API to get sunrise and sunset times.
- Host: GitHub
- URL: https://github.com/bst27/sunrise-sunset-api
- Owner: bst27
- License: mit
- Created: 2020-08-17T10:50:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-18T18:05:11.000Z (over 5 years ago)
- Last Synced: 2025-03-11T01:47:39.853Z (about 1 year ago)
- Topics: api, gin-gonic, go, golang, http, sunrise, sunrise-sunset, sunset, webservice
- Language: Go
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# About
An HTTP API to get sunrise and sunset times.
# Example
This example shows request and response. All request fields are mandatory.
```
http://localhost:8080/sunrise-sunset?utcOffset=2&latitude=51.963691&longitude=7.610362&date=2020-08-17
```
```
{
"Date": "2020-08-17",
"Latitude": 51.963691,
"Longitude": 7.610362,
"Sunrise": "06:17:31",
"Sunset": "20:48:25",
"UtcOffset": 2
}
```
# Build
To build executables for multiple platforms you can use the build script at `scripts/build.sh`.