mirror of
https://github.com/holidayapi/holidayapi-go.git
synced 2025-06-21 04:26:33 +00:00
Doing stuff.
This commit is contained in:
parent
9a7cd2d71b
commit
1adc8d6f90
1 changed files with 36 additions and 0 deletions
36
holidayapi.go
Normal file
36
holidayapi.go
Normal file
|
@ -0,0 +1,36 @@
|
|||
//package holidayapi
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
// TODO: import ( encoding/json net/http net/url )
|
||||
|
||||
type V1 struct {
|
||||
Key string
|
||||
}
|
||||
|
||||
func NewV1(key string) *V1 {
|
||||
v1 := &V1{
|
||||
Key: key,
|
||||
}
|
||||
|
||||
return v1
|
||||
}
|
||||
|
||||
func (v1 *V1) Holidays(parameters map[string]interface{}) map[string]interface{} {
|
||||
return map[string]interface{}{
|
||||
"test": "ing",
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
hapi := NewV1("_MY_API_KEY_")
|
||||
|
||||
fmt.Println(hapi.Key)
|
||||
|
||||
holidays := hapi.Holidays(map[string]interface{}{
|
||||
"country": "US",
|
||||
})
|
||||
|
||||
fmt.Println("%#v\n", holidays)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue