timelines.go
changeset 244 4508376c8fcb
parent 214 642d690de0ba
--- a/timelines.go	Fri Sep 07 19:17:12 2018 +0200
+++ b/timelines.go	Fri Sep 07 21:49:44 2018 +0200
@@ -12,9 +12,9 @@
 	"github.com/pkg/errors"
 )
 
-// GetTimelines returns a timeline (a list of statuses
-// timeline can be "home", "public", a hashtag (use ":hashtag" or "#hashtag")
-// or a list (use "!N", e.g. "!42" for list ID #42).
+// GetTimelines returns a timeline (a list of statuses)
+// timeline can be "home", "public", "direct", a hashtag (use ":hashtag" or
+// "#hashtag") or a list (use "!N", e.g. "!42" for list ID #42).
 // For the public timelines, you can set 'local' to true to get only the
 // local instance.
 // Set 'onlyMedia' to true to only get statuses that have media attachments.
@@ -26,7 +26,7 @@
 	var endPoint string
 
 	switch {
-	case timeline == "home", timeline == "public":
+	case timeline == "home", timeline == "public", timeline == "direct":
 		endPoint = "timelines/" + timeline
 	case strings.HasPrefix(timeline, ":"), strings.HasPrefix(timeline, "#"):
 		hashtag := timeline[1:]