seventimer-api
v0.3.0
Published
Definitions for the 7timer! API.
Downloads
1
Maintainers
Readme
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