From 1adc8d6f909daa82059aefb97019d41a05e1838c Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Tue, 6 Sep 2016 23:23:23 -0500 Subject: [PATCH] Doing stuff. --- holidayapi.go | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 holidayapi.go diff --git a/holidayapi.go b/holidayapi.go new file mode 100644 index 0000000..9582f0b --- /dev/null +++ b/holidayapi.go @@ -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) +}