add GetTimelineHashtag
parent
fdcc642234
commit
564554c1c9
|
@ -66,7 +66,7 @@ if err != nil {
|
|||
* [ ] POST /api/v1/statuses/:id/unfavourite
|
||||
* [x] GET /api/v1/timelines/home
|
||||
* [x] GET /api/v1/timelines/public
|
||||
* [ ] GET /api/v1/timelines/tag/:hashtag
|
||||
* [x] GET /api/v1/timelines/tag/:hashtag
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
10
status.go
10
status.go
|
@ -95,6 +95,16 @@ func (c *Client) GetTimelineHome() ([]*Status, error) {
|
|||
return statuses, nil
|
||||
}
|
||||
|
||||
// GetTimelineHashtag return statuses from tagged timeline.
|
||||
func (c *Client) GetTimelineHashtag(tag string) ([]*Status, error) {
|
||||
var statuses []*Status
|
||||
err := c.doAPI(http.MethodGet, fmt.Sprintf("/api/v1/timelines/tag/%s", (&url.URL{Path: tag}).EscapedPath()), nil, &statuses)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return statuses, nil
|
||||
}
|
||||
|
||||
// PostStatus post the toot.
|
||||
func (c *Client) PostStatus(toot *Toot) (*Status, error) {
|
||||
params := url.Values{}
|
||||
|
|
Loading…
Reference in New Issue