Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/hsnks100/go-weather-api

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/hsnks100/go-weather-api

  • v0.0.0-20240614152624-74f3144f2062
  • Source
  • Go
  • Socket score

Version published
Created
Source

go-weather-api

한국 공공데이터 포털(data.go.kr) 기반하여 기상청 데이터를 가져오는 go wrapper

사용법

package main

import (
	"fmt"
	"time"

	"github.com/hsnks100/go-weather-api/providers/kweather"
)

func main() {
	const serviceKey = "****************"
	ks := kweather.NewClient(serviceKey)
	wi2, err := ks.GetDetailedForecast("가산동", 16*time.Hour)
	if err != nil {
		fmt.Println(err)
	}
	for _, v := range wi2 {
		fmt.Println(v)
	}
	fmt.Println(ks.ReportWeather(wi2))
}

결과

{30 0 0 70 0 4 24 0 0 0 0 0 186 0 0 2024-06-15 00:00:00 +0900 KST}
{20 0 0 75 0 3 23 0 0 0 1 0 186 1 0 2024-06-15 01:00:00 +0900 KST}
{30 0 0 75 0 4 22 0 0 0 0 0 201 0 0 2024-06-15 02:00:00 +0900 KST}
{30 0 0 75 0 4 22 0 0 0 1 0 180 1 0 2024-06-15 03:00:00 +0900 KST}
{30 0 0 80 0 4 22 0 0 0 0 0 225 0 0 2024-06-15 04:00:00 +0900 KST}
{30 0 0 80 0 4 22 0 0 0 0 0 18 0 0 2024-06-15 05:00:00 +0900 KST}
{30 0 0 80 0 4 22 19 0 0 0 0 269 0 0 2024-06-15 06:00:00 +0900 KST}
{30 0 0 80 0 4 22 0 0 0 0 0 144 0 0 2024-06-15 07:00:00 +0900 KST}
{30 0 0 75 0 4 23 0 0 0 0 0 221 0 0 2024-06-15 08:00:00 +0900 KST}
{30 0 0 70 0 4 24 0 0 0 1 0 209 1 0 2024-06-15 09:00:00 +0900 KST}
{60 1 8 70 0 4 24 0 0 1 1 0 227 1 0 2024-06-15 10:00:00 +0900 KST}
{20 0 0 70 0 3 25 0 0 2 0 0 260 2 0 2024-06-15 11:00:00 +0900 KST}
{20 0 0 70 0 3 26 0 0 2 0 0 278 2 0 2024-06-15 12:00:00 +0900 KST}
{60 1 1 70 0 4 27 0 0 2 0 0 288 2 0 2024-06-15 13:00:00 +0900 KST}
{30 0 0 65 0 4 27 0 0 2 0 0 278 2 0 2024-06-15 14:00:00 +0900 KST}
{30 0 0 65 0 4 27 0 30 2 0 0 270 2 0 2024-06-15 15:00:00 +0900 KST}
{30 0 0 65 0 4 27 0 0 2 0 0 268 2 0 2024-06-15 16:00:00 +0900 KST}
[날씨 요약] 
날짜 및 시간: 2024-06-15 00:00:00~2024-06-15 16:00:00
기온: 22~27°C
강수확률: 60
강수량: 8mm
하늘상태: 흐림
습도: 80%

TODO

[] weatherapi 에서 제공하는 기능을 모두 구현해보기

FAQs

Package last updated on 14 Jun 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc