--- a/timelines.go Sat Apr 15 21:08:34 2017 +0200
+++ b/timelines.go Sun Apr 16 02:12:38 2017 +0200
@@ -8,7 +8,7 @@
)
// GetTimelines returns a timeline (a list of statuses
-// timeline can be "home", "public", or a hashtag (use ":hashtag")
+// timeline can be "home", "public", or a hashtag (use ":hashtag" or "#hashtag")
// For the public timelines, you can set 'local' to true to get only the
// local instance.
func (g *Client) GetTimelines(timeline string, local bool) ([]Status, error) {
@@ -17,7 +17,7 @@
switch {
case timeline == "home", timeline == "public":
endPoint = "timelines/" + timeline
- case strings.HasPrefix(timeline, ":"):
+ case strings.HasPrefix(timeline, ":"), strings.HasPrefix(timeline, "#"):
hashtag := timeline[1:]
if hashtag == "" {
return nil, fmt.Errorf("timelines API: empty hashtag")