Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F13828702
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
705 B
Subscribers
None
View Options
diff --git a/collection_test.go b/collection_test.go
index 87b447a..8a5617e 100644
--- a/collection_test.go
+++ b/collection_test.go
@@ -1,19 +1,30 @@
package writeas
import (
+ "fmt"
"testing"
)
func TestGetCollection(t *testing.T) {
wac := NewClient()
res, err := wac.GetCollection("blog")
if err != nil {
t.Errorf("Unexpected fetch results: %+v, err: %v\n", res, err)
} else {
t.Logf("Post: %+v", res)
if res.Title != "write.as" {
t.Errorf("Unexpected fetch results: %+v\n", res)
}
}
}
+
+func ExampleGetCollection() {
+ c := NewClient()
+ coll, err := c.GetCollection("blog")
+ if err != nil {
+ fmt.Printf("%v", err)
+ return
+ }
+ fmt.Printf("%+v", coll)
+}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Thu, Feb 19, 8:35 PM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3632585
Attached To
rWGO writeas-go
Event Timeline
Log In to Comment