From 90e9560c8116b395899073569492414b2f9ffbd4 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 7 Aug 2017 21:20:56 -0400 Subject: [PATCH] Add GetCollection example --- collection_test.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/collection_test.go b/collection_test.go index 87b447a..8a5617e 100644 --- a/collection_test.go +++ b/collection_test.go @@ -1,6 +1,7 @@ package writeas import ( + "fmt" "testing" ) @@ -17,3 +18,13 @@ func TestGetCollection(t *testing.T) { } } } + +func ExampleGetCollection() { + c := NewClient() + coll, err := c.GetCollection("blog") + if err != nil { + fmt.Printf("%v", err) + return + } + fmt.Printf("%+v", coll) +}