equal
deleted
inserted
replaced
15 var tl []Status |
15 var tl []Status |
16 |
16 |
17 if timeline == "home" || timeline == "public" { |
17 if timeline == "home" || timeline == "public" { |
18 endPoint = "timelines/" + timeline |
18 endPoint = "timelines/" + timeline |
19 } else if strings.HasPrefix(timeline, ":") { |
19 } else if strings.HasPrefix(timeline, ":") { |
20 endPoint = "timelines/tag/" + timeline |
20 hashtag := timeline[1:] |
|
21 if hashtag == "" { |
|
22 return tl, fmt.Errorf("timelines API: empty hashtag") |
|
23 } |
|
24 endPoint = "timelines/tag/" + hashtag |
21 } else { |
25 } else { |
22 return tl, fmt.Errorf("GetTimelines: bad timelines argument") |
26 return tl, fmt.Errorf("GetTimelines: bad timelines argument") |
23 } |
27 } |
24 |
28 |
25 req := g.prepareRequest(endPoint) |
29 req := g.prepareRequest(endPoint) |