0.3.0 • Published 2 years ago

seventimer-api v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Seventimer API

Interfaces and types for the 7Timer! API.

Usage

Example in combination with axios

import axios from "axios"
import { Seventimer } from "seventimer-api"

/* Use the api class to manage parameters and url */
const api = new Seventimer.Api()
api.lat = 52.520
api.lon = 13.404

/* Tell axios what to expect and use generated url */
axios.get<Seventimer.CivilLightResponse>(api.getRequestUrl())
.then(response => {
    for (const item of response.data.dataseries) {
        console.log(item.temp2m)
    }
})

Todos

  • The two api returns malformed json responses and is therefore not really functional
  • Types should be moved to the Types.ts file
  • Maybe implement the graphical API
  • Improve quality of comments
0.3.0

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago