diff --git a/examples/contact/README.md b/examples/contact/README.md deleted file mode 100755 index 3f5db08..0000000 --- a/examples/contact/README.md +++ /dev/null @@ -1,217 +0,0 @@ -# Contact - -An [m3o.com](https://m3o.com) API. For example usage see [m3o.com/Contact/api](https://m3o.com/Contact/api). - -Endpoints: - -## Update - - - - -[https://m3o.com/contact/api#Update](https://m3o.com/contact/api#Update) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func UpdateAcontact() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Update(&contact.UpdateRequest{ - Addresses: []contact.Address{ -contact.Address{ - Label: "company address", - }}, -Birthday: "1995-01-01", -Emails: []contact.Email{ -contact.Email{ - Address: "home@example.com", - Label: "home", -}}, -Id: "42e48a3c-6221-11ec-96d2-acde48001122", -Links: []contact.Link{ -contact.Link{ - Label: "blog", - Url: "https://blog.joe.me", -}}, -Name: "joe", -Note: "this person is very important", -Phones: []contact.Phone{ -contact.Phone{ - Label: "home", - Number: "010-12345678", -}}, - - }) - fmt.Println(rsp, err) - -} -``` -## Read - - - - -[https://m3o.com/contact/api#Read](https://m3o.com/contact/api#Read) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func GetAcontact() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Read(&contact.ReadRequest{ - Id: "42e48a3c-6221-11ec-96d2-acde48001122", - - }) - fmt.Println(rsp, err) - -} -``` -## Delete - - - - -[https://m3o.com/contact/api#Delete](https://m3o.com/contact/api#Delete) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func DeleteAcontact() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Delete(&contact.DeleteRequest{ - Id: "42e48a3c-6221-11ec-96d2-acde48001122", - - }) - fmt.Println(rsp, err) - -} -``` -## List - - - - -[https://m3o.com/contact/api#List](https://m3o.com/contact/api#List) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func ListContactsWithDefaultOffsetAndLimitDefaultLimitIs20() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.List(&contact.ListRequest{ - - }) - fmt.Println(rsp, err) - -} -``` -## List - - - - -[https://m3o.com/contact/api#List](https://m3o.com/contact/api#List) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func ListContactsWithSpecificOffsetAndLimit() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.List(&contact.ListRequest{ - Limit: 1, -Offset: 1, - - }) - fmt.Println(rsp, err) - -} -``` -## Create - - - - -[https://m3o.com/contact/api#Create](https://m3o.com/contact/api#Create) - -```go -package example - -import( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func CreateAcontact() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Create(&contact.CreateRequest{ - Addresses: []contact.Address{ -contact.Address{ - Label: "company address", - }}, -Birthday: "1995-01-01", -Emails: []contact.Email{ -contact.Email{ - Address: "home@example.com", - Label: "home", -}}, -Links: []contact.Link{ -contact.Link{ - Label: "blog", - Url: "https://blog.joe.me", -}}, -Name: "joe", -Note: "this person is very important", -Phones: []contact.Phone{ -contact.Phone{ - Label: "home", - Number: "010-12345678", -}}, - - }) - fmt.Println(rsp, err) - -} -``` diff --git a/examples/contact/create/createAContact/main.go b/examples/contact/create/createAContact/main.go deleted file mode 100755 index 84173cc..0000000 --- a/examples/contact/create/createAContact/main.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func main() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Create(&contact.CreateRequest{ - Addresses: []contact.Address{ - contact.Address{ - Label: "company address", - }}, - Birthday: "1995-01-01", - Emails: []contact.Email{ - contact.Email{ - Address: "home@example.com", - Label: "home", - }}, - Links: []contact.Link{ - contact.Link{ - Label: "blog", - Url: "https://blog.joe.me", - }}, - Name: "joe", - Note: "this person is very important", - Phones: []contact.Phone{ - contact.Phone{ - Label: "home", - Number: "010-12345678", - }}, - }) - fmt.Println(rsp, err) -} diff --git a/examples/contact/delete/deleteAContact/main.go b/examples/contact/delete/deleteAContact/main.go deleted file mode 100755 index 7944052..0000000 --- a/examples/contact/delete/deleteAContact/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func main() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Delete(&contact.DeleteRequest{ - Id: "42e48a3c-6221-11ec-96d2-acde48001122", - }) - fmt.Println(rsp, err) -} diff --git a/examples/contact/list/listContactsWithDefaultOffsetAndLimitDefaultLimitIs20/main.go b/examples/contact/list/listContactsWithDefaultOffsetAndLimitDefaultLimitIs20/main.go deleted file mode 100755 index 72465e2..0000000 --- a/examples/contact/list/listContactsWithDefaultOffsetAndLimitDefaultLimitIs20/main.go +++ /dev/null @@ -1,15 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func main() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.List(&contact.ListRequest{}) - fmt.Println(rsp, err) -} diff --git a/examples/contact/list/listContactsWithSpecificOffsetAndLimit/main.go b/examples/contact/list/listContactsWithSpecificOffsetAndLimit/main.go deleted file mode 100755 index 821c14f..0000000 --- a/examples/contact/list/listContactsWithSpecificOffsetAndLimit/main.go +++ /dev/null @@ -1,18 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func main() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.List(&contact.ListRequest{ - Limit: 1, - Offset: 1, - }) - fmt.Println(rsp, err) -} diff --git a/examples/contact/read/getAContact/main.go b/examples/contact/read/getAContact/main.go deleted file mode 100755 index b80686d..0000000 --- a/examples/contact/read/getAContact/main.go +++ /dev/null @@ -1,17 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func main() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Read(&contact.ReadRequest{ - Id: "42e48a3c-6221-11ec-96d2-acde48001122", - }) - fmt.Println(rsp, err) -} diff --git a/examples/contact/update/updateAContact/main.go b/examples/contact/update/updateAContact/main.go deleted file mode 100755 index c8c7b07..0000000 --- a/examples/contact/update/updateAContact/main.go +++ /dev/null @@ -1,39 +0,0 @@ -package main - -import ( - "fmt" - "os" - - "go.m3o.com/contact" -) - -// -func main() { - contactService := contact.NewContactService(os.Getenv("M3O_API_TOKEN")) - rsp, err := contactService.Update(&contact.UpdateRequest{ - Addresses: []contact.Address{ - contact.Address{ - Label: "company address", - }}, - Birthday: "1995-01-01", - Emails: []contact.Email{ - contact.Email{ - Address: "home@example.com", - Label: "home", - }}, - Id: "42e48a3c-6221-11ec-96d2-acde48001122", - Links: []contact.Link{ - contact.Link{ - Label: "blog", - Url: "https://blog.joe.me", - }}, - Name: "joe", - Note: "this person is very important", - Phones: []contact.Phone{ - contact.Phone{ - Label: "home", - Number: "010-12345678", - }}, - }) - fmt.Println(rsp, err) -}