Skip to content

Official Go library for Holiday API

License

Notifications You must be signed in to change notification settings

holidayapi/holidayapi-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-holidayapi

Official Go library for Holiday API

Usage

package main

import (
    "fmt"
    "github.com/joshtronic/go-holidayapi"
)

func main() {
    hapi := holidayapi.NewV1("_MY_API_KEY_")

    holidays, err := hapi.Holidays(map[string]interface{}{
        // Required
        "country": "US",
        "year":    "2016",
        // Optional
        // "month":    "7",
        // "day":      "4",
        // "previous": "true",
        // "upcoming": "true",
        // "public":   "true",
        // "pretty":   "true",
    })

    if err != nil {
        // Error handling...
    }

    fmt.Println("%#v\n", holidays)
}

About

Official Go library for Holiday API

https://holidayapi.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages