Coder Social home page Coder Social logo

observerly / nocturnal Goto Github PK

View Code? Open in Web Editor NEW
1.0 0.0 1.0 145 KB

๐ŸŒ‘ Nocturnal is observerly's Gin Gonic API for Lunar and Solar advanced scheduling, that utilises Dusk.

Home Page: https://nocturnal.observerly.com/

License: GNU General Public License v3.0

Go 98.13% Dockerfile 1.81% Shell 0.07%
amateur-astronomy astronomy dawn dusk lunar night solar twilight

nocturnal's Introduction

@observerly:nocturnal

Nocturnal ๐ŸŒ‘ is observerly's Gin Gonic API for Lunar and Solar advanced scheduling, that utilises Dusk, available at https://nocturnal.observerly.com as a highly performant public API.

The Nocturnal API is designed to be stateless, and to return a response based on the current time, and the parameters passed to the API.

Please note, the specifics of the Nocturnal API is currently in active development, and is subject to without warning.

Usage

Introduction

As mentioned, the Nocturnal API is designed to be stateless. That is, a request to the API will return a response based on the current time, and the parameters passed to the API.

This means that the API can be used to understanding the position of the Moon, the Sun, or any transiting body (e.g., a Star) at any time in the past, present, or future.

Schema

The Nocturnal base URL for the API will be {HOST}/api/v2/ where {HOST} is the host name of the API, e.g., https://nocturnal.observerly.com.

There is a deprecate version of the API, but as of 14.02.2023 we do not recommend its use. The deprecate version of the API is available at {HOST}/api/v1/ where {HOST} is the host name of the API, e.g., https://nocturnal.observerly.com.

The Nocturnal API has a standardised API JSON response format, which adheres to the JSON API specification as well as the schema defined in the OpenAPI specification.

For Sun, Moon and Transit endpoints, the API JSON response adheres to the following schema:

{
  "observer": {
    
  },
  "rise": {

  },
  "maximum": {

  },
  "set": {

  },
}

For Twilight endpoints, the API JSON response adheres to the following schema:

{
  "observer": {
    
  },
  "civil": {

  },
  "nautical": {

  },
  "astronomical": {

  },
}

API Endpoints

The Nocturnal API has the following endpoints:

API Development

Project Requirements

We welcome any and all contributions or raised issues to this repository.

To contribute to this project, you will need the following tools installed on your local machine:

Local Development

The Nocturnal development stack can be built with the following docker compose command:

$ docker compose -f local.yml build

The Nocturnal development stack can then be started with:

$ docker compose -f local.yml up

or simply by utilising the following combined command:

docker compose -f local.yml up --build

Testing

The Nocturnal development stack can be tested with the following command:

GIN_MODE=release bash -c "go test ./... -race -coverprofile=coverage.txt -covermode=atomic -v"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.