https://github.com/faisaltheparttimecoder/go-calendarific
GoLang API for Calendarific Holiday API
https://github.com/faisaltheparttimecoder/go-calendarific
Last synced: 15 days ago
JSON representation
GoLang API for Calendarific Holiday API
- Host: GitHub
- URL: https://github.com/faisaltheparttimecoder/go-calendarific
- Owner: faisaltheparttimecoder
- License: mit
- Created: 2019-08-26T21:28:30.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-08-27T08:05:47.000Z (almost 7 years ago)
- Last Synced: 2025-10-26T05:42:34.731Z (9 months ago)
- Language: Go
- Homepage: https://calendarific.com
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-calendarific
Official Go library for Calendarific Global Holiday API
# Installation
```
dep ensure -add https://github.com/calendarific/go-calendarific
```
# Usage / Example
+ Create a file called **main.go** & insert a script like below
```
package main
import (
"fmt"
"github.com/calendarific/go-calendarific"
"os"
)
func main() {
// Loading the paramater struct
cp := calendarific.CalParameters{
ApiKey: "",
Country: "US",
Year: 2019,
}
// It returns a response struct
holidays, err := cp.CalData()
if err != nil {
fmt.Println(err)
os.Exit(1)
}
fmt.Println(holidays)
}
```
Check out the [file](https://github.com/calendarific/go-calendarific/blob/master/main.go) for parameter struct and response struct.
+ Run the program for data
```
go run main.go
```