New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

seventimer-api

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

seventimer-api

Definitions for the 7timer! API.

latest
npmnpm
Version
0.3.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

seventimer

FAQs

Package last updated on 26 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts