tootle-linux-client/src/Views/Hashtag.vala

21 lines
566 B
Vala
Raw Normal View History

2019-03-11 15:14:37 +01:00
public class Tootle.Views.Hashtag : Views.Timeline {
2018-06-20 17:50:42 +02:00
2019-03-11 15:14:37 +01:00
public Hashtag (string hashtag) {
2018-06-20 17:50:42 +02:00
base ("tag/" + hashtag);
}
public string get_hashtag () {
return this.timeline.substring (4);
}
public override string get_name () {
return get_hashtag ();
}
public override Soup.Message? get_stream () {
var url = "%s/api/v1/streaming/?stream=hashtag&tag=%s&access_token=%s".printf (accounts.formal.instance, get_hashtag (), accounts.formal.token);
return new Soup.Message("GET", url);
}
}